From 6bab30d0713e212be3ee26dc71ad157d45811114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Wed, 2 Nov 2011 21:39:31 +0100 Subject: [PATCH] Use ENAMETOOLONG if the the socket path is longer than UNIX_PATH_MAX --- src/rpc/virnetsocket.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index ab88e19fd9..d832c53fd6 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -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] == '@') -- GitLab