summaryrefslogtreecommitdiff
path: root/usr/src/lib/libdiskmgt/common/entry.c
diff options
context:
space:
mode:
authorsjelinek <none@none>2005-12-13 10:24:52 -0800
committersjelinek <none@none>2005-12-13 10:24:52 -0800
commit82d71480b3c112fa91f04032225eda15dfe22e17 (patch)
tree4290edb7eb9dba70e31031466e202b8545c3fc50 /usr/src/lib/libdiskmgt/common/entry.c
parent4ab75253616c6d68e967c10221bb663c0bfa99df (diff)
downloadillumos-joyent-82d71480b3c112fa91f04032225eda15dfe22e17.tar.gz
6349487 libdiskmgt should bypass all calls in dm_inuse when NOINUSE_CHECK is set
6359855 gcc still doesn't like cmd/fs.d/switchout.c 6354408 libdiskmgt needs to handle sysevent failures in miniroot or failsafe environments better 4896568 *mount* message for remounting read-only is bogus Contributed by Shawn Walker. 4995011 mountfs error timeout is 60ms instead of 60s Contributed by Jeremy Teo.
Diffstat (limited to 'usr/src/lib/libdiskmgt/common/entry.c')
-rw-r--r--usr/src/lib/libdiskmgt/common/entry.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr/src/lib/libdiskmgt/common/entry.c b/usr/src/lib/libdiskmgt/common/entry.c
index ac08b47b7f..bf8f703f42 100644
--- a/usr/src/lib/libdiskmgt/common/entry.c
+++ b/usr/src/lib/libdiskmgt/common/entry.c
@@ -443,7 +443,7 @@ dm_get_stats(dm_descriptor_t desc, int stat_type, int *errp)
* the in use checking if the user has set stat_type
* DM_SLICE_STAT_USE
*/
- if (getenv("NOINUSE_CHECK") != NULL) {
+ if (NOINUSE_SET) {
stats = NULL;
break;
}
@@ -571,9 +571,17 @@ dm_inuse(char *dev_name, char **msg, dm_who_type_t who, int *errp)
int found = 0;
char *dname = NULL;
+
*errp = 0;
*msg = NULL;
+ /*
+ * If the user doesn't want to do in use checking, return.
+ */
+
+ if (NOINUSE_SET)
+ return (0);
+
dname = getfullblkname(dev_name);
/*
* If we cannot find the block name, we cannot check the device