[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


  • To: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
  • From: Thanos Makatos <thanos.makatos@xxxxxxxxxx>
  • Date: Mon, 21 Jan 2013 18:16:48 +0000
  • Accept-language: en-US
  • Acceptlanguage: en-US
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 21 Jan 2013 18:17:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac31g4cIBx2FA+qRQcWribTQSDwcnACf6ONQ
  • Thread-topic: [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.

Ok.

_______________________________________________
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®.