diff options
author | Rohan Sable <rsable@redhat.com> | 2022-02-14 11:15:22 -0500 |
---|---|---|
committer | Steve Dickson <steved@redhat.com> | 2022-02-14 11:16:00 -0500 |
commit | c547ad481dca5bc0b0a2e365ebcff3439848f664 (patch) | |
tree | 2fd0090d9044efaf1c52dcb030336f5035061fd4 | |
parent | c9c6369451ba032ba7b4044ac0625a77a4e03c17 (diff) | |
download | nfs-utils-c547ad481dca5bc0b0a2e365ebcff3439848f664.tar.gz |
mount.nfs Fix error reporting for already mounted shares
When mount is triggered for an already mounted
share (using auto negotiation), it displays
"mount.nfs: Protocol not supported" or
"mount.nfs: access denied by server while mounting"
instead of EBUSY. This easily causes confusion if
the mount was not tried verbose :
Signed-off-by: Rohan Sable <rsable@redhat.com>
Signed-off-by: Yongcheng Yang <yoyang@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r-- | utils/mount/stropts.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/mount/stropts.c b/utils/mount/stropts.c index 3c4e218..573df6e 100644 --- a/utils/mount/stropts.c +++ b/utils/mount/stropts.c @@ -973,7 +973,9 @@ fall_back: if ((result = nfs_try_mount_v3v2(mi, FALSE))) return result; - errno = olderrno; + if (errno != EBUSY || errno != EACCES) + errno = olderrno; + return result; } |