Re: glfs_init() not setting errno when volfile server is invalid

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

 



On 08/02/2012 10:42 AM, Bharata B Rao wrote:
On Thu, Aug 2, 2012 at 8:16 AM, Anand Avati <anand.avati@xxxxxxxxx> wrote:
I think this was fixed in http://review.gluster.com/#change,3732. Can you
confirm?

That commit doesn't fix this issue. I still see glfs_init() returning
-1 with errno=0 when an invalid server is specified.


will below patch fix the issue? (very hacky, but prevents the qemu crash i guess)


diff --git a/api/src/glfs.c b/api/src/glfs.c
index e81ae56..fecefea 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -530,6 +530,9 @@ glfs_init (struct glfs *fs)

        ret = glfs_init_wait (fs);

+        if (ret && !errno)
+                errno = EINVAL;
+
        return ret;
 }


Regards,
Bharata.

_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxx
https://lists.nongnu.org/mailman/listinfo/gluster-devel






[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux