summaryrefslogtreecommitdiff
path: root/usr/src/cmd/modload/update_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/modload/update_drv.c')
-rw-r--r--usr/src/cmd/modload/update_drv.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/usr/src/cmd/modload/update_drv.c b/usr/src/cmd/modload/update_drv.c
index 6b49f43a5f..8efbc6d7e9 100644
--- a/usr/src/cmd/modload/update_drv.c
+++ b/usr/src/cmd/modload/update_drv.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -270,7 +269,7 @@ main(int argc, char *argv[])
if (priv != NULL) {
(void) append_to_file(driver_name, priv, extra_privs,
- ',', ":");
+ ',', ":", 0);
cleanup_flag |= CLEAN_DRV_PRIV;
}
@@ -306,6 +305,17 @@ main(int argc, char *argv[])
return (error);
}
+ /*
+ * unless force_flag is specified check that
+ * path-oriented aliases we are adding exist
+ */
+ if ((force_flag == 0) &&
+ ((error = aliases_paths_exist(aliases)) == ERROR)) {
+ exit_unlock();
+
+ return (error);
+ }
+
/* update the file */
if ((error = update_driver_aliases(driver_name,
aliases)) == ERROR) {