[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 6 of 9 RFC v2] blktap3/libblktapctl: Introduce block device control information retrieval functionality



> +int tap_ctl_info(pid_t pid, int minor, unsigned long long *sectors,
> +        unsigned int *sector_size, unsigned int *info)
> +{
> +    tapdisk_message_t message;
> +    int err;
> +
> +    memset(&message, 0, sizeof(message));
> +    message.type = TAPDISK_MESSAGE_DISK_INFO;
> +    message.cookie = minor;
> +
> +    err = tap_ctl_connect_send_and_receive(pid, &message, NULL);
> +    if (err)
> +        return err;
> +
> +    if (message.type != TAPDISK_MESSAGE_DISK_INFO_RSP)
> +        return -EINVAL;

Here's a third pattern to go with the two in the previous patch ;-)

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.