1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-01 08:27:59 +00:00

Close PR#17. This may be a contraversal fix in that now mount will

spit out two error lines for a bogus filesystem type, e.g:

root@time-> mount -t foo /dev/sd0a /mnt
mount: exec /sbin/mount_foo for /mnt: No such file or directory
mount: exec /usr/sbin/mount_foo for /mnt: No such file or directory

But I would submit that if you're even going to scan multiple directories
for a mount_foo (which I actually think is somewhat bogus - if it's not
in /sbin, you're probably in big trouble anyway), you should emit an error
for each one.  I got multiple complaints (in addition to the PR) that the
existing behavior was very confusing.
This commit is contained in:
Jordan K. Hubbard 1996-03-03 08:44:22 +00:00
parent af6646cdc5
commit 66fa281751
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14350
2 changed files with 2 additions and 10 deletions

View File

@ -332,12 +332,8 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
(void)snprintf(execname,
sizeof(execname), "%s/mount_%s", *edir, vfstype);
execv(execname, (char * const *)argv);
if (errno != ENOENT)
warn("exec %s for %s", execname, name);
} while (*++edir != NULL);
if (errno == ENOENT)
warn("exec %s for %s", execname, name);
} while (*++edir != NULL);
exit(1);
/* NOTREACHED */
default: /* Parent. */

View File

@ -332,12 +332,8 @@ mountfs(vfstype, spec, name, flags, options, mntopts)
(void)snprintf(execname,
sizeof(execname), "%s/mount_%s", *edir, vfstype);
execv(execname, (char * const *)argv);
if (errno != ENOENT)
warn("exec %s for %s", execname, name);
} while (*++edir != NULL);
if (errno == ENOENT)
warn("exec %s for %s", execname, name);
} while (*++edir != NULL);
exit(1);
/* NOTREACHED */
default: /* Parent. */