summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-21 22:17:39 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-21 22:17:39 +0000
commit9745e326948de398ee440cbad5652fd4fd9b3f13 (patch)
tree4be53f71d4d417b861063236468906b078105269
parent4809941d301253e084c694c799d75e4fec01f647 (diff)
argv[0] for children is mount_XXX instead of simply XXX
-rw-r--r--sbin/mount/mount.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c
index 8324ce0a461..c6755791646 100644
--- a/sbin/mount/mount.c
+++ b/sbin/mount/mount.c
@@ -292,6 +292,7 @@ mountfs(vfstype, spec, name, flags, options, mntopts, skipmounted)
pid_t pid;
int argc, i, status;
char *optbuf, execname[MAXPATHLEN + 1], mntpath[MAXPATHLEN];
+ char mountname[MAXPATHLEN];
if (realpath(name, mntpath) == NULL) {
warn("realpath %s", name);
@@ -369,6 +370,9 @@ mountfs(vfstype, spec, name, flags, options, mntopts, skipmounted)
do {
(void)snprintf(execname,
sizeof(execname), "%s/mount_%s", *edir, vfstype);
+ (void)snprintf(mountname,
+ sizeof(mountname), "mount_%s", vfstype);
+ argv[0] = mountname;
execv(execname, (char * const *)argv);
if (errno != ENOENT)
warn("exec %s for %s", execname, name);