Lines Matching defs:devpath
136 char *devpath = NULL;
156 err = nvlist_lookup_string(nvl, FM_FMRI_DEV_PATH, &devpath);
157 if (err != 0 || devpath == NULL)
180 * device-path part; the devpath should always start with a /
192 topo_fmristr_build(&size, buf, buflen, devpath,
239 char *devpath;
257 * an empty devpath string.
272 * If not a colon then it must be the / that begins the devpath.
278 * Look ahead to the "/" that starts the devpath. If not
281 eos = devpath = strchr(cur, '/');
282 if (devpath == NULL || devpath == cur + 1)
288 * Replace the initial "/" of the devpath with a NUL
290 * before rendering devpath.
333 cur = devpath; /* initial slash is NULled */
338 devpath = cur;
354 *devpath = '/'; /* we NULed this earlier; put it back */
356 /* step over repeated initial / in the devpath */
357 while (*(devpath + 1) == '/')
358 devpath++;
360 err |= nvlist_add_string(fmri, FM_FMRI_DEV_PATH, devpath);
378 char *devpath = NULL;
392 nvlist_lookup_string(in, FM_FMRI_DEV_PATH, &devpath) != 0)
397 if (devpath == NULL || strlen(devpath) == 0)
406 len = strlen(devpath) + strlen("/devices") + 1;
408 (void) snprintf(path, len, "/devices%s", devpath);
415 if (di_lookup_node(dnode, devpath) == DI_NODE_NIL)
424 else if ((dnode = di_init(devpath, DINFOCPYONE)) == DI_NODE_NIL)
458 char *devpath = NULL;
472 nvlist_lookup_string(in, FM_FMRI_DEV_PATH, &devpath) != 0)
477 if (devpath == NULL || strlen(devpath) == 0)
486 len = strlen(devpath) + strlen("/devices") + 1;
488 (void) snprintf(path, len, "/devices%s", devpath);
495 if (di_lookup_node(dnode, devpath) == DI_NODE_NIL)
504 else if ((dnode = di_init(devpath, DINFOCPYONE)) == DI_NODE_NIL)
539 char *devpath = NULL;
548 nvlist_lookup_string(in, FM_FMRI_DEV_PATH, &devpath) != 0)
551 if (devpath == NULL)
554 if ((dnode = di_init(devpath, DINFOCPYONE)) == DI_NODE_NIL) {
586 char *devpath = NULL;
595 nvlist_lookup_string(in, FM_FMRI_DEV_PATH, &devpath) != 0)
598 if (devpath == NULL)
601 if ((dnode = di_init(devpath, DINFOCPYONE)) == DI_NODE_NIL) {