mirror of
https://github.com/sheumann/hush.git
synced 2025-02-02 01:35:53 +00:00
"mount" now reports errors from nfsmount() and assumes NFS mount
if ':' is present in the device name - Pavel Roskin
This commit is contained in:
parent
68480dc30f
commit
680d65a646
@ -57,6 +57,8 @@
|
|||||||
* Implemented "rm -- <foo>"
|
* Implemented "rm -- <foo>"
|
||||||
* "which" rewritten to use stat(). Fixes to improve its compatability
|
* "which" rewritten to use stat(). Fixes to improve its compatability
|
||||||
with traditional implementations -- Pavel Roskin.
|
with traditional implementations -- Pavel Roskin.
|
||||||
|
* "mount" now reports errors from nfsmount() and assumes NFS mount
|
||||||
|
if ':' is present in the device name - Pavel Roskin
|
||||||
* More doc updates
|
* More doc updates
|
||||||
|
|
||||||
|
|
||||||
|
11
mount.c
11
mount.c
@ -483,11 +483,14 @@ extern int mount_main(int argc, char **argv)
|
|||||||
} else {
|
} else {
|
||||||
if (device && directory) {
|
if (device && directory) {
|
||||||
#ifdef BB_NFSMOUNT
|
#ifdef BB_NFSMOUNT
|
||||||
|
if (strchr(device, ':') != NULL)
|
||||||
|
filesystemType = "nfs";
|
||||||
if (strcmp(filesystemType, "nfs") == 0) {
|
if (strcmp(filesystemType, "nfs") == 0) {
|
||||||
if (nfsmount
|
int ret;
|
||||||
(device, directory, &flags, &extra_opts, &string_flags,
|
ret = nfsmount (device, directory, &flags,
|
||||||
1) != 0)
|
&extra_opts, &string_flags, 1);
|
||||||
exit(FALSE);
|
if (ret != 0)
|
||||||
|
fatalError("nfsmount failed: %s\n", strerror(errno));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
exit(mount_one(device, directory, filesystemType,
|
exit(mount_one(device, directory, filesystemType,
|
||||||
|
@ -483,11 +483,14 @@ extern int mount_main(int argc, char **argv)
|
|||||||
} else {
|
} else {
|
||||||
if (device && directory) {
|
if (device && directory) {
|
||||||
#ifdef BB_NFSMOUNT
|
#ifdef BB_NFSMOUNT
|
||||||
|
if (strchr(device, ':') != NULL)
|
||||||
|
filesystemType = "nfs";
|
||||||
if (strcmp(filesystemType, "nfs") == 0) {
|
if (strcmp(filesystemType, "nfs") == 0) {
|
||||||
if (nfsmount
|
int ret;
|
||||||
(device, directory, &flags, &extra_opts, &string_flags,
|
ret = nfsmount (device, directory, &flags,
|
||||||
1) != 0)
|
&extra_opts, &string_flags, 1);
|
||||||
exit(FALSE);
|
if (ret != 0)
|
||||||
|
fatalError("nfsmount failed: %s\n", strerror(errno));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
exit(mount_one(device, directory, filesystemType,
|
exit(mount_one(device, directory, filesystemType,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user