/illumos-gate/usr/src/boot/efi/libefi/ |
H A D | devpath.c | 54 devpath = NULL; in efi_lookup_image_devpath() 55 return (devpath); in efi_lookup_image_devpath() 67 devpath = NULL; in efi_lookup_devpath() 68 return (devpath); in efi_lookup_devpath() 88 if (devpath == NULL) in efi_devpath_name() 117 devpath = NextDevicePathNode(devpath); in efi_devpath_last_node() 118 return (devpath); in efi_devpath_last_node() 128 devpath = NextDevicePathNode(devpath); in efi_devpath_next_instance() 131 devpath = NextDevicePathNode(devpath); in efi_devpath_next_instance() 135 return (devpath); in efi_devpath_next_instance() [all …]
|
/illumos-gate/usr/src/lib/fm/topo/libtopo/common/ |
H A D | dev.c | 136 char *devpath = NULL; in fmri_nvl2str() local 239 char *devpath; in dev_fmri_str2nvl() local 282 if (devpath == NULL || devpath == cur + 1) in dev_fmri_str2nvl() 338 devpath = cur; in dev_fmri_str2nvl() 358 devpath++; in dev_fmri_str2nvl() 378 char *devpath = NULL; in dev_fmri_present() local 397 if (devpath == NULL || strlen(devpath) == 0) in dev_fmri_present() 458 char *devpath = NULL; in dev_fmri_replaced() local 477 if (devpath == NULL || strlen(devpath) == 0) in dev_fmri_replaced() 551 if (devpath == NULL) in dev_fmri_unusable() [all …]
|
/illumos-gate/usr/src/cmd/fwflash/plugins/transport/common/ |
H A D | sd.c | 69 #define FW_SD_FREE_DEVPATH(devpath) { \ argument 70 di_devfs_path_free((devpath)); \ 74 FW_SD_FREE_DEVPATH((devpath)) \ 86 FW_SD_FREE_CLS_NAME(thisdev, devpath) \ 500 char *devpath = NULL; in fw_identify() local 545 "%s\n", driver, devpath); in fw_identify() 546 FW_SD_FREE_DEVPATH(devpath) in fw_identify() 557 FW_SD_FREE_DEVPATH(devpath) in fw_identify() 628 FW_SD_FREE_ADDR(newdev, devpath) in fw_identify() 657 FW_SD_FREE_IDENT(newdev, devpath) in fw_identify() [all …]
|
H A D | ses.c | 293 char *devpath; in fw_identify() local 331 devpath = di_devfs_path(thisnode); in fw_identify() 339 free(devpath); in fw_identify() 352 free(devpath); in fw_identify() 367 free(devpath); in fw_identify() 382 free(devpath); in fw_identify() 406 free(devpath); in fw_identify() 421 free(devpath); in fw_identify() 440 free(devpath); in fw_identify() 457 free(devpath); in fw_identify() [all …]
|
/illumos-gate/usr/src/lib/sun_sas/common/ |
H A D | devtree_device_disco.c | 49 if ((strstr(devpath, "/st@")) || (strstr(devpath, "/tape@"))) { in get_minor() 53 } else if ((strstr(devpath, "/ssd@")) || (strstr(devpath, "/sd@")) || in get_minor() 56 } else if ((strstr(devpath, "/ses@")) || (strstr(devpath, in get_minor() 59 devpath, ":0"); in get_minor() 76 devpath); in get_minor() 255 " Skipping.", devpath); in get_attached_devices_info() 256 di_devfs_path_free(devpath); in get_attached_devices_info() 265 devpath); in get_attached_devices_info() 271 DEVICES_DIR, devpath); in get_attached_devices_info() 297 di_devfs_path_free(devpath); in get_attached_devices_info() [all …]
|
H A D | Sun_sasRefreshAdapterConfiguration.c | 42 char *devpath, fulldevpath[MAXPATHLEN]; in find_matching_hba() local 54 if ((devpath = di_devfs_path(node)) == NULL) { in find_matching_hba() 59 devpath); in find_matching_hba() 61 if ((strstr(fulldevpath, wa->devpath)) != NULL) { in find_matching_hba() 64 di_devfs_path_free(devpath); in find_matching_hba() 67 di_devfs_path_free(devpath); in find_matching_hba() 120 wa.devpath = hba_ptr->device_path; in Sun_sasRefreshAdapterConfiguration()
|
H A D | Sun_sasRefreshInformation.c | 39 char *devpath, fulldevpath[MAXPATHLEN]; in match_smhba_sas_hba() local 51 if ((devpath = di_devfs_path(node)) == NULL) { in match_smhba_sas_hba() 56 devpath); in match_smhba_sas_hba() 58 if ((strstr(fulldevpath, wa->devpath)) != NULL) { in match_smhba_sas_hba() 66 di_devfs_path_free(devpath); in match_smhba_sas_hba() 69 di_devfs_path_free(devpath); in match_smhba_sas_hba() 127 wa.devpath = hba_ptr->device_path; in Sun_sasRefreshInformation()
|
/illumos-gate/usr/src/lib/libdevinfo/ |
H A D | devinfo_retire.c | 687 if (devpath == NULL || devpath[0] == '\0') { in di_retire_device() 692 if (devpath[0] != '/' || strlen(devpath) >= PATH_MAX || in di_retire_device() 694 strstr(devpath, "../devices/") || strrchr(devpath, ':')) { in di_retire_device() 696 devpath); in di_retire_device() 758 rarg.rcm_root = devpath; in di_retire_device() 809 devpath); in di_retire_device() 839 if (devpath == NULL || devpath[0] == '\0') { in di_unretire_device() 844 if (devpath[0] != '/' || strlen(devpath) >= PATH_MAX || in di_unretire_device() 846 strstr(devpath, "../devices/") || strrchr(devpath, ':')) { in di_unretire_device() 848 devpath); in di_unretire_device() [all …]
|
/illumos-gate/usr/src/lib/libdiskmgt/common/ |
H A D | findevs.c | 205 char *devpath; in add_bus() local 249 bp->name = strdup(devpath); in add_bus() 276 bp->pname = strdup(devpath); in add_bus() 314 char *devpath; in add_controller() local 355 cp->name = strdup(devpath); in add_controller() 485 char *devpath; in add_devs() local 580 char *devpath; in add_devs() local 1555 if (libdiskmgt_str_eq(alistp->devpath, devpath)) { in new_devpath() 1569 newdp->devpath = strdup(devpath); in new_devpath() 1598 char *devpath; in new_path() local [all …]
|
H A D | slice.c | 124 char devpath[MAXPATHLEN]; in slice_get_attributes() local 137 dsk2rdsk(dp->name, devpath, sizeof (devpath)); in slice_get_attributes() 138 fd = open(devpath, O_RDONLY|O_NDELAY); in slice_get_attributes() 573 char devpath[MAXPATHLEN]; in get_fixed_assocs() local 593 slice_rdsk2dsk(devp->devpath, devpath, sizeof (devpath)); in get_fixed_assocs() 594 slices[pos] = cache_get_desc(DM_SLICE, desc->p.disk, devpath, in get_fixed_assocs() 622 if ((fd = open(devp->devpath, O_RDONLY|O_NDELAY)) >= 0) { in get_slice_num() 655 char devpath[MAXPATHLEN]; in make_fixed_descriptors() local 695 slice_rdsk2dsk(devp->devpath, devpath, sizeof (devpath)); in make_fixed_descriptors() 696 cache_load_desc(DM_SLICE, dp, devpath, mname, &error); in make_fixed_descriptors() [all …]
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | retire_store.c | 318 e_ddi_retire_persist(char *devpath) in e_ddi_retire_persist() argument 328 new_rsp->rst_devpath = new_path = i_ddi_strdup(devpath, KM_SLEEP); in e_ddi_retire_persist() 339 if (strcmp(devpath, rsp->rst_devpath) == 0) { in e_ddi_retire_persist() 347 ": %s", devpath)); in e_ddi_retire_persist() 368 e_ddi_retire_unpersist(char *devpath) in e_ddi_retire_unpersist() argument 382 if (strcmp(devpath, rsp->rst_devpath) != 0) in e_ddi_retire_unpersist() 389 devpath)); in e_ddi_retire_unpersist() 404 e_ddi_device_retired(char *devpath) in e_ddi_device_retired() argument 441 if (strncmp(devpath, rsp->rst_devpath, len) != 0) in e_ddi_device_retired() 443 if (devpath[len] == '\0' || devpath[len] == '/') { in e_ddi_device_retired() [all …]
|
/illumos-gate/usr/src/lib/libzfs/common/ |
H A D | libzfs_fru.c | 112 char *devpath, *frustr; in libzfs_fru_gather() local 124 FM_FMRI_AUTH_CHASSIS, &devpath, &err) == 0) in libzfs_fru_gather() 141 if (libzfs_fru_lookup(hdl, devpath) != NULL) { in libzfs_fru_gather() 142 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 147 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 156 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 166 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 175 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 180 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 316 size_t idx = fru_strhash(devpath); in libzfs_fru_lookup() [all …]
|
/illumos-gate/usr/src/cmd/fstyp/ |
H A D | fstyp.c | 74 char *devpath; in main() local 118 devpath = argv[0]; in main() 120 if ((fd = open(devpath, O_RDONLY)) < 0) { in main() 172 if (devpath != argv[0]) { in main() 173 free(devpath); in main() 257 dos_to_dev(char *path, char **devpath, int *num) in dos_to_dev() argument 268 *devpath = getfullrawname(path); in dos_to_dev() 270 if (*devpath != NULL && **devpath == '\0') { in dos_to_dev() 271 free(*devpath); in dos_to_dev() 272 *devpath = NULL; in dos_to_dev() [all …]
|
/illumos-gate/usr/src/boot/efi/loader/ |
H A D | main.c | 101 if (devpath == NULL) in efi_zfs_is_preferred() 118 devpath = NULL; in efi_zfs_is_preferred() 123 if (devpath == NULL) in efi_zfs_is_preferred() 127 devpath = NULL; in efi_zfs_is_preferred() 130 devpath = efi_devpath_trim(devpath); in efi_zfs_is_preferred() 131 if (devpath == NULL) in efi_zfs_is_preferred() 145 free(devpath); in efi_zfs_is_preferred() 437 while (devpath != NULL) { in find_currdev() 452 if (devpath != NULL) { in find_currdev() 454 devpath = copy; in find_currdev() [all …]
|
/illumos-gate/usr/src/cmd/stat/common/ |
H A D | dsr.c | 119 char *devpath = NULL; in drvinstpart2dev() local 144 if ((devpath = di_dim_path_dev(di_dim, in drvinstpart2dev() 149 if (devpath == NULL) in drvinstpart2dev() 157 *devpathp = safe_strdup(devpath); in drvinstpart2dev() 162 a = strrchr(devpath, '/'); in drvinstpart2dev() 164 free(devpath); in drvinstpart2dev() 180 free(devpath); in drvinstpart2dev() 210 free(devpath); in drvinstpart2dev() 275 char *devpath = NULL; in lookup_ks_name() local 358 entry->dname = devpath; in lookup_ks_name() [all …]
|
/illumos-gate/usr/src/uts/common/io/fibre-channel/fca/qlc/ |
H A D | ql_hba_fru.c | 395 "device path: %s\n", ha->devpath); in ql_populate_hba_fru_details() 575 if (ha->devpath == NULL) { in ql_get_basedev_len() 579 dev_off = (int32_t)(strlen(ha->devpath) - 1); in ql_get_basedev_len() 585 if (ha->devpath[dev_off] == ',') { in ql_get_basedev_len() 594 ha->devpath); in ql_get_basedev_len() 600 *basedev_len = (uint32_t)strlen(ha->devpath); in ql_get_basedev_len() 603 devstr = ha->devpath + port_off; in ql_get_basedev_len() 607 "port_index\n", ha->devpath); in ql_get_basedev_len() 659 if (ha->devpath == NULL) { in ql_search_basedev() 665 ha->devpath); in ql_search_basedev() [all …]
|
/illumos-gate/usr/src/uts/common/io/ |
H A D | ufm.c | 199 char devpath[MAXPATHLEN]; in ufm_do_getcaps() local 208 if ((dip = e_ddi_hold_devi_by_path(devpath, 0)) == NULL) { in ufm_do_getcaps() 211 if ((ufmh = ufm_find(devpath)) == NULL) { in ufm_do_getcaps() 259 char devpath[MAXPATHLEN]; in ufm_do_reportsz() local 290 if ((dip = e_ddi_hold_devi_by_path(devpath, 0)) == NULL) { in ufm_do_reportsz() 293 if ((ufmh = ufm_find(devpath)) == NULL) { in ufm_do_reportsz() 356 char devpath[MAXPATHLEN]; in ufm_do_report() local 389 if ((dip = e_ddi_hold_devi_by_path(devpath, 0)) == NULL) { in ufm_do_report() 392 if ((ufmh = ufm_find(devpath)) == NULL) { in ufm_do_report() 467 char devpath[MAXPATHLEN]; in ufm_do_readimg() local [all …]
|
H A D | strplumb.c | 232 char *devpath; in resolve_boot_path() local 242 devpath = rootfs.bo_name; in resolve_boot_path() 244 devpath = strplumb_get_netdev_path(); in resolve_boot_path() 245 netdev_path = devpath; in resolve_boot_path() 252 if (devpath != NULL) { in resolve_boot_path() 253 DBG1("resolving boot-path: %s\n", devpath); in resolve_boot_path() 259 prom_strip_options(devpath, stripped_path); in resolve_boot_path() 260 devpath = stripped_path; in resolve_boot_path() 267 devpath); in resolve_boot_path() 552 char *macstr, *devpath = NULL; in strplumb_get_netdev_path() [all …]
|
/illumos-gate/usr/src/lib/cfgadm_plugins/sata/common/ |
H A D | cfga_sata.c | 577 char *devpath; in cfga_change_state() local 671 S_FREE(devpath); in cfga_change_state() 744 S_FREE(devpath); in cfga_change_state() 813 S_FREE(devpath); in cfga_change_state() 830 S_FREE(devpath); in cfga_change_state() 1239 char *devpath = NULL; in sata_make_dyncomp() local 1340 free(devpath); in sata_make_dyncomp() 1344 devpath = NULL; in sata_make_dyncomp() 1403 if (devpath) in sata_make_dyncomp() 1404 free(devpath); in sata_make_dyncomp() [all …]
|
/illumos-gate/usr/src/cmd/luxadm/ |
H A D | fcalupdate.c | 582 char devpath[PATH_MAX]; in getsbuslist() local 585 (void) strcpy(devpath, "/devices"); in getsbuslist() 588 (void) getsocpath(devpath, (int *)&devcnt); in getsbuslist() 838 getsocpath(char *devpath, int *devcnt) in getsocpath() argument 845 if (lstat(devpath, &statbuf) < 0) { in getsocpath() 859 if (strstr(devpath, ONBOARD_SOCAL)) in getsocpath() 862 if (strstr(devpath, SOCAL_STR)) { in getsocpath() 867 devpath); in getsocpath() 883 ptr = devpath + strlen(devpath); in getsocpath() 891 if ((dp = opendir(devpath)) == NULL) { in getsocpath() [all …]
|
H A D | qlgcupdate.c | 150 char devpath[PATH_MAX], tmppath[PATH_MAX]; in q_qlgc_update() local 252 (void) strcpy(devpath, "/devices"); in q_qlgc_update() 624 q_getdevctlpath(char *devpath, int *devcnt) in q_getdevctlpath() argument 633 if (lstat(devpath, &statbuf) < 0) { in q_getdevctlpath() 639 if ((strstr(devpath, fc_trans) || in q_getdevctlpath() 640 (strstr(devpath, fp_trans_id) && strstr(devpath, fp_trans))) && in q_getdevctlpath() 641 strstr(devpath, "devctl")) { in q_getdevctlpath() 645 (void) strcpy(pcibus_list[*devcnt], devpath); in q_getdevctlpath() 663 ptr = devpath + strlen(devpath); in q_getdevctlpath() 672 if ((dp = opendir(devpath)) == NULL) { in q_getdevctlpath() [all …]
|
/illumos-gate/usr/src/cmd/syseventd/modules/zfs_mod/ |
H A D | zfs_mod.c | 394 data.dd_compare = devpath; in devpath_iter() 416 size_t len = strlen(devpath) + sizeof ("/devices") + in devid_iter() 428 (void) snprintf(fullpath, len, "/devices%s%s", devpath, PHYS_PATH); in devid_iter() 473 char *devpath, *devname; in zfs_deliver_add() local 484 if (nvlist_lookup_string(nvl, DEV_PHYS_PATH, &devpath) != 0) in zfs_deliver_add() 493 (void) strlcpy(realpath, devpath, sizeof (realpath)); in zfs_deliver_add() 507 devpath, colon); in zfs_deliver_add() 628 char *devpath, *cptr, *oldfru = NULL; in zfs_update_vdev_fru() local 637 cptr = strrchr(devpath, ':'); in zfs_update_vdev_fru() 641 newfru = libzfs_fru_lookup(g_zfshdl, devpath); in zfs_update_vdev_fru() [all …]
|
/illumos-gate/usr/src/lib/libsocket/socket/ |
H A D | socket.c | 109 char *devpath; in _socket_create() local 127 &devpath, &prototype) == -1) { in _socket_create() 131 fd = _so_socket(family, type, protocol, devpath, version); in _socket_create() 132 free(devpath); in _socket_create()
|
/illumos-gate/usr/src/uts/common/io/scsi/impl/ |
H A D | scsi_fm.c | 37 const char *devpath, const char *minor_name, const char *devid, 95 char *devpath, const char *error_class, uint64_t ena, in scsi_fm_ereport_post() argument 129 devpath = mdi_pi_pathname_by_instance(path_instance); in scsi_fm_ereport_post() 149 fm_dev_ereport_postv(dip, eqdip, devpath, minor_name, devid, tpl0, in scsi_fm_ereport_post()
|
/illumos-gate/usr/src/lib/cfgadm_plugins/usb/common/ |
H A D | cfga_usb.c | 1037 char *devpath; in cfga_change_state() local 1084 if (devpath == NULL) { in cfga_change_state() 1103 S_FREE(devpath); in cfga_change_state() 1132 if (devpath == NULL) { in cfga_change_state() 1155 S_FREE(devpath); in cfga_change_state() 1183 if (devpath == NULL) { in cfga_change_state() 1207 devpath, flags); in cfga_change_state() 1212 devpath, flags); in cfga_change_state() 1215 S_FREE(devpath); in cfga_change_state() 1747 char *devpath = NULL; in usb_get_devicepath() local [all …]
|