summaryrefslogtreecommitdiff
path: root/usr/src/cmd/devfsadm/devfsadm.c
diff options
context:
space:
mode:
authorhtk <none@none>2008-02-14 10:00:25 -0800
committerhtk <none@none>2008-02-14 10:00:25 -0800
commit98a9beefeb2f57a7bb33750eef5fc3fc960575ba (patch)
tree51ef583ad51f3b78d4dedbc90c38d07c84f402cf /usr/src/cmd/devfsadm/devfsadm.c
parent7a9d7716b53eb5c2c08bf4f0fdf4369571dbde4d (diff)
downloadillumos-joyent-98a9beefeb2f57a7bb33750eef5fc3fc960575ba.tar.gz
6627468 The fix for CR# 6274924 has a side-effect such that process_devinfo_tree() takes longer to complete.
Diffstat (limited to 'usr/src/cmd/devfsadm/devfsadm.c')
-rw-r--r--usr/src/cmd/devfsadm/devfsadm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr/src/cmd/devfsadm/devfsadm.c b/usr/src/cmd/devfsadm/devfsadm.c
index e2dfed2871..c7ccb7826c 100644
--- a/usr/src/cmd/devfsadm/devfsadm.c
+++ b/usr/src/cmd/devfsadm/devfsadm.c
@@ -1057,15 +1057,14 @@ process_deferred_links(struct dca_impl *dcip, int flags)
* Called in non-daemon mode to take a snap shot of the devinfo tree.
* Then it calls the appropriate functions to build /devices and /dev.
* It also flushes path_to_inst.
- * DINFOCACHE snapshot needs to be updated when devfsadm is run.
- * This will only happen if the flags that devfsadm uses matches the flags
- * that DINFOCACHE uses and that is why flags is set to
- * DI_CACHE_SNAPSHOT_FLAGS.
+ * Except in the devfsadm -i (single driver case), the flags used by devfsadm
+ * needs to match DI_CACHE_SNAPSHOT_FLAGS. That will make DINFOCACHE snapshot
+ * updated.
*/
void
process_devinfo_tree()
{
- uint_t flags = DI_CACHE_SNAPSHOT_FLAGS;
+ uint_t flags;
struct dca_impl dci;
char name[MAXNAMELEN];
char *fcn = "process_devinfo_tree: ";
@@ -1095,6 +1094,7 @@ process_devinfo_tree()
dci.dci_flags |= DCA_LOAD_DRV;
(void) snprintf(name, sizeof (name), "%s", driver);
dci.dci_driver = name;
+ flags = DINFOCPYALL | DINFOPATH;
} else if (load_attach_drv == TRUE) {
/*
@@ -1107,7 +1107,7 @@ process_devinfo_tree()
vprint(CHATTY_MID, "%susing snapshot cache\n", fcn);
} else {
vprint(CHATTY_MID, "%sattaching all drivers\n", fcn);
- flags |= DINFOFORCE;
+ flags = DI_CACHE_SNAPSHOT_FLAGS;
if (cleanup) {
/*
* remove dangling entries from /etc/devices