SCCS-vsn: sbin/mount/mount.c 5.6
#endif not lint
#ifndef lint
#endif not lint
#ifndef lint
-static char sccsid[] = "@(#)mount.c 5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)mount.c 5.6 (Berkeley) %G%";
#endif not lint
#include <sys/param.h>
#endif not lint
#include <sys/param.h>
register struct mtab *mp;
register struct fstab *fs;
register int cnt;
register struct mtab *mp;
register struct fstab *fs;
register int cnt;
+ int all, ch, fd, rval, sfake;
- while ((fs = getfsent()))
- if (strcmp(fs->fs_file, "/") && !BADTYPE(fs->fs_type))
- rval |= mountfs(fs->fs_spec, fs->fs_file,
- type ? type : fs->fs_type);
+ for (sfake = fake; fs = getfsent(); fake = sfake) {
+ if (BADTYPE(fs->fs_type))
+ continue;
+ /* `/' is special, it's always mounted */
+ if (!strcmp(fs->fs_file, "/"))
+ fake = 1;
+ rval |= mountfs(fs->fs_spec, fs->fs_file,
+ type ? type : fs->fs_type);
+ }