Invalid error code when using multipathd CLI
authorHannes Reinecke <hare@suse.de>
Tue, 28 Feb 2017 16:23:01 +0000 (17:23 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 16 Mar 2017 06:58:40 +0000 (07:58 +0100)
commit7381c3f2b19903cc56d1ddafb13e8ad3afc08580
treef0cdc8a905ab8d4600c611c3f359184a49ad12bf
parent13aa088efdcb86e2df9a410a5fc3346a5ed85af8
Invalid error code when using multipathd CLI

When calling the multipathd CLI we're getting the message

error -1 receiving packet

instead of the actual error number.
Problem is a confusion about the return values between
libmpathcmd and uxsock.c.
uxsock.c is assuming a negative return value to be the errno,
but libmpathcmd is returning -1 on error and setting errno.

Signed-off-by: Hannes Reinecke <hare@suse.com>
libmpathcmd/mpath_cmd.c
libmultipath/uxsock.c