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

Re: [Xen-devel] [PATCH RFC v2 2/3] libxl: Port libxl_blktap2.c to blktap2.5 API.



George Dunlap writes ("[PATCH RFC v2 2/3] libxl: Port libxl_blktap2.c to 
blktap2.5 API."):
> This is code is in preparation for building against an external blktap
> tree.

(NB I'm not really familiar with the tapdisk API.  I guess we'll want
an ack from some blktap2.5 person ?)


> +static int tap_ctl_find(const char *type, const char *disk, tap_list_t *tap) 
> +{

What does this function return ?

> +    int err;
> +    struct list_head list = LIST_HEAD_INIT(list);
> +    tap_list_t *entry;
> +
> +    err = tap_ctl_list(&list);
> +    if (err)
> +        return err;
> +
> +    err = ERROR_FAIL;
...

But later,

>      err = tap_ctl_find(type, disk, &tap);
> -    if (err < 0) {
> +    if (err) {
>          /* returns -errno */


Also if it fails to find an entry it simply returns ERROR_FAIL without
logging anything, which seems unhelpfully opaque.


>  char *libxl__blktap_devpath(libxl__gc *gc,
>                              const char *disk,
> -                            libxl_disk_format format)
> +                            libxl_disk_format format,
> +                            int readwrite)
...
> +    fprintf(stderr, "DEBUG %s %d %s\n", __func__, __LINE__, params);

Mistakenly left in ?


> @@ -55,7 +91,8 @@ int libxl__device_destroy_tapdisk(libxl__gc *gc, const char 
> *params)
>  {
>      char *type, *disk;
>      int err;
> -    tap_list_t tap;
> +    struct list_head list = LIST_HEAD_INIT(list);

Where is this variable `list' used ?


Thanks,
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®.