mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
Sync with other mount_*fs(8) utilities; we don't need to try to
load the smbfs module because the mount(2) syscall will do it if it's needed.
This commit is contained in:
parent
6707138161
commit
24449958e4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=128140
|
@ -75,16 +75,14 @@ main(int argc, char *argv[])
|
||||||
#ifdef APPLE
|
#ifdef APPLE
|
||||||
extern void dropsuid();
|
extern void dropsuid();
|
||||||
extern int loadsmbvfs();
|
extern int loadsmbvfs();
|
||||||
#else
|
#endif
|
||||||
struct xvfsconf vfc;
|
|
||||||
#endif /* APPLE */
|
|
||||||
char *next;
|
char *next;
|
||||||
int opt, error, mntflags, caseopt;
|
int opt, error, mntflags, caseopt;
|
||||||
|
|
||||||
|
|
||||||
#ifdef APPLE
|
#ifdef APPLE
|
||||||
dropsuid();
|
dropsuid();
|
||||||
#endif /* APPLE */
|
#endif
|
||||||
if (argc == 2) {
|
if (argc == 2) {
|
||||||
if (strcmp(argv[1], "-h") == 0) {
|
if (strcmp(argv[1], "-h") == 0) {
|
||||||
usage();
|
usage();
|
||||||
|
@ -99,17 +97,9 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
#ifdef APPLE
|
#ifdef APPLE
|
||||||
error = loadsmbvfs();
|
error = loadsmbvfs();
|
||||||
#else
|
|
||||||
error = getvfsbyname(SMBFS_VFSNAME, &vfc);
|
|
||||||
if (error && vfsisloadable(SMBFS_VFSNAME)) {
|
|
||||||
if(vfsload(SMBFS_VFSNAME))
|
|
||||||
err(EX_OSERR, "vfsload("SMBFS_VFSNAME")");
|
|
||||||
endvfsent();
|
|
||||||
error = getvfsbyname(SMBFS_VFSNAME, &vfc);
|
|
||||||
}
|
|
||||||
#endif /* APPLE */
|
|
||||||
if (error)
|
if (error)
|
||||||
errx(EX_OSERR, "SMB filesystem is not available");
|
errx(EX_OSERR, "SMB filesystem is not available");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (smb_lib_init() != 0)
|
if (smb_lib_init() != 0)
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
Loading…
Reference in a new issue