diff mbox

mount.cifs: running out of addresses is not a system error

Message ID 1347450999-25309-1-git-send-email-jlayton@samba.org (mailing list archive)
State New, archived
Headers show

Commit Message

Jeff Layton Sept. 12, 2012, 11:56 a.m. UTC
This patch fixes a minor regression. It used to be that when the mount
helper would run out of addresses that it would return EX_FAIL to
userspace. It now returns EX_SYSERR which is incorrect. Reinstate
the correct error code.

Reported-by: Ales Zelinka <azelinka@redhat.com>
Signed-off-by: Jeff Layton <jlayton@samba.org>
---
 mount.cifs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jeff Layton Sept. 14, 2012, 1:54 p.m. UTC | #1
On Wed, 12 Sep 2012 07:56:39 -0400
Jeff Layton <jlayton@samba.org> wrote:

> This patch fixes a minor regression. It used to be that when the mount
> helper would run out of addresses that it would return EX_FAIL to
> userspace. It now returns EX_SYSERR which is incorrect. Reinstate
> the correct error code.
> 
> Reported-by: Ales Zelinka <azelinka@redhat.com>
> Signed-off-by: Jeff Layton <jlayton@samba.org>
> ---
>  mount.cifs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mount.cifs.c b/mount.cifs.c
> index 3fd472a..7ee859b 100644
> --- a/mount.cifs.c
> +++ b/mount.cifs.c
> @@ -2119,7 +2119,7 @@ int main(int argc, char **argv)
>  mount_retry:
>  	if (!currentaddress) {
>  		fprintf(stderr, "Unable to find suitable address.\n");
> -		rc = EX_SYSERR;
> +		rc = EX_FAIL;
>  		goto mount_exit;
>  	}
>  	strlcpy(options, "ip=", options_size);

Committed...
diff mbox

Patch

diff --git a/mount.cifs.c b/mount.cifs.c
index 3fd472a..7ee859b 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -2119,7 +2119,7 @@  int main(int argc, char **argv)
 mount_retry:
 	if (!currentaddress) {
 		fprintf(stderr, "Unable to find suitable address.\n");
-		rc = EX_SYSERR;
+		rc = EX_FAIL;
 		goto mount_exit;
 	}
 	strlcpy(options, "ip=", options_size);