Module Name: othersrc
Committed By: stacktic
Date: Tue Mar 24 09:04:15 UTC 2009
Modified Files:
othersrc/lib/libfsu_mount: fsu_mount.c
Log Message:
Allowed command line mount options to override env var FSU_MNTOPTS
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 othersrc/lib/libfsu_mount/fsu_mount.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: othersrc/lib/libfsu_mount/fsu_mount.c
diff -u othersrc/lib/libfsu_mount/fsu_mount.c:1.1 othersrc/lib/libfsu_mount/fsu_mount.c:1.2
--- othersrc/lib/libfsu_mount/fsu_mount.c:1.1 Mon Mar 23 20:54:13 2009
+++ othersrc/lib/libfsu_mount/fsu_mount.c Tue Mar 24 09:04:14 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: fsu_mount.c,v 1.1 2009/03/23 20:54:13 stacktic Exp $ */
+/* $NetBSD: fsu_mount.c,v 1.2 2009/03/24 09:04:14 stacktic Exp $ */
/*
* Copyright (c) 2008 Arnaud Ysmal. All Rights Reserved.
@@ -169,7 +169,6 @@
#endif
fst = NULL;
ukfs = NULL;
- mntopts = getenv("FSU_MNTOPTS");
ukfs_init();
ukfs_modload_dir("/usr/lib");
@@ -189,8 +188,10 @@
}
break;
case 'o':
- if (mntopts == NULL)
+ if (mntopts == NULL) {
mntopts = optarg;
+ setenv("FSU_MNTOPTS", optarg, 1);
+ }
break;
#ifdef WITH_SYSPUFFS
case 'p':
@@ -222,6 +223,9 @@
idx = optind;
optind = optreset = 1;
+ if (mntopts == NULL)
+ mntopts = getenv("FSU_MNTOPTS");
+
if (fsu_readonly) {
if (mntopts == NULL)
mntopts = strdup("ro");