Made sure an error code is issued for failed mounts

In case of failure to mount a file system, an error code is expected to
indicate the failure reason. In an unclear case the error code was not
set, so force an EIO when this happens.
edge.strict_endians^2
Jean-Pierre André 2021-05-17 15:42:31 +03:00 committed by Erik Larsson
parent d86c34390d
commit a4177d625c
2 changed files with 8 additions and 2 deletions

View File

@ -4368,9 +4368,12 @@ static int ntfs_open(const char *device)
}
errno = 0;
goto out;
err_out:
if (!errno) /* Make sure to return an error */
errno = EIO;
out :
return ntfs_volume_error(errno);
}
static void usage(void)

View File

@ -4076,9 +4076,12 @@ static int ntfs_open(const char *device)
}
errno = 0;
goto out;
err_out:
if (!errno)
errno = EIO;
out :
return ntfs_volume_error(errno);
}
static void usage(void)