Module Name: othersrc
Committed By: stacktic
Date: Fri Mar 5 19:37:42 UTC 2010
Modified Files:
othersrc/lib/libfsu_mount: fsu_mount.c
Log Message:
Set env vars before returning from fsu_mount
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 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.18 othersrc/lib/libfsu_mount/fsu_mount.c:1.19
--- othersrc/lib/libfsu_mount/fsu_mount.c:1.18 Sun Dec 13 20:57:25 2009
+++ othersrc/lib/libfsu_mount/fsu_mount.c Fri Mar 5 19:37:41 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: fsu_mount.c,v 1.18 2009/12/13 20:57:25 pooka Exp $ */
+/* $NetBSD: fsu_mount.c,v 1.19 2010/03/05 19:37:41 stacktic Exp $ */
/*
* Copyright (c) 2008,2009 Arnaud Ysmal. All Rights Reserved.
@@ -119,16 +119,14 @@
#endif
alias = NULL;
- puffsexec = specopts = mntopts = NULL;
+ fsdevice = fstype = mntopts = puffsexec = specopts = NULL;
fst = NULL;
ukfs = NULL;
- fstype = fsdevice = NULL;
fflag = 0;
memset(&mntd, 0, sizeof(mntd));
ukfs_init();
ukfs_modload_dir(RUMP_LIBDIR);
-
/*
* [-o mnt_args] [-t fstype] [-p puffsexec] fsdevice
*/
@@ -198,7 +196,7 @@
}
if (fstype == NULL)
- fstype = getenv("FSU_FSTYPE");
+ fstype = getenv("FSU_TYPE");
if (fstype != NULL && fst == NULL) {
for (fst = fslist; fst->fs_name != NULL; ++fst)
@@ -243,6 +241,7 @@
}
free(mntd.mntd_argv);
+ mntd.mntd_argv = NULL;
mntd.mntd_argv_size = 0;
if (ukfs == NULL)
@@ -274,6 +273,9 @@
#ifndef __linux__
optreset = 1;
#endif
+ setenv("FSU_DEVICE", fsdevice, 1);
+ setenv("FSU_TYPE", mntd.mntd_fs->fs_name, 1);
+ setenv("FSU_CWD", path != NULL ? path : "/", 1);
return ukfs;
}