summaryrefslogtreecommitdiff
path: root/usr/src/cmd/devfsadm/devfsadm.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/devfsadm/devfsadm.c')
-rw-r--r--usr/src/cmd/devfsadm/devfsadm.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/usr/src/cmd/devfsadm/devfsadm.c b/usr/src/cmd/devfsadm/devfsadm.c
index f81d5b5d67..52f4f4c0da 100644
--- a/usr/src/cmd/devfsadm/devfsadm.c
+++ b/usr/src/cmd/devfsadm/devfsadm.c
@@ -23,6 +23,7 @@
* Copyright 2016 Toomas Soome <tsoome@me.com>
* Copyright 2016 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2019, Joyent, Inc.
*/
/*
@@ -2073,6 +2074,16 @@ class_ok(char *class)
return (DEVFSADM_SUCCESS);
}
+ /*
+ * Some create tabs operate on multiple classes of devices because the
+ * kernel doesn't have a good way for a driver to indicate that a
+ * particular minor's class is different from that of the dev_info_t
+ * it belongs to. As such, we'll always fail to match those here.
+ */
+ if (class == NULL) {
+ return (DEVFSADM_FAILURE);
+ }
+
for (i = 0; i < num_classes; i++) {
if (strcmp(class, classes[i]) == 0) {
return (DEVFSADM_SUCCESS);
@@ -3717,10 +3728,10 @@ do_inst_sync(char *filename, char *instfilename)
* safely, the database is flushed to a temporary file, then moved into place.
*
* The following files are used during this process:
- * /etc/path_to_inst: The path_to_inst file
- * /etc/path_to_inst.<pid>: Contains data flushed from the kernel
- * /etc/path_to_inst.old: The backup file
- * /etc/path_to_inst.old.<pid>: Temp file for creating backup
+ * /etc/path_to_inst: The path_to_inst file
+ * /etc/path_to_inst.<pid>: Contains data flushed from the kernel
+ * /etc/path_to_inst.old: The backup file
+ * /etc/path_to_inst.old.<pid>: Temp file for creating backup
*
*/
static void
@@ -7803,7 +7814,7 @@ add_verbose_id(char *mid)
* returns DEVFSADM_TRUE if contents is a minor node in /devices.
* If mn_root is not NULL, mn_root is set to:
* if contents is a /dev node, mn_root = contents
- * OR
+ * OR
* if contents is a /devices node, mn_root set to the '/'
* following /devices.
*/