Lines Matching refs:dmap

126 freedmapent(devmap_t *dmap)
130 if ((darp = dmap->dmap_devarray) != NULL) {
133 free(dmap->dmap_devarray);
134 dmap->dmap_devarray = NULL;
171 devmap_t *dmap;
179 if ((dmap = dmap_interpret(interpdmline,
182 return (dmap);
199 devmap_t *dmap;
209 if ((dmap = dmap_interpretf(interpdmline,
212 if (dmap_matchname(dmap, name)) {
213 if ((dmap = dmap_dlexpand(dmap)) == NULL)
216 return (dmap);
218 freedmapent(dmap);
235 devmap_t *dmap;
243 if ((dmap = dmap_interpret(interpdmline,
246 if (dmap_matchdev(dmap, dev)) {
248 return (dmap);
250 freedmapent(dmap);
267 devmap_t *dmap;
275 if ((dmap = dmap_interpretf(interpdmline,
278 if (dmap->dmap_devtype != NULL &&
279 strcmp(type, dmap->dmap_devtype) == 0) {
280 if ((dmap = dmap_dlexpand(dmap)) == NULL)
282 return (dmap);
284 freedmapent(dmap);
323 dmap_match_one_dev(devmap_t *dmap, char *dargdev)
334 if (dmap->dmap_devarray == NULL)
337 for (dmapva = dmap->dmap_devarray; (dmvp = *dmapva) != NULL; dmapva++) {
349 typedev = da_str2flag(dmap->dmap_devtype);
433 dmap_matchdev(devmap_t *dmap, char *dev)
438 if (dmap->dmap_devarray == NULL)
440 for (dva = dmap->dmap_devarray; (dv = *dva) != NULL; dva ++) {
456 dmap_exact_dev(devmap_t *dmap, char *dev, int *num)
460 if ((dev == NULL) || (dmap->dmap_devname == NULL))
462 dv = dmap->dmap_devname;
463 dv += strcspn(dmap->dmap_devname, "0123456789");
466 /* during some add processes, dev can be shorter than dmap */
467 return (dmap_match_one_dev(dmap, dev));
476 dmap_matchtype(devmap_t *dmap, char *type)
478 if ((dmap->dmap_devtype == NULL) || (type == NULL))
481 return ((strcmp(dmap->dmap_devtype, type) == 0));
490 dmap_matchname(devmap_t *dmap, char *name)
492 if (dmap->dmap_devname == NULL)
495 return ((strcmp(dmap->dmap_devname, name) == 0));
505 dmap_physname(devmap_t *dmap)
510 if ((dmap == NULL) || (dmap->dmap_devarray == NULL) ||
511 (dmap->dmap_devarray[0] == NULL))
514 (void) strncpy(stage_link, dmap->dmap_devarray[0], sizeof (stage_link));
526 dm_match(devmap_t *dmap, da_args *dargs)
529 return (dmap_matchname(dmap, dargs->devinfo->devname));
531 return (dmap_matchtype(dmap, dargs->devinfo->devtype));