summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2004-01-15 01:31:01 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2004-01-15 01:31:01 (GMT)
commita0cc95fc21d36ee94c7fd8ffdd90c6dae41281ad (patch)
treea1a2716a7057181eaf76d0300885255bb97d7ce9
parent02eb9470615b0ca79e1c9b6806b9c9e9fb8260ae (diff)
downloadautofs3-a0cc95fc21d36ee94c7fd8ffdd90c6dae41281ad.zip
autofs3-a0cc95fc21d36ee94c7fd8ffdd90c6dae41281ad.tar.gz
autofs3-a0cc95fc21d36ee94c7fd8ffdd90c6dae41281ad.tar.bz2
autofs3-a0cc95fc21d36ee94c7fd8ffdd90c6dae41281ad.tar.xz
Fix autofs self-mounting
-rw-r--r--modules/mount_autofs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/mount_autofs.c b/modules/mount_autofs.c
index 3a5e84d..b11e9bf 100644
--- a/modules/mount_autofs.c
+++ b/modules/mount_autofs.c
@@ -72,11 +72,11 @@ int mount_mount(const char *root, const char *name, int name_len,
argc = 5;
if ( options ) {
- char *p = options;
+ char *p = options - 1;
do {
argc++;
if ( *p == ',' ) p++;
- } while ((p = strchr(p,',')) != NULL);
+ } while ((p = strchr(p + 1,',')) != NULL);
}
argv = (char **) alloca((argc+1) * sizeof(char *));