Lines Matching refs:bf
21 static size_t ioctl__scnprintf_tty_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_tty_cmd() argument
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
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
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
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
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
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
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
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()
126 static size_t ioctl__scnprintf_cmd(unsigned long cmd, char *bf, size_t size, bool show_prefix) in ioctl__scnprintf_cmd() argument
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()
155 printed += scnprintf(bf + printed, size - printed, "%c", '('); in ioctl__scnprintf_cmd()
158 printed += scnprintf(bf + printed, size - printed, "%s%s", show_prefix ? prefix : "", "NONE"); in ioctl__scnprintf_cmd()
161 printed += scnprintf(bf + printed, size - printed, "%s%s", show_prefix ? prefix : "", "READ"); in ioctl__scnprintf_cmd()
163 printed += scnprintf(bf + printed, size - printed, "%s%s%s", dir & _IOC_READ ? "|" : "", in ioctl__scnprintf_cmd()
168 return printed + scnprintf(bf + printed, size - printed, ", %#x, %#x, %#x)", type, nr, sz); in ioctl__scnprintf_cmd()
175 size_t syscall_arg__scnprintf_ioctl_cmd(char *bf, size_t size, struct syscall_arg *arg) in syscall_arg__scnprintf_ioctl_cmd() argument
183 return ioctl__scnprintf_usbdevfs_cmd(_IOC_NR(cmd), _IOC_DIR(cmd), bf, size); in syscall_arg__scnprintf_ioctl_cmd()
186 return ioctl__scnprintf_cmd(cmd, bf, size, arg->show_string_prefix); in syscall_arg__scnprintf_ioctl_cmd()