Lines Matching refs:nr
21 static size_t ioctl__scnprintf_tty_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_tty_cmd() argument
41 if (nr < strarray__ioctl_tty_cmd.nr_entries && strarray__ioctl_tty_cmd.entries[nr] != NULL) in ioctl__scnprintf_tty_cmd()
42 return scnprintf(bf, size, "%s", strarray__ioctl_tty_cmd.entries[nr]); in ioctl__scnprintf_tty_cmd()
44 return scnprintf(bf, size, "(%#x, %#x, %#x)", 'T', nr, dir); in ioctl__scnprintf_tty_cmd()
47 static size_t ioctl__scnprintf_drm_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_drm_cmd() argument
52 if (nr < strarray__drm_ioctl_cmds.nr_entries && strarray__drm_ioctl_cmds.entries[nr] != NULL) in ioctl__scnprintf_drm_cmd()
53 return scnprintf(bf, size, "DRM_%s", strarray__drm_ioctl_cmds.entries[nr]); in ioctl__scnprintf_drm_cmd()
55 return scnprintf(bf, size, "(%#x, %#x, %#x)", 'd', nr, dir); in ioctl__scnprintf_drm_cmd()
58 static size_t ioctl__scnprintf_sndrv_pcm_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_sndrv_pcm_cmd() argument
63 …if (nr < strarray__sndrv_pcm_ioctl_cmds.nr_entries && strarray__sndrv_pcm_ioctl_cmds.entries[nr] !… in ioctl__scnprintf_sndrv_pcm_cmd()
64 return scnprintf(bf, size, "SNDRV_PCM_%s", strarray__sndrv_pcm_ioctl_cmds.entries[nr]); in ioctl__scnprintf_sndrv_pcm_cmd()
66 return scnprintf(bf, size, "(%#x, %#x, %#x)", 'A', nr, dir); in ioctl__scnprintf_sndrv_pcm_cmd()
69 static size_t ioctl__scnprintf_sndrv_ctl_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_sndrv_ctl_cmd() argument
74 …if (nr < strarray__sndrv_ctl_ioctl_cmds.nr_entries && strarray__sndrv_ctl_ioctl_cmds.entries[nr] !… in ioctl__scnprintf_sndrv_ctl_cmd()
75 return scnprintf(bf, size, "SNDRV_CTL_%s", strarray__sndrv_ctl_ioctl_cmds.entries[nr]); in ioctl__scnprintf_sndrv_ctl_cmd()
77 return scnprintf(bf, size, "(%#x, %#x, %#x)", 'U', nr, dir); in ioctl__scnprintf_sndrv_ctl_cmd()
80 static size_t ioctl__scnprintf_kvm_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_kvm_cmd() argument
85 if (nr < strarray__kvm_ioctl_cmds.nr_entries && strarray__kvm_ioctl_cmds.entries[nr] != NULL) in ioctl__scnprintf_kvm_cmd()
86 return scnprintf(bf, size, "KVM_%s", strarray__kvm_ioctl_cmds.entries[nr]); in ioctl__scnprintf_kvm_cmd()
88 return scnprintf(bf, size, "(%#x, %#x, %#x)", 0xAE, nr, dir); in ioctl__scnprintf_kvm_cmd()
91 static size_t ioctl__scnprintf_vhost_virtio_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_vhost_virtio_cmd() argument
98 if (nr < s->nr_entries && s->entries[nr] != NULL) in ioctl__scnprintf_vhost_virtio_cmd()
99 return scnprintf(bf, size, "VHOST_%s", s->entries[nr]); in ioctl__scnprintf_vhost_virtio_cmd()
101 return scnprintf(bf, size, "(%#x, %#x, %#x)", 0xAF, nr, dir); in ioctl__scnprintf_vhost_virtio_cmd()
104 static size_t ioctl__scnprintf_perf_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_perf_cmd() argument
109 if (nr < strarray__perf_ioctl_cmds.nr_entries && strarray__perf_ioctl_cmds.entries[nr] != NULL) in ioctl__scnprintf_perf_cmd()
110 return scnprintf(bf, size, "PERF_%s", strarray__perf_ioctl_cmds.entries[nr]); in ioctl__scnprintf_perf_cmd()
112 return scnprintf(bf, size, "(%#x, %#x, %#x)", 0xAE, nr, dir); in ioctl__scnprintf_perf_cmd()
115 static size_t ioctl__scnprintf_usbdevfs_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_usbdevfs_cmd() argument
120 …if (nr < strarray__usbdevfs_ioctl_cmds.nr_entries && strarray__usbdevfs_ioctl_cmds.entries[nr] != … in ioctl__scnprintf_usbdevfs_cmd()
121 return scnprintf(bf, size, "USBDEVFS_%s", strarray__usbdevfs_ioctl_cmds.entries[nr]); in ioctl__scnprintf_usbdevfs_cmd()
123 return scnprintf(bf, size, "(%c, %#x, %#x)", 'U', nr, dir); in ioctl__scnprintf_usbdevfs_cmd()
131 nr = _IOC_NR(cmd), in ioctl__scnprintf_cmd() local
136 size_t (*scnprintf)(int nr, int dir, char *bf, size_t size); in ioctl__scnprintf_cmd()
152 return ioctl_types[index].scnprintf(nr, dir, bf, size); in ioctl__scnprintf_cmd()
168 return printed + scnprintf(bf + printed, size - printed, ", %#x, %#x, %#x)", type, nr, sz); in ioctl__scnprintf_cmd()