Lines Matching refs:descp
78 static void update_desc(descriptor_t *descp, disk_t *newdisksp,
80 static void update_desc_busp(descriptor_t *descp, bus_t *busp);
81 static void update_desc_ctrlp(descriptor_t *descp,
83 static void update_desc_diskp(descriptor_t *descp,
85 static void update_desc_pathp(descriptor_t *descp,
351 descriptor_t *descp; in cache_get_descriptors() local
360 descp = desc_listp; in cache_get_descriptors()
361 while (descp != NULL) { in cache_get_descriptors()
362 if (descp->type == type && descp->p.generic != NULL) { in cache_get_descriptors()
365 descp = descp->next; in cache_get_descriptors()
375 descp = desc_listp; in cache_get_descriptors()
376 while (descp != NULL) { in cache_get_descriptors()
377 if (descp->type == type && descp->p.generic != NULL) { in cache_get_descriptors()
379 descp->refcnt++; in cache_get_descriptors()
380 descs[pos++] = descp; in cache_get_descriptors()
382 descp = descp->next; in cache_get_descriptors()
403 descriptor_t *descp; in cache_is_valid_desc() local
405 for (descp = desc_listp; descp != NULL; descp = descp->next) { in cache_is_valid_desc()
406 if (descp == d) { in cache_is_valid_desc()
491 descriptor_t *descp; in clear_descriptors() local
493 for (descp = desc_listp; descp != NULL; descp = descp->next) { in clear_descriptors()
494 if (descp->p.generic == gp) { in clear_descriptors()
496 descp->p.generic = NULL; in clear_descriptors()
605 descriptor_t *descp; in have_desc() local
615 descp = desc_listp; in have_desc()
616 while (descp != NULL) { in have_desc()
617 if (descp->type == type && descp->p.generic == gp && in have_desc()
618 libdiskmgt_str_eq(descp->name, name)) { in have_desc()
621 if (libdiskmgt_str_eq(descp->secondary_name, in have_desc()
623 return (descp); in have_desc()
626 return (descp); in have_desc()
629 descp = descp->next; in have_desc()
851 descriptor_t *descp; in rewalk_tree() local
854 descp = desc_listp; in rewalk_tree()
855 while (descp != NULL) { in rewalk_tree()
856 update_desc(descp, args.disk_listp, in rewalk_tree()
858 descp = descp->next; in rewalk_tree()
908 update_desc(descriptor_t *descp, disk_t *newdisksp, controller_t *newctrlp, in update_desc() argument
912 if (descp->p.generic == NULL) { in update_desc()
921 switch (descp->type) { in update_desc()
923 update_desc_busp(descp, newbusp); in update_desc()
926 update_desc_ctrlp(descp, newctrlp); in update_desc()
929 update_desc_pathp(descp, newctrlp); in update_desc()
932 update_desc_diskp(descp, newdisksp); in update_desc()
938 update_desc_busp(descriptor_t *descp, bus_t *busp) in update_desc_busp() argument
942 if (libdiskmgt_str_eq(descp->p.bus->name, busp->name)) { in update_desc_busp()
943 descp->p.bus = busp; in update_desc_busp()
949 descp->p.bus = NULL; in update_desc_busp()
953 update_desc_ctrlp(descriptor_t *descp, controller_t *newctrlp) in update_desc_ctrlp() argument
957 if (libdiskmgt_str_eq(descp->p.controller->name, in update_desc_ctrlp()
959 descp->p.controller = newctrlp; in update_desc_ctrlp()
965 descp->p.controller = NULL; in update_desc_ctrlp()
969 update_desc_diskp(descriptor_t *descp, disk_t *newdisksp) in update_desc_diskp() argument
973 if (match_disk(descp->p.disk, newdisksp)) { in update_desc_diskp()
974 descp->p.disk = newdisksp; in update_desc_diskp()
980 descp->p.disk = NULL; in update_desc_diskp()
984 update_desc_pathp(descriptor_t *descp, controller_t *newctrlp) in update_desc_pathp() argument
995 if (libdiskmgt_str_eq(descp->p.path->name, in update_desc_pathp()
997 descp->p.path = pp[i]; in update_desc_pathp()
1005 descp->p.path = NULL; in update_desc_pathp()