]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/stropts.c
The text-based mount command displays the rather inexplicable "mount:
[nfs-utils.git] / utils / mount / stropts.c
index 967fd69531f7a338b13fe7b7775ea3d991bf2af2..c8148c42a4ed7b1a6ba42c05aaf1fe0f585b390c 100644 (file)
@@ -356,12 +356,13 @@ static struct mount_options *rewrite_mount_options(char *str)
        clnt_addr_t nfs_server = { };
        int p;
 
-       errno = EIO;
-
        options = po_split(str);
-       if (!options)
+       if (!options) {
+               errno = EFAULT;
                return NULL;
+       }
 
+       errno = EINVAL;
        option = po_get(options, "addr");
        if (option) {
                nfs_server.saddr.sin_family = AF_INET;