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
parent
d86c34390d
commit
a4177d625c
|
|
@ -4368,9 +4368,12 @@ static int ntfs_open(const char *device)
|
||||||
}
|
}
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
goto out;
|
||||||
err_out:
|
err_out:
|
||||||
|
if (!errno) /* Make sure to return an error */
|
||||||
|
errno = EIO;
|
||||||
|
out :
|
||||||
return ntfs_volume_error(errno);
|
return ntfs_volume_error(errno);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
|
|
|
||||||
|
|
@ -4076,9 +4076,12 @@ static int ntfs_open(const char *device)
|
||||||
}
|
}
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
goto out;
|
||||||
err_out:
|
err_out:
|
||||||
|
if (!errno)
|
||||||
|
errno = EIO;
|
||||||
|
out :
|
||||||
return ntfs_volume_error(errno);
|
return ntfs_volume_error(errno);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue