X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=utils%2Fmount%2Fnfsumount.c;h=9b48cc9a63239d9c92eb89edf31cdfd56476ae72;hb=c7fa61e76f072d97a9bdb4a551aa2ba28e5818cc;hp=78ebd4aa0363839c91e816ab03f180cfb562d1a7;hpb=4f15bd6e3ebfebef16c1db61b28a98863c36cb81;p=nfs-utils.git diff --git a/utils/mount/nfsumount.c b/utils/mount/nfsumount.c index 78ebd4a..9b48cc9 100644 --- a/utils/mount/nfsumount.c +++ b/utils/mount/nfsumount.c @@ -182,14 +182,15 @@ static int nfs_umount_do_umnt(struct mount_options *options, return EX_FAIL; } - if (nfs_name_to_address(*hostname, AF_UNSPEC, sap, &salen)) { - if (nfs_advise_umount(sap, salen, &mnt_pmap, dirname) != 0) - return EX_SUCCESS; - else - nfs_error(_("%s: Server failed to unmount '%s:%s'"), - progname, *hostname, *dirname); - } - return EX_FAIL; + if (nfs_name_to_address(*hostname, sap, &salen) == 0) + /* nfs_name_to_address reports any errors */ + return EX_FAIL; + + if (nfs_advise_umount(sap, salen, &mnt_pmap, dirname) == 0) + /* nfs_advise_umount reports any errors */ + return EX_FAIL; + + return EX_SUCCESS; } /*