Home
last modified time | relevance | path

Searched refs:dev_name (Results 1 – 25 of 151) sorted by relevance

1234567

/freebsd/sys/contrib/openzfs/lib/libzutil/os/linux/
H A Dzutil_device_path_os.c212 zfs_get_pci_slots_sys_path(const char *dev_name) in zfs_get_pci_slots_sys_path() argument
223 tmp = strrchr(dev_name, '/'); in zfs_get_pci_slots_sys_path()
225 dev_name = tmp + 1; /* +1 since we want the chr after '/' */ in zfs_get_pci_slots_sys_path()
227 if (strncmp("nvme", dev_name, 4) != 0) in zfs_get_pci_slots_sys_path()
231 dev_name); in zfs_get_pci_slots_sys_path()
308 zfs_get_enclosure_sysfs_path(const char *dev_name) in zfs_get_enclosure_sysfs_path() argument
320 if (dev_name == NULL) in zfs_get_enclosure_sysfs_path()
324 tmp1 = strrchr(dev_name, '/'); in zfs_get_enclosure_sysfs_path()
326 dev_name = tmp1 + 1; /* +1 since we want the chr after '/' */ in zfs_get_enclosure_sysfs_path()
328 tmpsize = asprintf(&tmp1, "/sys/block/%s/device", dev_name); in zfs_get_enclosure_sysfs_path()
[all …]
/freebsd/usr.sbin/bsnmpd/modules/snmp_hostres/
H A Dhostres_diskstorage_tbl.c97 u_char dev_name[32]; /* device name, i.e. "ad4" or "acd0" */ member
217 if (entry == NULL || entry->dev_name[0] == '\0') in disk_query_disk()
221 "%s%s", _PATH_DEV, entry->dev_name); in disk_query_disk()
239 partition_tbl_handle_disk(entry->index, entry->dev_name); in disk_query_disk()
258 .dev_name = "ad", in disk_OS_get_ATA_disks()
263 .dev_name = "ar", in disk_OS_get_ATA_disks()
268 .dev_name = "acd", in disk_OS_get_ATA_disks()
273 .dev_name = "afd", in disk_OS_get_ATA_disks()
278 .dev_name = "ast", in disk_OS_get_ATA_disks()
292 if (strncmp(map->name_key, found->dev_name, in disk_OS_get_ATA_disks()
[all …]
/freebsd/sys/contrib/dev/athk/ath10k/
H A Dtrace.h53 __string(device, dev_name(ar->dev))
58 __assign_str(device, dev_name(ar->dev));
89 __string(device, dev_name(ar->dev))
95 __assign_str(device, dev_name(ar->dev));
115 __string(device, dev_name(ar->dev))
124 __assign_str(device, dev_name(ar->dev));
147 __string(device, dev_name(ar->dev))
155 __assign_str(device, dev_name(ar->dev));
177 __string(device, dev_name(ar->dev))
185 __assign_str(device, dev_name(ar->dev));
[all …]
/freebsd/usr.sbin/watch/
H A Dwatch.c72 char dev_name[DEV_NAME_LEN]; variable
216 snp_tty = open(dev_name, O_RDONLY | O_NONBLOCK); in attach_snp()
247 strlcpy(dev_name, buf, sizeof(dev_name)); in set_dev()
336 ask_dev(dev_name, MSG_INIT); in main()
340 strlcpy(dev_name, *av, sizeof(dev_name)); in main()
342 set_dev(dev_name); in main()
371 ask_dev(dev_name, MSG_CHANGE); in main()
372 set_dev(dev_name); in main()
383 ask_dev(dev_name, MSG_NOWRITE); in main()
384 set_dev(dev_name); in main()
[all …]
/freebsd/sys/contrib/dev/athk/ath11k/
H A Dtrace.h42 __string(device, dev_name(ar->ab->dev))
50 __assign_str(device, dev_name(ar->ab->dev));
72 __string(device, dev_name(ar->ab->dev))
79 __assign_str(device, dev_name(ar->ab->dev));
99 __string(device, dev_name(ar->ab->dev))
107 __assign_str(device, dev_name(ar->ab->dev));
127 __string(device, dev_name(ab->dev))
132 __assign_str(device, dev_name(ab->dev));
165 __string(device, dev_name(ab->dev))
173 __assign_str(device, dev_name(ab->dev));
[all …]
/freebsd/usr.sbin/bhyve/
H A Daudio.c57 char dev_name[64]; member
70 audio_init(const char *dev_name, uint8_t dir) in audio_init() argument
85 assert(dev_name); in audio_init()
91 nlen = strlen(dev_name); in audio_init()
92 if (nlen < sizeof(aud->dev_name)) in audio_init()
93 memcpy(aud->dev_name, dev_name, nlen + 1); in audio_init()
102 aud->fd = open(aud->dev_name, aud->dir ? O_WRONLY : O_RDONLY, 0); in audio_init()
105 aud->dev_name, errno); in audio_init()
141 aud->dev_name); in audio_set_params()
/freebsd/sys/contrib/openzfs/udev/
H A Dzvol_id.c58 const char *dev_name = argv[1]; in main() local
63 if ((fd = open(dev_name, O_RDONLY|O_CLOEXEC)) == -1 || in main()
65 fprintf(stderr, "%s: %s\n", dev_name, strerror(errno)); in main()
72 dev_name, strerror(errno)); in main()
76 const char *dev_part = strrchr(dev_name, 'p'); in main()
/freebsd/usr.sbin/iovctl/
H A Diovctl.c92 config_iov(int fd, const char *dev_name, const nvlist_t *config, int dryrun) in config_iov() argument
102 printf("Would enable SR-IOV on device '%s'.\n", dev_name); in config_iov()
119 open_device(const char *dev_name) in open_device() argument
135 if (dev_name[0] == '/') in open_device()
136 copied = strlcpy(dev, dev_name, size); in open_device()
138 copied = snprintf(dev, size, "/dev/iov/%s", dev_name); in open_device()
297 delete_action(const char *dev_name, int dryrun) in delete_action() argument
301 fd = open_device(dev_name); in delete_action()
305 dev_name); in delete_action()
383 print_schema(const char *dev_name) in print_schema() argument
[all …]
/freebsd/sys/contrib/openzfs/lib/libzutil/os/freebsd/
H A Dzutil_device_path_os.c69 zfs_get_underlying_path(const char *dev_name) in zfs_get_underlying_path() argument
72 if (dev_name == NULL) in zfs_get_underlying_path()
75 return (realpath(dev_name, NULL)); in zfs_get_underlying_path()
79 zfs_dev_is_whole_disk(const char *dev_name) in zfs_dev_is_whole_disk() argument
83 fd = g_open(dev_name, 0); in zfs_dev_is_whole_disk()
/freebsd/sbin/nos-tun/
H A Dnos-tun.c109 tun_open(char *dev_name, struct sockaddr *ouraddr, char *theiraddr) in tun_open() argument
115 tun = open(dev_name, O_RDWR); in tun_open()
117 syslog(LOG_ERR,"can't open %s - %m", dev_name); in tun_open()
127 strncpy(ifrq.ifr_name, dev_name+5, IFNAMSIZ); in tun_open()
128 strncpy(ifra.ifra_name, dev_name+5, IFNAMSIZ); in tun_open()
239 char *dev_name = NULL; in main() local
269 dev_name = optarg; in main()
279 if ((argc != 1 && argc != 2) || (dev_name == NULL) || in main()
303 if(tun_open(dev_name, &t_laddr, to_point)) { in main()
/freebsd/lib/libcam/
H A Dcamlib.c58 static struct cam_device *cam_lookup_pass(const char *dev_name, int unit,
114 cam_get_device(const char *path, char *dev_name, int devnamelen, int *unit) in cam_get_device() argument
238 strlcpy(dev_name, tmpstr, devnamelen); in cam_get_device()
256 char dev_name[DEV_IDLEN + 1]; in cam_open_device() local
262 if (cam_get_device(path, dev_name, sizeof(dev_name), &unit) == -1) in cam_open_device()
265 return(cam_lookup_pass(dev_name, unit, flags, path, NULL)); in cam_open_device()
405 cam_open_spec_device(const char *dev_name, int unit, int flags, in cam_open_spec_device() argument
408 return(cam_lookup_pass(dev_name, unit, flags, NULL, device)); in cam_open_spec_device()
418 cam_lookup_pass(const char *dev_name, int unit, int flags, in cam_lookup_pass() argument
441 strlcpy(ccb.cgdl.periph_name, dev_name, sizeof(ccb.cgdl.periph_name)); in cam_lookup_pass()
[all …]
H A Dcamlib.h130 struct cam_device * cam_open_spec_device(const char *dev_name,
146 int cam_get_device(const char *path, char *dev_name,
/freebsd/usr.sbin/spi/
H A Dspi.c75 static int get_info(int hdev, const char *dev_name);
163 char dev_name[PATH_MAX * 2 + 5]; in main() local
171 dev_name[0] = 0; in main()
209 strlcpy(dev_name, optarg, in main()
210 sizeof(dev_name)); in main()
212 snprintf(dev_name, sizeof(dev_name), in main()
326 if (!dev_name[0]) /* no device name specified */ in main()
327 strlcpy(dev_name, DEFAULT_DEVICE_NAME, sizeof(dev_name)); in main()
329 hdev = open(dev_name, O_RDWR); in main()
333 dev_name, errno); in main()
[all …]
/freebsd/sys/contrib/dev/athk/ath12k/
H A Dtrace.h31 __string(device, dev_name(ar->ab->dev))
39 __assign_str(device, dev_name(ar->ab->dev));
61 __string(device, dev_name(ar->ab->dev))
76 __assign_str(device, dev_name(ar->ab->dev));
104 __string(device, dev_name(ar->ab->dev))
120 __assign_str(device, dev_name(ar->ab->dev));
/freebsd/contrib/ofed/libibmad/
H A Drpc.c365 madrpc_init(char *dev_name, int dev_port, int *mgmt_classes, int num_classes) in madrpc_init() argument
372 if ((fd = umad_open_port(dev_name, dev_port)) < 0) in madrpc_init()
374 dev_name ? dev_name : "(nil)", dev_port); in madrpc_init()
393 struct ibmad_port *mad_rpc_open_port(char *dev_name, int dev_port, in mad_rpc_open_port() argument
418 if ((port_id = umad_open_port(dev_name, dev_port)) < 0) { in mad_rpc_open_port()
419 IBWARN("can't open UMAD port (%s:%d)", dev_name, dev_port); in mad_rpc_open_port()
427 if (dev_name) in mad_rpc_open_port()
428 strncpy(p->ca_name, dev_name, sizeof p->ca_name - 1); in mad_rpc_open_port()
/freebsd/sys/dev/drm2/ttm/
H A Dttm_page_alloc_dma.c117 char dev_name[64]; /* Constructed from dev */ member
315 pool->dev_name, cpages); in ttm_set_pages_caching()
321 pool->dev_name, cpages); in ttm_set_pages_caching()
387 pool->dev_name, npages); in ttm_dma_pages_put()
400 pool->dev_name, 1); in ttm_dma_page_put()
429 pool->dev_name, pool->name, current->pid, in ttm_dma_page_pool_free()
438 pool->dev_name); in ttm_dma_page_pool_free()
618 snprintf(pool->dev_name, sizeof(pool->dev_name), "%s %s", in ttm_dma_pool_init()
619 dev_driver_string(dev), dev_name(dev)); in ttm_dma_pool_init()
722 pool->dev_name); in ttm_dma_pool_alloc_new_pages()
[all …]
/freebsd/sys/kern/
H A Dsubr_devstat.c66 static void devstat_add_entry(struct devstat *ds, const void *dev_name,
76 devstat_new_entry(const void *dev_name, in devstat_new_entry() argument
90 ds->id = dev_name; in devstat_new_entry()
94 devstat_add_entry(ds, dev_name, unit_number, block_size, in devstat_new_entry()
106 devstat_add_entry(struct devstat *ds, const void *dev_name, in devstat_add_entry() argument
165 dev_name, unit_number); in devstat_add_entry()
174 strlcpy(ds->device_name, dev_name, DEVSTAT_NAME_LEN); in devstat_add_entry()
/freebsd/sys/dev/xen/blkback/
H A Dblkback.c646 char *dev_name; member
1423 bio->bio_error, xbb->dev_name); in xbb_bio_done()
1512 xbb->dev_name); in xbb_dispatch_io()
1670 xbb->dev_name); in xbb_dispatch_io()
2316 DPRINTF("closing dev=%s\n", xbb->dev_name); in xbb_close_backend()
2388 xbb->dev_name); in xbb_open_dev()
2396 "device %s!", xbb->dev_name); in xbb_open_dev()
2406 "for device %s", xbb->dev_name); in xbb_open_dev()
2416 "for device %s", xbb->dev_name); in xbb_open_dev()
2444 "for file %s", xbb->dev_name); in xbb_open_file()
[all …]
/freebsd/sys/contrib/ncsw/user/env/
H A Dxx.c732 char *dev_name; in XX_PortalSetInfo() local
736 dev_name = malloc(sizeof(*dev_name), M_TEMP, M_WAITOK | in XX_PortalSetInfo()
741 strncpy(dev_name, device_get_name(dev), len); in XX_PortalSetInfo()
743 if (strncmp(dev_name, "bman-portals", len) && strncmp(dev_name, in XX_PortalSetInfo()
747 if (strncmp(dev_name, "bman-portals", len) == 0) in XX_PortalSetInfo()
765 free(dev_name, M_TEMP); in XX_PortalSetInfo()
/freebsd/sys/dev/bnxt/bnxt_en/
H A Dbnxt_auxbus_compat.c46 const char *p = strrchr(dev_name(&auxdev->dev), '.'); in auxiliary_match_id()
51 match_size = p - dev_name(&auxdev->dev); in auxiliary_match_id()
54 !strncmp(dev_name(&auxdev->dev), id->name, match_size)) in auxiliary_match_id()
/freebsd/sys/contrib/openzfs/cmd/zed/agents/
H A Dzfs_retire.c251 char *dev_name; in replace_with_spare() local
277 dev_name = zpool_vdev_name(NULL, zhp, vdev, B_FALSE); in replace_with_spare()
305 dev_name, zfs_basename(spare_name)); in replace_with_spare()
307 if (zpool_vdev_attach(zhp, dev_name, spare_name, in replace_with_spare()
309 free(dev_name); in replace_with_spare()
315 free(dev_name); in replace_with_spare()
/freebsd/contrib/libpcap/
H A Dpcap-dos.c111 static int init_watt32 (struct pcap *pcap, const char *dev_name, char *err_buf);
669 open_driver (const char *dev_name, char *ebuf, int promisc) in open_driver() argument
677 if (strcmp (dev_name,dev->name)) in open_driver()
686 snprintf (ebuf, PCAP_ERRBUF_SIZE, "failed to detect device `%s'", dev_name); in open_driver()
708 snprintf (ebuf, PCAP_ERRBUF_SIZE, "failed to activate device `%s'", dev_name); in open_driver()
730 snprintf (ebuf, PCAP_ERRBUF_SIZE, "device `%s' not supported", dev_name); in open_driver()
737 snprintf (ebuf, PCAP_ERRBUF_SIZE, "device `%s' not probed", dev_name); in open_driver()
972 static int init_watt32 (struct pcap *pcap, const char *dev_name, char *err_buf) in init_watt32() argument
997 if (dev_name && strncmp(dev_name,"pkt",3)) in init_watt32()
H A Dpcap-bt-linux.c120 char dev_name[20], dev_descr[40]; in bt_findalldevs() local
122 snprintf(dev_name, sizeof(dev_name), BT_IFACE"%u", dev_req->dev_id); in bt_findalldevs()
133 if (pcapint_add_dev(devlistp, dev_name, PCAP_IF_WIRELESS, dev_descr, err_str) == NULL) in bt_findalldevs()
/freebsd/usr.bin/systat/
H A Diolat.c58 char dev_name[DEV_NAMSIZE]; member
180 if (strcmp(isp->dev_name, dev) != 0 || isp->unit != unit) in find_dev()
197 strlcpy(isp->dev_name, dev, sizeof(isp->dev_name)); in alloc_dev()
420 snprintf(tmpstr, sizeof(tmpstr), "%s%d", isp->dev_name, isp->unit); in labeliolat()
/freebsd/usr.sbin/camdd/
H A Dcamdd.c107 char *dev_name; member
1034 strlcpy(file_dev->filename, io_opts->dev_name, in camdd_probe_file()
1036 strlcpy(dev->device_name, io_opts->dev_name, sizeof(dev->device_name)); in camdd_probe_file()
1046 io_opts->dev_name); in camdd_probe_file()
1216 io_opts->offset, io_opts->dev_name, io_opts->dev_name); in camdd_probe_file()
1224 io_opts->dev_name, dev->sector_size); in camdd_probe_file()
3219 if (isdigit(io_opts[i].dev_name[0])) {
3224 rv = parse_btl(io_opts[i].dev_name, &bus,
3242 if (cam_get_device(io_opts[i].dev_name, name,
3277 if (io_opts[i].dev_name[0] == '-') {
[all …]

1234567