2001-09-03 Michael A Chase <mchase@ix.netcom.com>
+ * mount.cc (mount_commands): Don't write /cygdrive/u mount points.
+
+2001-09-03 Michael A Chase <mchase@ix.netcom.com>
+
* mount.cc (longopts): Add mount-commands to options list.
(usage): Add mount-commands option.
(mount_commands): New function. Write commands to recreate current
`print_users'.
2001-04-15 Michael A Chase <mchase@ix.netcom.com>
-
+
* mount.cc (longopts): Add help to options list.
(opts): Add 'h' to options string.
* umount.cc (longopts): Add help to options list.
// write mount commands for user and system mount points
while ((p = getmntent (m)) != NULL) {
- strcpy(opts, " -f");
- if (p->mnt_type[0] == 'u')
- strcat (opts, " -u");
- else if (p->mnt_type[0] == 's')
- strcat (opts, " -s");
- if (p->mnt_opts[0] == 'b')
- strcat (opts, " -b");
- else if (p->mnt_opts[0] == 't')
- strcat (opts, " -t");
- if (strstr (p->mnt_opts, ",exec"))
- strcat (opts, " -x");
- while ((c = strchr (p->mnt_fsname, '\\')) != NULL)
- *c = '/';
- printf (format_mnt, opts, p->mnt_fsname, p->mnt_dir);
+ // Only list non-cygdrives
+ if (!strstr (p->mnt_opts, ",noumount")) {
+ strcpy(opts, " -f");
+ if (p->mnt_type[0] == 'u')
+ strcat (opts, " -u");
+ else if (p->mnt_type[0] == 's')
+ strcat (opts, " -s");
+ if (p->mnt_opts[0] == 'b')
+ strcat (opts, " -b");
+ else if (p->mnt_opts[0] == 't')
+ strcat (opts, " -t");
+ if (strstr (p->mnt_opts, ",exec"))
+ strcat (opts, " -x");
+ while ((c = strchr (p->mnt_fsname, '\\')) != NULL)
+ *c = '/';
+ printf (format_mnt, opts, p->mnt_fsname, p->mnt_dir);
+ }
}
endmntent (m);