summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2013-06-28 21:33:14 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2013-06-28 21:33:14 +0000
commit9f08bad0a88ee70c3f222a6c3d70b681fc01ab03 (patch)
treed43217f90bbebce0c771d0da663e25feee978c7c
parentb40f3bdaba9e3416d927917bb02c7897d346adbd (diff)
downloadillumos-joyent-9f08bad0a88ee70c3f222a6c3d70b681fc01ab03.tar.gz
OS-2351 zone boot crosscheck_zonepaths is O(N^2)
-rw-r--r--usr/src/cmd/zoneadm/zoneadm.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/src/cmd/zoneadm/zoneadm.c b/usr/src/cmd/zoneadm/zoneadm.c
index 7e5ba5bbfb..81cd59ad70 100644
--- a/usr/src/cmd/zoneadm/zoneadm.c
+++ b/usr/src/cmd/zoneadm/zoneadm.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, Joyent Inc. All rights reserved.
+ * Copyright 2013, Joyent Inc. All rights reserved.
*/
/*
@@ -1013,8 +1013,12 @@ validate_zonepath(char *path, int cmd_num)
(void) printf(gettext("WARNING: %s is on a temporary "
"file system.\n"), rpath);
}
- if (crosscheck_zonepaths(rpath) != Z_OK)
- return (Z_ERR);
+ if (cmd_num != CMD_BOOT && cmd_num != CMD_REBOOT &&
+ cmd_num != CMD_READY) {
+ /* we checked when we installed, no need to check each boot */
+ if (crosscheck_zonepaths(rpath) != Z_OK)
+ return (Z_ERR);
+ }
/*
* Try to collect and report as many minor errors as possible
* before returning, so the user can learn everything that needs