/titanic_44/usr/src/lib/fm/topo/libtopo/common/ |
H A D | dev.c | 136 char *devpath = NULL; in fmri_nvl2str() local 156 err = nvlist_lookup_string(nvl, FM_FMRI_DEV_PATH, &devpath); in fmri_nvl2str() 157 if (err != 0 || devpath == NULL) in fmri_nvl2str() 192 topo_fmristr_build(&size, buf, buflen, devpath, in fmri_nvl2str() 239 char *devpath; in dev_fmri_str2nvl() local 281 eos = devpath = strchr(cur, '/'); in dev_fmri_str2nvl() 282 if (devpath == NULL || devpath == cur + 1) in dev_fmri_str2nvl() 333 cur = devpath; /* initial slash is NULled */ in dev_fmri_str2nvl() 338 devpath = cur; in dev_fmri_str2nvl() 354 *devpath = '/'; /* we NULed this earlier; put it back */ in dev_fmri_str2nvl() [all …]
|
/titanic_44/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)); \ 72 #define FW_SD_FREE_DEVICELIST(thisdev, devpath) { \ argument 74 FW_SD_FREE_DEVPATH((devpath)) \ 76 #define FW_SD_FREE_DRV_NAME(thisdev, devpath) { \ argument 78 FW_SD_FREE_DEVICELIST((thisdev), (devpath)) \ 80 #define FW_SD_FREE_CLS_NAME(thisdev, devpath) { \ argument 82 FW_SD_FREE_DRV_NAME((thisdev), (devpath)) \ 84 #define FW_SD_FREE_ACC_NAME(thisdev, devpath) { \ argument 86 FW_SD_FREE_CLS_NAME(thisdev, devpath) \ [all …]
|
H A D | ses.c | 293 char *devpath; in fw_identify() local 319 if ((devpath = calloc(1, MAXPATHLEN + 1)) == NULL) { in fw_identify() 331 devpath = di_devfs_path(thisnode); in fw_identify() 339 free(devpath); in fw_identify() 344 devlength = strlen(devpath) + strlen(devprefix) + in fw_identify() 352 free(devpath); in fw_identify() 357 "%s%s%s", devprefix, devpath, devsuffix); in fw_identify() 367 free(devpath); in fw_identify() 382 free(devpath); in fw_identify() 406 free(devpath); in fw_identify() [all …]
|
/titanic_44/usr/src/lib/sun_sas/common/ |
H A D | devtree_device_disco.c | 42 get_minor(char *devpath, char *minor) in get_minor() argument 48 if ((strstr(devpath, "/st@")) || (strstr(devpath, "/tape@"))) { in get_minor() 50 } else if (strstr(devpath, "/smp@")) { in get_minor() 52 } else if ((strstr(devpath, "/ssd@")) || (strstr(devpath, "/sd@")) || in get_minor() 53 (strstr(devpath, "/disk@"))) { in get_minor() 55 } else if ((strstr(devpath, "/ses@")) || (strstr(devpath, in get_minor() 58 devpath, ":0"); in get_minor() 75 devpath); in get_minor() 228 char *devpath, link[MAXNAMELEN]; in get_attached_devices_info() local 244 if ((devpath = di_devfs_path(node)) == NULL) { in get_attached_devices_info() [all …]
|
H A D | Sun_sasRefreshAdapterConfiguration.c | 39 char *devpath, fulldevpath[MAXPATHLEN]; in find_matching_hba() local 51 if ((devpath = di_devfs_path(node)) == NULL) { in find_matching_hba() 56 devpath); in find_matching_hba() 58 if ((strstr(fulldevpath, wa->devpath)) != NULL) { in find_matching_hba() 61 di_devfs_path_free(devpath); in find_matching_hba() 64 di_devfs_path_free(devpath); in find_matching_hba() 117 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()
|
/titanic_44/usr/src/lib/libdevinfo/ |
H A D | devinfo_retire.c | 672 di_retire_device(char *devpath, di_retire_t *dp, int flags) in di_retire_device() argument 687 if (devpath == NULL || devpath[0] == '\0') { in di_retire_device() 692 if (devpath[0] != '/' || strlen(devpath) >= PATH_MAX || in di_retire_device() 693 strncmp(devpath, "/devices/", strlen("/devices/")) == 0 || in di_retire_device() 694 strstr(devpath, "../devices/") || strrchr(devpath, ':')) { in di_retire_device() 696 devpath); in di_retire_device() 742 rarg.rcm_node = di_init(devpath, DINFOCPYALL); in di_retire_device() 745 "retiring anyway: %s\n", devpath); in di_retire_device() 753 "RCM handle. Returning RCM failure: %s\n", devpath); in di_retire_device() 758 rarg.rcm_root = devpath; in di_retire_device() [all …]
|
/titanic_44/usr/src/lib/libdiskmgt/common/ |
H A D | findevs.c | 127 static int new_devpath(alias_t *ap, char *devpath); 195 char *devpath; in add_bus() local 209 devpath = di_devfs_path(node); in add_bus() 211 if ((bp = find_bus(args, devpath)) != NULL) { in add_bus() 212 di_devfs_path_free((void *) devpath); in add_bus() 225 if (strcmp(devpath, "/") == 0) { in add_bus() 226 di_devfs_path_free((void *) devpath); in add_bus() 231 (void) fprintf(stderr, "INFO: add_bus %s\n", devpath); in add_bus() 239 bp->name = strdup(devpath); in add_bus() 240 di_devfs_path_free((void *) devpath); in add_bus() [all …]
|
H A D | slice.c | 120 char devpath[MAXPATHLEN]; in slice_get_attributes() local 133 dsk2rdsk(dp->name, devpath, sizeof (devpath)); in slice_get_attributes() 134 fd = open(devpath, O_RDONLY|O_NDELAY); in slice_get_attributes() 224 char devpath[MAXPATHLEN]; in slice_get_stats() local 228 dsk2rdsk(dp->name, devpath, sizeof (devpath)); in slice_get_stats() 229 fd = open(devpath, O_RDONLY|O_NDELAY); in slice_get_stats() 247 slice_rdsk2dsk(sp->devpath, localpath, in slice_get_stats() 534 if ((sfd = open(sp->devpath, O_RDONLY|O_NDELAY)) >= 0) { in get_attrs() 543 slice_rdsk2dsk(sp->devpath, localpath, sizeof (localpath)); in get_attrs() 671 char devpath[MAXPATHLEN]; in get_fixed_assocs() local [all …]
|
/titanic_44/usr/src/lib/libzfs/common/ |
H A D | libzfs_fru.c | 108 char *devpath, *frustr; in libzfs_fru_gather() local 120 FM_FMRI_AUTH_CHASSIS, &devpath, &err) == 0) in libzfs_fru_gather() 121 (void) strlcpy(hdl->libzfs_chassis_id, devpath, in libzfs_fru_gather() 134 if (_topo_prop_get_string(tn, "io", "devfs-path", &devpath, &err) != 0) in libzfs_fru_gather() 137 if (libzfs_fru_lookup(hdl, devpath) != NULL) { in libzfs_fru_gather() 138 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 143 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 152 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 162 _topo_hdl_strfree(thp, devpath); in libzfs_fru_gather() 167 if ((frup->zf_device = strdup(devpath)) == NULL || in libzfs_fru_gather() [all …]
|
/titanic_44/usr/src/uts/common/os/ |
H A D | retire_store.c | 318 e_ddi_retire_persist(char *devpath) in e_ddi_retire_persist() argument 325 STORE_DBG((CE_NOTE, "e_ddi_retire_persist: entered: %s", devpath)); in e_ddi_retire_persist() 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() 362 STORE_DBG((CE_NOTE, "store: New, added to list, dirty: %s", devpath)); in e_ddi_retire_persist() 368 e_ddi_retire_unpersist(char *devpath) in e_ddi_retire_unpersist() argument 375 STORE_DBG((CE_NOTE, "e_ddi_retire_unpersist: entered: %s", devpath)); in e_ddi_retire_unpersist() 382 if (strcmp(devpath, rsp->rst_devpath) != 0) in e_ddi_retire_unpersist() 389 devpath)); in e_ddi_retire_unpersist() [all …]
|
/titanic_44/usr/src/cmd/stat/common/ |
H A D | dsr.c | 119 char *devpath; in drvinstpart2dev() local 140 devpath = di_dim_path_dev(di_dim, driver, instance, part); in drvinstpart2dev() 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 [all …]
|
/titanic_44/usr/src/uts/common/io/fibre-channel/fca/qlc/ |
H A D | ql_hba_fru.c | 400 "device path: %s\n", ha->devpath); in ql_populate_hba_fru_details() 592 if (ha->devpath == NULL) { in ql_get_basedev_len() 596 dev_off = (int32_t)(strlen(ha->devpath) - 1); in ql_get_basedev_len() 600 while ((dev_off >= 0) && (ha->devpath[dev_off] != '@')) { in ql_get_basedev_len() 602 if (ha->devpath[dev_off] == ',') { in ql_get_basedev_len() 611 ha->devpath); in ql_get_basedev_len() 617 *basedev_len = (uint32_t)strlen(ha->devpath); in ql_get_basedev_len() 620 devstr = ha->devpath + port_off; in ql_get_basedev_len() 624 "port_index\n", ha->devpath); in ql_get_basedev_len() 676 if (ha->devpath == NULL) { in ql_search_basedev() [all …]
|
/titanic_44/usr/src/cmd/fstyp/ |
H A D | fstyp.c | 53 static boolean_t dos_to_dev(char *path, char **devpath, int *num); 74 char *devpath; in main() local 117 if (!(is_dos = dos_to_dev(argv[0], &devpath, &dos_num))) { in main() 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() [all …]
|
/titanic_44/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() 847 MSGSTR(4539, "Error: %s lstat() error\n"), devpath); in getsocpath() 859 if (strstr(devpath, ONBOARD_SOCAL)) in getsocpath() 862 if (strstr(devpath, SOCAL_STR)) { in getsocpath() 864 if ((loadsocpath(devpath, devcnt)) < 0) { in getsocpath() 867 devpath); 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() 253 if (q_getdevctlpath(devpath, (int *)&devcnt) == 0) { in q_qlgc_update() 624 q_getdevctlpath(char *devpath, int *devcnt) in q_getdevctlpath() argument 633 if (lstat(devpath, &statbuf) < 0) { in q_getdevctlpath() 635 MSGSTR(21016, "Error: %s lstat() error\n"), devpath); 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() 643 if ((testopen = open(devpath, O_RDONLY)) >= 0) { in q_getdevctlpath() [all …]
|
/titanic_44/usr/src/lib/cfgadm_plugins/sata/common/ |
H A D | cfga_sata.c | 575 char *devpath; in cfga_change_state() local 650 devpath = sata_get_devicepath(ap_id); in cfga_change_state() 651 if (devpath == NULL) { in cfga_change_state() 658 for (i = 0; i < 12 && (devpath == NULL); i++) { in cfga_change_state() 660 devpath = sata_get_devicepath(ap_id); in cfga_change_state() 663 if (devpath == NULL) { in cfga_change_state() 669 S_FREE(devpath); in cfga_change_state() 715 devpath = sata_get_devicepath(ap_id); in cfga_change_state() 716 if (devpath == NULL) { in cfga_change_state() 723 if ((rv = sata_rcm_offline(ap_id, errstring, devpath, flags)) in cfga_change_state() [all …]
|
/titanic_44/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()
|
/titanic_44/usr/src/lib/libwanboot/common/ |
H A D | bootinfo_aux.c | 380 char *devpath; in manual_if_init() local 398 if ((devpath = get_bootpath()) == NULL || in manual_if_init() 399 (node = path2node(devpath)) == DI_NODE_NIL || in manual_if_init() 405 free(devpath); in manual_if_init() 406 if ((devpath = get_netalias()) == NULL || in manual_if_init() 407 (node = path2node(devpath)) == DI_NODE_NIL || in manual_if_init() 431 (node = path2node(devpath)) == DI_NODE_NIL) { in manual_if_init() 451 free(devpath); in manual_if_init()
|
/titanic_44/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()
|
/titanic_44/usr/src/uts/common/io/ |
H A D | strplumb.c | 227 char *devpath; in resolve_boot_path() local 236 devpath = rootfs.bo_name; in resolve_boot_path() 238 devpath = strplumb_get_netdev_path(); in resolve_boot_path() 240 if (devpath != NULL) { in resolve_boot_path() 241 DBG1("resolving boot-path: %s\n", devpath); in resolve_boot_path() 247 prom_strip_options(devpath, stripped_path); in resolve_boot_path() 248 devpath = stripped_path; in resolve_boot_path() 253 if ((dip = e_ddi_hold_devi_by_path(devpath, 0)) == NULL) { in resolve_boot_path() 255 devpath); in resolve_boot_path() 540 char *macstr, *devpath = NULL; in strplumb_get_netdev_path() [all …]
|
/titanic_44/usr/src/psm/stand/boot/sparc/common/ |
H A D | wanboot.c | 976 size_t length, char **devpath, off_t *offset, unsigned char *cdigest) in process_miniroot() argument 993 devpath); in process_miniroot() 1049 get_miniroot(char **devpath) in get_miniroot() argument 1116 mini_size, devpath, &offset, cdigest)) > 0) { in get_miniroot() 1218 process_wanbootfs(http_handle_t handle, char **devpath, in process_wanbootfs() argument 1324 devpath); in process_wanbootfs() 1382 char *devpath; in get_wanbootfs() local 1420 if ((ret = process_wanbootfs(handle, &devpath, in get_wanbootfs() 1445 if (determine_fstype_and_mountroot(devpath) != VFS_SUCCESS) { in get_wanbootfs() 1497 static char devpath[OBP_MAXPATHLEN]; in init_netdev() local [all …]
|
/titanic_44/usr/src/cmd/nvmeadm/ |
H A D | nvmeadm_dev.c | 172 char *devpath, *path; in nvme_open() local 175 if ((devpath = di_devfs_minor_path(minor)) == NULL) in nvme_open() 178 if (asprintf(&path, "/devices%s", devpath) < 0) { in nvme_open() 179 di_devfs_path_free(devpath); in nvme_open() 183 di_devfs_path_free(devpath); in nvme_open()
|
/titanic_44/usr/src/lib/cfgadm_plugins/usb/common/ |
H A D | cfga_usb.c | 1013 char *devpath; in cfga_change_state() local 1059 devpath = usb_get_devicepath(ap_id); in cfga_change_state() 1060 if (devpath == NULL) { in cfga_change_state() 1067 for (i = 0; i < 12 && (devpath == NULL); i++) { in cfga_change_state() 1069 devpath = usb_get_devicepath(ap_id); in cfga_change_state() 1072 if (devpath == NULL) { in cfga_change_state() 1079 S_FREE(devpath); in cfga_change_state() 1107 devpath = usb_get_devicepath(ap_id); in cfga_change_state() 1108 if (devpath == NULL) { in cfga_change_state() 1114 if ((rv = usb_rcm_offline(ap_id, errstring, devpath, flags)) != in cfga_change_state() [all …]
|
/titanic_44/usr/src/cmd/devfsadm/ |
H A D | audio_link.c | 178 char devpath[PATH_MAX + 1]; in audio_process() local 203 (void) snprintf(devpath, sizeof (devpath), "%s:%s", tmp, mn); in audio_process() 279 (void) strlcpy(devpath, newpath, sizeof (devpath)); in audio_process() 280 if (devfsadm_enumerate_int(devpath, 0, &buf, rules, 1)) { in audio_process()
|