summaryrefslogtreecommitdiffstats
path: root/sbin/mdmfs/mdmfs.c
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-09-30 15:14:16 +0000
committeriedowse <iedowse@FreeBSD.org>2001-09-30 15:14:16 +0000
commit48a6a5bbb652cfc44e0726508644ad35c05e01f5 (patch)
tree39a3673a2dc41cf8b6ace20096bddfc1ddf1e8ff /sbin/mdmfs/mdmfs.c
parent71c1cedf5517c78c1753b5eed71fa0e582913980 (diff)
downloadFreeBSD-src-48a6a5bbb652cfc44e0726508644ad35c05e01f5.zip
FreeBSD-src-48a6a5bbb652cfc44e0726508644ad35c05e01f5.tar.gz
Enable bug-for-bug compatibility with mount_mfs when the program
name is "mount_mfs" or "mfs". Previously, the condition was that the program name must start with "mount_", but this both missed the case where mount(8) invokes mdmfs with argv[0] = "mfs", and it included cases such as "mount_md" where compatibility is not required. Reviewed by: dd
Diffstat (limited to 'sbin/mdmfs/mdmfs.c')
-rw-r--r--sbin/mdmfs/mdmfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c
index 62a3316..9c59db7 100644
--- a/sbin/mdmfs/mdmfs.c
+++ b/sbin/mdmfs/mdmfs.c
@@ -116,8 +116,9 @@ main(int argc, char **argv)
newfs_arg = strdup("");
mount_arg = strdup("");
- /* If we were started as mount_*, imply -C. */
- if (strncmp(getprogname(), "mount_", 6) == 0)
+ /* If we were started as mount_mfs or mfs, imply -C. */
+ if (strcmp(getprogname(), "mount_mfs") == 0 ||
+ strcmp(getprogname(), "mfs") == 0)
compat = true;
while ((ch = getopt(argc, argv,
OpenPOWER on IntegriCloud