Merge branch 'dracut'
[zfs.git] / cmd / mount_zfs / mount_zfs.c
index 204f9fa..aff9e10 100644 (file)
@@ -228,7 +228,9 @@ parse_dataset(char *dataset)
        char cwd[PATH_MAX];
        int len;
 
-       (void) getcwd(cwd, PATH_MAX);
+       if (getcwd(cwd, PATH_MAX) == NULL)
+               return (dataset);
+
        len = strlen(cwd);
 
        /* Do not add one when cwd already ends in a trailing '/' */