]> xenbits.xensource.com Git - libvirt.git/commitdiff
Use ENAMETOOLONG if the the socket path is longer than UNIX_PATH_MAX
authorGuido Günther <agx@sigxcpu.org>
Wed, 2 Nov 2011 20:39:31 +0000 (21:39 +0100)
committerGuido Günther <agx@sigxcpu.org>
Wed, 2 Nov 2011 22:01:52 +0000 (23:01 +0100)
src/rpc/virnetsocket.c

index ab88e19fd94a02e71665ff732be0325ea33d6422..d832c53fd645690d93fc95fe781dff88b76e1de2 100644 (file)
@@ -327,7 +327,8 @@ int virNetSocketNewListenUNIX(const char *path,
 
     addr.data.un.sun_family = AF_UNIX;
     if (virStrcpyStatic(addr.data.un.sun_path, path) == NULL) {
-        virReportSystemError(ENOMEM, _("Path %s too long for unix socket"), path);
+        virReportSystemError(ENAMETOOLONG,
+                             _("Path %s too long for unix socket"), path);
         goto error;
     }
     if (addr.data.un.sun_path[0] == '@')