Lines Matching refs:dev
178 if (rsrc->dev == devt)
223 cache_create(const char *resource, dev_t dev)
229 rsrc->dev = dev;
254 dev_t dev;
256 (void) get_devpath((char *)resource, NULL, &dev);
257 rsrc = cache_create(resource, dev);
445 major(link->user->dev), minor(link->user->dev),
446 major(link->used->dev), minor(link->used->dev),
452 if (link->user->dev == NODEV || link->used->dev == NODEV) {
460 if (major(link->user->dev) == major(link->used->dev)) {
470 if (link->used->dev == cn_dev) {
515 as.ttymux_ldev = link->used->dev;
534 as.ttymux_udev = link->user->dev;
535 as.ttymux_ldev = link->used->dev;
610 major(link->user->dev), minor(link->user->dev),
611 major(link->used->dev), minor(link->used->dev)));
613 as.ttymux_ldev = link->used->dev;
619 major(link->used->dev), minor(link->used->dev), errno));
639 errno, major(link->used->dev), minor(link->used->dev));
658 get_devpath(char *dev, char **cname, dev_t *devt)
668 if (lstat(dev, &sb) < 0) {
674 if (stat(dev, &sb) < 0)
677 lsz = readlink(dev, linkbuf, PATH_MAX);
682 dev = strstr(linkbuf, "/devices");
683 if (dev == NULL)
688 *cname = strdup(dev);
725 rsrc->dev = di_minor_devt(minor);
732 * Find a devinfo node that matches the device argument (dev).
736 locate_node(dev_t dev, di_node_t *root)
742 if ((rsrc = cache_lookup_bydevt(dev)) != NULL)
745 (void) di_walk_minor(*root, NULL, 0, (void*)dev, locate_dev);
747 return (cache_lookup_bydevt(dev));
855 if (rsrc->dev == NODEV) {
864 (void) get_devpath(rsrc->id, NULL, &rsrc->dev);
865 if (rsrc->dev == NODEV) {