Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 256) sorted by relevance

1234567891011

/illumos-kvm-cmd/hw/
H A Dsmbios.c129 if (get_param_value(buf, sizeof(buf), "vendor", t)) in smbios_build_type_0_fields()
131 strlen(buf) + 1, buf); in smbios_build_type_0_fields()
134 strlen(buf) + 1, buf); in smbios_build_type_0_fields()
135 if (get_param_value(buf, sizeof(buf), "date", t)) in smbios_build_type_0_fields()
155 strlen(buf) + 1, buf); in smbios_build_type_1_fields()
158 strlen(buf) + 1, buf); in smbios_build_type_1_fields()
161 strlen(buf) + 1, buf); in smbios_build_type_1_fields()
164 strlen(buf) + 1, buf); in smbios_build_type_1_fields()
171 if (get_param_value(buf, sizeof(buf), "sku", t)) in smbios_build_type_1_fields()
173 strlen(buf) + 1, buf); in smbios_build_type_1_fields()
[all …]
H A Dacpi.c62 if (get_param_value(buf, sizeof(buf), "sig", t)) { in acpi_table_add()
67 if (get_param_value(buf, sizeof(buf), "rev", t)) { in acpi_table_add()
76 if (get_param_value(buf, sizeof(buf), "oem_id", t)) { in acpi_table_add()
82 if (get_param_value(buf, sizeof(buf), "oem_table_id", t)) { in acpi_table_add()
88 if (get_param_value(buf, sizeof(buf), "oem_rev", t)) { in acpi_table_add()
97 if (get_param_value(buf, sizeof(buf), "asl_compiler_id", t)) { in acpi_table_add()
103 if (get_param_value(buf, sizeof(buf), "asl_compiler_rev", t)) { in acpi_table_add()
112 if (!get_param_value(buf, sizeof(buf), "data", t)) { in acpi_table_add()
118 f = buf; in acpi_table_add()
119 while (buf[0]) { in acpi_table_add()
[all …]
H A Dscsi-generic.c53 uint8_t *buf; member
79 qemu_free(r->buf); in scsi_remove_request()
211 r->buf[0], r->buf[1], r->buf[2], r->buf[3], in scsi_read_data()
212 r->buf[4], r->buf[5], r->buf[6], r->buf[7]); in scsi_read_data()
238 s->qdev.blocksize = (r->buf[9] << 16) | (r->buf[10] << 8) | r->buf[11]; in scsi_write_complete()
287 return r->buf; in scsi_get_buf()
400 uint8_t buf[8]; in get_blocksize() local
406 memset(buf, 0, sizeof(buf)); in get_blocksize()
424 return (buf[4] << 24) | (buf[5] << 16) | (buf[6] << 8) | buf[7]; in get_blocksize()
436 memset(buf, 0, sizeof(buf)); in get_stream_blocksize()
[all …]
H A Dcdrom.c31 static void lba_to_msf(uint8_t *buf, int lba) in lba_to_msf() argument
34 buf[0] = (lba / 75) / 60; in lba_to_msf()
35 buf[1] = (lba / 75) % 60; in lba_to_msf()
36 buf[2] = lba % 75; in lba_to_msf()
41 int cdrom_read_toc(int nb_sectors, uint8_t *buf, int msf, int start_track) in cdrom_read_toc() argument
48 q = buf + 2; in cdrom_read_toc()
79 len = q - buf; in cdrom_read_toc()
80 cpu_to_be16wu((uint16_t *)buf, len - 2); in cdrom_read_toc()
90 q = buf + 2; in cdrom_read_toc_raw()
152 len = q - buf; in cdrom_read_toc_raw()
[all …]
H A Dadb.c66 cmd = buf[0] & 0xf; in adb_request()
76 devaddr = buf[0] >> 4; in adb_request()
91 uint8_t buf[1]; in adb_poll() local
102 obuf[0] = buf[0]; in adb_poll()
215 cmd = buf[0] & 0xc; in adb_kbd_request()
216 reg = buf[0] & 0x3; in adb_kbd_request()
225 switch(buf[2]) { in adb_kbd_request()
236 d->handler = buf[2]; in adb_kbd_request()
386 cmd = buf[0] & 0xc; in adb_mouse_request()
387 reg = buf[0] & 0x3; in adb_mouse_request()
[all …]
H A Dscsi-bus.c350 uint8_t *buf = req->cmd.buf; in scsi_req_lba() local
355 lba = (uint64_t) buf[3] | ((uint64_t) buf[2] << 8) | in scsi_req_lba()
360 lba = (uint64_t) buf[5] | ((uint64_t) buf[4] << 8) | in scsi_req_lba()
361 ((uint64_t) buf[3] << 16) | ((uint64_t) buf[2] << 24); in scsi_req_lba()
364 lba = (uint64_t) buf[9] | ((uint64_t) buf[8] << 8) | in scsi_req_lba()
365 ((uint64_t) buf[7] << 16) | ((uint64_t) buf[6] << 24) | in scsi_req_lba()
366 ((uint64_t) buf[5] << 32) | ((uint64_t) buf[4] << 40) | in scsi_req_lba()
367 ((uint64_t) buf[3] << 48) | ((uint64_t) buf[2] << 56); in scsi_req_lba()
370 lba = (uint64_t) buf[5] | ((uint64_t) buf[4] << 8) | in scsi_req_lba()
371 ((uint64_t) buf[3] << 16) | ((uint64_t) buf[2] << 24); in scsi_req_lba()
[all …]
H A Dtmp105.c27 uint8_t buf[2]; member
102 s->buf[s->len ++] = s->config; in tmp105_read()
106 s->buf[s->len ++] = ((uint16_t) s->limit[0]) >> 8; in tmp105_read()
107 s->buf[s->len ++] = ((uint16_t) s->limit[0]) >> 0; in tmp105_read()
111 s->buf[s->len ++] = ((uint16_t) s->limit[1]) >> 8; in tmp105_read()
124 if (s->buf[0] & ~s->config & (1 << 0)) /* SD */ in tmp105_write()
126 s->config = s->buf[0]; in tmp105_write()
135 ((((uint16_t) s->buf[0]) << 8) | s->buf[1]); in tmp105_write()
146 return s->buf[s->len ++]; in tmp105_rx()
159 s->buf[s->len - 1] = data; in tmp105_tx()
[all …]
H A Donenand.c191 uint8_t buf[512]; in onenand_load_spare() local
208 uint8_t buf[512]; in onenand_prog_spare() local
226 uint8_t buf[512]; in onenand_erase() local
228 memset(buf, 0xff, sizeof(buf)); in onenand_erase()
230 if (onenand_prog_main(s, sec, 1, buf)) in onenand_erase()
232 if (onenand_prog_spare(s, sec, 1, buf)) in onenand_erase()
243 void *buf; in onenand_command() local
251 buf = (s->bufaddr & 8) ? \ in onenand_command()
253 buf += (s->bufaddr & 3) << 9; in onenand_command()
255 buf = (s->bufaddr & 8) ? \ in onenand_command()
[all …]
H A Dusb-wacom.c191 buf[0] = b; in usb_mouse_poll()
192 buf[1] = dx; in usb_mouse_poll()
193 buf[2] = dy; in usb_mouse_poll()
196 buf[3] = dz; in usb_mouse_poll()
224 buf[0] = s->mode; in usb_wacom_poll()
225 buf[5] = 0x00 | (b & 0xf0); in usb_wacom_poll()
226 buf[1] = s->x & 0xff; in usb_wacom_poll()
227 buf[2] = s->x >> 8; in usb_wacom_poll()
228 buf[3] = s->y & 0xff; in usb_wacom_poll()
229 buf[4] = s->y >> 8; in usb_wacom_poll()
[all …]
H A Dextboot.c76 void *buf = NULL; in extboot_write_cmd() local
84 buf = qemu_memalign(512, blen); in extboot_write_cmd()
97 err = bdrv_read(bs, cmd.xfer.sector, buf, cmd.xfer.nb_sectors); in extboot_write_cmd()
101 cpu_physical_memory_write(pa, buf, blen); in extboot_write_cmd()
105 cpu_physical_memory_read(pa, buf, blen); in extboot_write_cmd()
107 err = bdrv_write(bs, cmd.xfer.sector, buf, cmd.xfer.nb_sectors); in extboot_write_cmd()
116 if (buf) in extboot_write_cmd()
117 qemu_free(buf); in extboot_write_cmd()
/illumos-kvm-cmd/
H A Dnbd.c291 if (write_sync(csock, buf, sizeof(buf)) != sizeof(buf)) { in nbd_negotiate()
325 qemu_isprint(buf[0]) ? buf[0] : '.', in nbd_receive_negotiate()
326 qemu_isprint(buf[1]) ? buf[1] : '.', in nbd_receive_negotiate()
327 qemu_isprint(buf[2]) ? buf[2] : '.', in nbd_receive_negotiate()
328 qemu_isprint(buf[3]) ? buf[3] : '.', in nbd_receive_negotiate()
329 qemu_isprint(buf[4]) ? buf[4] : '.', in nbd_receive_negotiate()
544 if (write_sync(csock, buf, sizeof(buf)) != sizeof(buf)) { in nbd_send_request()
558 if (read_sync(csock, buf, sizeof(buf)) != sizeof(buf)) { in nbd_receive_request()
595 memset(buf, 0xAA, sizeof(buf)); in nbd_receive_reply()
597 if (read_sync(csock, buf, sizeof(buf)) != sizeof(buf)) { in nbd_receive_reply()
[all …]
H A Dblockdev.c101 char buf[32]; in drive_add() local
111 snprintf(buf, sizeof(buf), "%d", index); in drive_add()
207 if (!strcmp(buf, "ignore")) { in parse_block_error_action()
224 const char *buf; in drive_init() local
300 buf); in drive_init()
303 if (!strcmp(buf, "none")) in drive_init()
305 else if (!strcmp(buf, "lba")) in drive_init()
316 if (!strcmp(buf, "disk")) { in drive_init()
318 } else if (!strcmp(buf, "cdrom")) { in drive_init()
331 if (!strcmp(buf, "off") || !strcmp(buf, "none")) { in drive_init()
[all …]
H A Dgdbstub.c409 q = buf; in memtohex()
423 mem[i] = (fromhex(buf[0]) << 4) | fromhex(buf[1]); in hextomem()
470 return put_packet_binary(s, buf, strlen(buf)); in put_packet()
2097 snprintf(buf, sizeof(buf), in gdb_handle_packet()
2139 snprintf(buf, sizeof(buf), "E00"); in gdb_handle_packet()
2153 snprintf(buf, sizeof(buf), "E00"); in gdb_handle_packet()
2218 snprintf(buf, sizeof(buf), in gdb_vm_state_change()
2260 p = buf; in gdb_do_syscall()
2381 char buf[4]; in gdb_exit() local
2393 snprintf(buf, sizeof(buf), "W%02x", (uint8_t)code); in gdb_exit()
[all …]
H A Dqemu-io.c60 void *buf; in qemu_io_alloc() local
68 return buf; in qemu_io_alloc()
132 void *buf = NULL; in create_iovec() local
173 return buf; in create_iovec()
355 char *buf; in read_f() local
534 char *buf; in readv_f() local
659 char *buf; in write_f() local
790 char *buf; in writev_f() local
894 char **buf; in multiwrite_f() local
934 buf = qemu_malloc(nr_reqs * sizeof(*buf)); in multiwrite_f()
[all …]
H A Dos-posix.c99 char buf[PATH_MAX]; in os_find_datadir() local
105 len = readlink("/proc/self/exe", buf, sizeof(buf) - 1); in os_find_datadir()
107 buf[len] = 0; in os_find_datadir()
108 p = buf; in os_find_datadir()
114 size_t len = sizeof(buf) - 1; in os_find_datadir()
116 *buf = '\0'; in os_find_datadir()
117 if (!sysctl(mib, ARRAY_SIZE(mib), buf, &len, NULL, 0) && in os_find_datadir()
118 *buf) { in os_find_datadir()
119 buf[sizeof(buf) - 1] = '\0'; in os_find_datadir()
120 p = buf; in os_find_datadir()
[all …]
H A Dqemu-char.c183 vsnprintf(buf, sizeof(buf), fmt, ap); in qemu_chr_printf()
184 qemu_chr_write(s, (uint8_t *)buf, strlen(buf)); in qemu_chr_printf()
503 buf += ret; in send_all()
526 buf += ret; in send_all()
566 len = sizeof(buf); in fd_chr_read()
697 uint8_t buf[1]; in stdio_read() local
882 len = sizeof(buf); in pty_chr_read()
1831 s->bufcnt = recv(s->fd, (void *)s->buf, sizeof(s->buf), 0); in udp_chr_read()
1958 buf[j] = buf[i]; in tcp_chr_process_IAC_bytes()
1977 buf[j] = buf[i]; in tcp_chr_process_IAC_bytes()
[all …]
/illumos-kvm-cmd/net/
H A Dslirp.c332 get_str_sep(buf, sizeof(buf), &p, ':'); in net_slirp_hostfwd_remove()
334 if (!strcmp(buf, "tcp") || buf[0] == '\0') { in net_slirp_hostfwd_remove()
342 if (get_str_sep(buf, sizeof(buf), &p, ':') < 0) { in net_slirp_hostfwd_remove()
345 if (buf[0] != '\0' && !inet_aton(buf, &host_addr)) { in net_slirp_hostfwd_remove()
377 if (!strcmp(buf, "tcp") || buf[0] == '\0') { in slirp_hostfwd()
386 if (get_str_sep(buf, sizeof(buf), &p, ':') < 0) { in slirp_hostfwd()
402 if (get_str_sep(buf, sizeof(buf), &p, ':') < 0) { in slirp_hostfwd()
405 if (buf[0] != '\0' && !inet_aton(buf, &guest_addr)) { in slirp_hostfwd()
592 if (get_str_sep(buf, sizeof(buf), &p, ':') < 0) { in slirp_guestfwd()
599 if (strcmp(buf, "tcp") && buf[0] != '\0') { in slirp_guestfwd()
[all …]
/illumos-kvm-cmd/hw/ide/
H A Dcore.c84 buf[i] = ' '; in padstr8()
329 s->data_ptr = buf; in ide_transfer_start()
685 return (buf[0] << 8) | buf[1]; in ube16_to_cpu()
690 return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; in ube32_to_cpu()
704 buf[0] = 0x00; in cd_data_to_raw()
706 buf[11] = 0x00; in cd_data_to_raw()
707 buf += 12; in cd_data_to_raw()
711 buf += 4; in cd_data_to_raw()
713 buf += 2048; in cd_data_to_raw()
1077 uint8_t *buf; in ide_atapi_cmd() local
[all …]
/illumos-kvm-cmd/tests/
H A Dtestthread.c14 char buf[512]; in thread1_func() local
17 snprintf(buf, sizeof(buf), "thread1: %d %s\n", i, (char *)arg); in thread1_func()
18 write(1, buf, strlen(buf)); in thread1_func()
27 char buf[512]; in thread2_func() local
29 snprintf(buf, sizeof(buf), "thread2: %d %s\n", i, (char *)arg); in thread2_func()
30 write(1, buf, strlen(buf)); in thread2_func()
/illumos-kvm-cmd/audio/
H A Dmixeng.c332 void mixeng_clear (struct st_sample *buf, int len) in mixeng_clear() argument
334 memset (buf, 0, len * sizeof (struct st_sample)); in mixeng_clear()
337 void mixeng_volume (struct st_sample *buf, int len, struct mixeng_volume *vol) in mixeng_volume() argument
341 mixeng_clear (buf, len); in mixeng_volume()
347 buf->l = buf->l * vol->l; in mixeng_volume()
348 buf->r = buf->r * vol->r; in mixeng_volume()
350 buf->l = (buf->l * vol->l) >> 32; in mixeng_volume()
351 buf->r = (buf->r * vol->r) >> 32; in mixeng_volume()
353 buf += 1; in mixeng_volume()
356 (void) buf; in mixeng_volume()
/illumos-kvm-cmd/kvm/libfdt/
H A Dfdt_rw.c384 fdt_set_off_dt_struct(buf, struct_off); in _packblocks()
415 err = fdt_move(fdt, buf, bufsize); in fdt_open_into()
418 fdt_set_version(buf, 17); in fdt_open_into()
420 fdt_set_totalsize(buf, bufsize); in fdt_open_into()
431 if (((buf + newsize) <= fdt) in fdt_open_into()
433 tmp = buf; in fdt_open_into()
441 memmove(buf, tmp, newsize); in fdt_open_into()
443 fdt_set_magic(buf, FDT_MAGIC); in fdt_open_into()
444 fdt_set_totalsize(buf, bufsize); in fdt_open_into()
445 fdt_set_version(buf, 17); in fdt_open_into()
[all …]
/illumos-kvm-cmd/linux-user/
H A Dflatload.c107 void *buf; in target_pread() local
139 unsigned char *buf; in decompress_exec() local
153 if (buf == NULL) { in decompress_exec()
163 strm.next_in = buf; in decompress_exec()
176 if ((buf[0] != 037) || ((buf[1] != 0213) && (buf[1] != 0236))) { in decompress_exec()
182 if (buf[2] != 8) { in decompress_exec()
187 if ((buf[3] & ENCRYPTED) || (buf[3] & CONTINUATION) || in decompress_exec()
195 ret += 2 + buf[10] + (buf[11] << 8); in decompress_exec()
238 strm.next_in = buf; in decompress_exec()
253 kfree(buf); in decompress_exec()
[all …]
H A Dlinuxload.c99 retval = read(bprm->fd, bprm->buf, BPRM_BUF_SIZE); in prepare_binprm()
106 memset(bprm->buf + retval, 0, BPRM_BUF_SIZE - retval); in prepare_binprm()
178 if (bprm->buf[0] == 0x7f in loader_exec()
179 && bprm->buf[1] == 'E' in loader_exec()
180 && bprm->buf[2] == 'L' in loader_exec()
181 && bprm->buf[3] == 'F') { in loader_exec()
184 } else if (bprm->buf[0] == 'b' in loader_exec()
185 && bprm->buf[1] == 'F' in loader_exec()
186 && bprm->buf[2] == 'L' in loader_exec()
187 && bprm->buf[3] == 'T') { in loader_exec()
/illumos-kvm-cmd/block/
H A Dvpc.c138 res += buf[i]; in vpc_checksum()
157 uint8_t buf[HEADER_SIZE]; in vpc_open() local
399 buf += sectors * BDRV_SECTOR_SIZE; in vpc_read()
405 const uint8_t *buf, int nb_sectors) in vpc_write() argument
495 uint8_t buf[1024]; in vpc_create() local
498 (struct vhd_dyndisk_header*) buf; in vpc_create()
532 memset(buf, 0, 1024); in vpc_create()
581 memset(buf, 0xFF, 512); in vpc_create()
583 if (write(fd, buf, 512) != 512) { in vpc_create()
590 memset(buf, 0, 1024); in vpc_create()
[all …]
/illumos-kvm-cmd/target-i386/
H A Dcpuid.c740 *buf = '\0'; in listflags()
770 char buf[256]; in x86_cpu_list() local
774 listflags(buf, sizeof (buf), (uint32_t)~0, feature_name, 1); in x86_cpu_list()
776 listflags(buf, sizeof (buf), (uint32_t)~0, ext_feature_name, 1); in x86_cpu_list()
778 listflags(buf, sizeof (buf), (uint32_t)~0, ext2_feature_name, 1); in x86_cpu_list()
780 listflags(buf, sizeof (buf), (uint32_t)~0, ext3_feature_name, 1); in x86_cpu_list()
785 snprintf(buf, sizeof (buf), def->flags ? "[%s]": "%s", def->name); in x86_cpu_list()
801 listflags(buf, sizeof (buf), def->features, feature_name, 0); in x86_cpu_list()
803 buf); in x86_cpu_list()
804 listflags(buf, sizeof (buf), def->ext_features, ext_feature_name, in x86_cpu_list()
[all …]

Completed in 86 milliseconds

1234567891011