Re: [Qemu-devel] 9pfs-proxy: -retval vs errno vs -1

2015-03-05 Thread Aneesh Kumar K.V
Michael Tokarev writes: > Another interesting tidbit is in hw/9pfs/virtio-9p-proxy.c. > > All filesystem methods use common v9fs_request() function, > which returns -errno. So far so good. > > Now, *all* places which call this function, does this: > > retval = v9fs_request(...); > if (re

[Qemu-devel] 9pfs-proxy: -retval vs errno vs -1

2015-03-04 Thread Michael Tokarev
Another interesting tidbit is in hw/9pfs/virtio-9p-proxy.c. All filesystem methods use common v9fs_request() function, which returns -errno. So far so good. Now, *all* places which call this function, does this: retval = v9fs_request(...); if (retval < 0) { errno = -retval;