Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 69) sorted by relevance

123

/illumos-kvm-cmd/hw/
H A Dxen_console.c50 struct buffer buffer; argument
60 struct buffer *buffer = &con->buffer; in buffer_append() local
72 if ((buffer->capacity - buffer->size) < size) { in buffer_append()
74 buffer->data = qemu_realloc(buffer->data, buffer->capacity); in buffer_append()
78 buffer->data[buffer->size++] = intf->out[ in buffer_append()
86 buffer->size > buffer->max_capacity) { in buffer_append()
89 size_t over = buffer->size - buffer->max_capacity; in buffer_append()
93 buffer->data = qemu_realloc(buffer->data, buffer->max_capacity); in buffer_append()
94 buffer->size = buffer->capacity = buffer->max_capacity; in buffer_append()
104 if (buffer->consumed == buffer->size) { in buffer_advance()
[all …]
H A Dm48t59.c69 uint8_t *buffer; member
93 (NVRAM->buffer[0x1FF4] & 0x80) == 0 && in alarm_cb()
94 (NVRAM->buffer[0x1FF3] & 0x80) == 0 && in alarm_cb()
95 (NVRAM->buffer[0x1FF2] & 0x80) == 0) { in alarm_cb()
159 NVRAM->buffer[0x1FF0] |= 0x80; in watchdog_cb()
160 if (NVRAM->buffer[0x1FF7] & 0x80) { in watchdog_cb()
161 NVRAM->buffer[0x1FF7] = 0x00; in watchdog_cb()
162 NVRAM->buffer[0x1FFC] &= ~0x40; in watchdog_cb()
175 NVRAM->buffer[0x1FF0] &= ~0x80; in set_up_watchdog()
248 NVRAM->buffer[0x1FF6] = val; in m48t59_write()
[all …]
H A Dbitbang_i2c.c50 uint8_t buffer; member
121 i2c->buffer = (i2c->buffer << 1) | data; in bitbang_i2c_set()
128 i2c->current_addr = i2c->buffer; in bitbang_i2c_set()
133 DPRINTF("Sent 0x%02x\n", i2c->buffer); in bitbang_i2c_set()
134 i2c_send(i2c->bus, i2c->buffer); in bitbang_i2c_set()
144 i2c->buffer = i2c_recv(i2c->bus); in bitbang_i2c_set()
145 DPRINTF("RX byte 0x%02x\n", i2c->buffer); in bitbang_i2c_set()
148 data = i2c->buffer >> 7; in bitbang_i2c_set()
151 i2c->buffer <<= 1; in bitbang_i2c_set()
H A Dbt-hid.c97 uint8_t buffer[1024]; member
132 p.data = s->dataout.buffer; in bt_hid_out()
155 p.data = s->datain.buffer; in bt_hid_in()
156 p.len = sizeof(s->datain.buffer); in bt_hid_in()
275 s->datain.buffer, MIN(rlen, s->datain.len)); in bt_hid_control_transaction()
279 s->dataout.buffer, MIN(rlen, s->dataout.len)); in bt_hid_control_transaction()
283 s->feature.buffer, MIN(rlen, s->feature.len)); in bt_hid_control_transaction()
298 memcpy(s->dataout.buffer, data + 1, s->dataout.len); in bt_hid_control_transaction()
301 memcpy(s->feature.buffer, data + 1, s->feature.len); in bt_hid_control_transaction()
403 hid->datain.buffer, hid->datain.len); in bt_hid_datain()
[all …]
H A Dfile-op-9p.h103 static char buffer[4096]; in rpath() local
104 snprintf(buffer, sizeof(buffer), "%s/%s", ctx->fs_root, path); in rpath()
105 return buffer; in rpath()
H A Dparallel.c185 struct ParallelIOArg ioarg = { .buffer = &parm, .count = 1 }; in parallel_ioport_write_hw()
199 struct ParallelIOArg ioarg = { .buffer = &parm, .count = 1 }; in parallel_ioport_write_hw()
218 .buffer = &eppdata, .count = sizeof(eppdata) in parallel_ioport_eppdata_write_hw2()
241 .buffer = &eppdata, .count = sizeof(eppdata) in parallel_ioport_eppdata_write_hw4()
334 struct ParallelIOArg ioarg = { .buffer = &ret, .count = 1 }; in parallel_ioport_read_hw()
348 struct ParallelIOArg ioarg = { .buffer = &ret, .count = 1 }; in parallel_ioport_read_hw()
370 .buffer = &eppdata, .count = sizeof(eppdata) in parallel_ioport_eppdata_read_hw2()
397 .buffer = &eppdata, .count = sizeof(eppdata) in parallel_ioport_eppdata_read_hw4()
/illumos-kvm-cmd/net/
H A Dtap-win32.c114 tun_buffer_t* buffer = NULL; in get_buffer_from_free_list() local
117 buffer = overlapped->free_list; in get_buffer_from_free_list()
121 buffer->next = NULL; in get_buffer_from_free_list()
122 return buffer; in get_buffer_from_free_list()
136 tun_buffer_t* buffer = NULL; in get_buffer_from_output_queue() local
164 return buffer; in get_buffer_from_output_queue()
179 buffer->next = NULL; in put_buffer_on_output_queue()
497 buffer->buffer, in tap_win32_thread_entry()
498 sizeof(buffer->buffer), in tap_win32_thread_entry()
548 if(buffer != NULL) { in tap_win32_read()
[all …]
/illumos-kvm-cmd/
H A Dqjson.c130 char buffer[1024]; in to_json() local
132 snprintf(buffer, sizeof(buffer), "%" PRId64, qint_get_int(val)); in to_json()
133 qstring_append(str, buffer); in to_json()
244 char buffer[1024]; in to_json() local
247 len = snprintf(buffer, sizeof(buffer), "%f", qfloat_get_double(val)); in to_json()
248 while (len > 0 && buffer[len - 1] == '0') { in to_json()
252 if (len && buffer[len - 1] == '.') { in to_json()
253 buffer[len - 1] = 0; in to_json()
255 buffer[len] = 0; in to_json()
258 qstring_append(str, buffer); in to_json()
H A Dm68k-dis.c727 val = (buffer[0] << 8) + buffer[1]; in fetch_arg()
732 val = (buffer[0] << 8) + buffer[1]; in fetch_arg()
748 val = (buffer[2] << 8) + buffer[3]; in fetch_arg()
754 val = (buffer[2] << 8) + buffer[3]; in fetch_arg()
761 val = (buffer[2] << 8) + buffer[3]; in fetch_arg()
766 val = (buffer[4] << 8) + buffer[5]; in fetch_arg()
772 val = (buffer[4] << 8) + buffer[5]; in fetch_arg()
778 val = (buffer[4] << 8) + buffer[5]; in fetch_arg()
783 val = (buffer[2] << 8) + buffer[3]; in fetch_arg()
1803 buffer[2] = buffer[4]; in match_insn_m68k()
[all …]
H A Dcompatfd.c45 char buffer[128]; in sigwait_compat() local
48 memcpy(buffer, &err, sizeof(err)); in sigwait_compat()
49 while (offset < sizeof(buffer)) { in sigwait_compat()
52 len = write(info->fd, buffer + offset, in sigwait_compat()
53 sizeof(buffer) - offset); in sigwait_compat()
H A Dbuffered_file.c35 uint8_t *buffer; member
60 tmp = qemu_realloc(s->buffer, s->buffer_capacity); in buffered_append()
66 s->buffer = tmp; in buffered_append()
69 memcpy(s->buffer + s->buffer_size, buf, size); in buffered_append()
87 ret = s->put_buffer(s->opaque, s->buffer + offset, in buffered_flush()
106 memmove(s->buffer, s->buffer + offset, s->buffer_size - offset); in buffered_flush()
187 qemu_free(s->buffer); in buffered_close()
H A Djson-parser.c110 static void wchar_to_utf8(uint16_t wchar, char *buffer, size_t buffer_length) in wchar_to_utf8() argument
115 buffer[0] = wchar & 0x7F; in wchar_to_utf8()
116 buffer[1] = 0; in wchar_to_utf8()
120 buffer[0] = 0xC0 | ((wchar >> 6) & 0x1F); in wchar_to_utf8()
121 buffer[1] = 0x80 | (wchar & 0x3F); in wchar_to_utf8()
122 buffer[2] = 0; in wchar_to_utf8()
126 buffer[0] = 0xE0 | ((wchar >> 12) & 0x0F); in wchar_to_utf8()
127 buffer[1] = 0x80 | ((wchar >> 6) & 0x3F); in wchar_to_utf8()
128 buffer[2] = 0x80 | (wchar & 0x3F); in wchar_to_utf8()
129 buffer[3] = 0; in wchar_to_utf8()
H A Dspice-qemu-char.c24 uint8_t *buffer; member
116 s->buffer = qemu_realloc(s->buffer, s->bufsize); in spice_chr_write()
118 memcpy(s->buffer, buf, len); in spice_chr_write()
119 s->datapos = s->buffer; in spice_chr_write()
H A Dcris-dis.c1928 unsigned char *buffer, in print_with_operands() argument
2047 = (buffer[2] + buffer[3] * 256 + buffer[4] * 65536 in print_with_operands()
2048 + buffer[5] * 0x1000000 + addr); in print_with_operands()
2124 number = buffer[2]; in print_with_operands()
2130 number = buffer[2] + buffer[3] * 256; in print_with_operands()
2137 = buffer[2] + buffer[3] * 256 + buffer[4] * 65536 in print_with_operands()
2138 + buffer[5] * 0x1000000; in print_with_operands()
2447 int where = buffer[2] + buffer[3] * 256; in print_with_operands()
2503 long number = buffer[0]; in print_with_operands()
2599 unsigned char buffer[MAX_BYTES_PER_CRIS_INSN]; in print_insn_cris_generic() local
[all …]
H A Dos-posix.c367 char buffer[128]; in qemu_create_pidfile() local
378 len = snprintf(buffer, sizeof(buffer), "%ld\n", (long)getpid()); in qemu_create_pidfile()
379 if (write(fd, buffer, len) != len) { in qemu_create_pidfile()
H A Dos-win32.c246 char buffer[128]; in qemu_create_pidfile() local
259 len = snprintf(buffer, sizeof(buffer), "%ld\n", (long)getpid()); in qemu_create_pidfile()
260 ret = WriteFileEx(file, (LPCVOID)buffer, (DWORD)len, in qemu_create_pidfile()
H A Dnbd.c70 #define read_sync(fd, buffer, size) nbd_wr_sync(fd, buffer, size, true) argument
71 #define write_sync(fd, buffer, size) nbd_wr_sync(fd, buffer, size, false) argument
73 size_t nbd_wr_sync(int fd, void *buffer, size_t size, bool do_read) in nbd_wr_sync() argument
81 len = recv(fd, buffer + offset, size - offset, 0); in nbd_wr_sync()
83 len = send(fd, buffer + offset, size - offset, 0); in nbd_wr_sync()
/illumos-kvm-cmd/kvm/extboot/
H A Dsignrom.c29 char buffer[512], oldbuffer[512]; in main() local
47 size = fread(buffer, 512, 1, fin); in main()
50 sum += buffer[i]; in main()
59 memcpy(oldbuffer, buffer, 512); in main()
/illumos-kvm-cmd/ui/
H A Dvnc-enc-tight.c124 unsigned char *buf = vs->tight.tight.buffer; in tight_detect_smooth_image24()
550 prev = (int *)vs->tight.gradient.buffer; in tight_filter_gradient24()
847 zstream->next_in = vs->tight.tight.buffer; in tight_compress_data()
1210 Buffer *buffer = &vs->tight.jpeg; in jpeg_init_destination() local
1212 cinfo->dest->next_output_byte = (JOCTET *)buffer->buffer + buffer->offset; in jpeg_init_destination()
1213 cinfo->dest->free_in_buffer = (size_t)(buffer->capacity - buffer->offset); in jpeg_init_destination()
1220 Buffer *buffer = &vs->tight.jpeg; in jpeg_empty_output_buffer() local
1222 buffer->offset = buffer->capacity; in jpeg_empty_output_buffer()
1223 buffer_reserve(buffer, 2048); in jpeg_empty_output_buffer()
1232 Buffer *buffer = &vs->tight.jpeg; in jpeg_term_destination() local
[all …]
H A Dvnc.c458 if ((buffer->capacity - buffer->offset) < len) { in buffer_reserve()
460 buffer->buffer = qemu_realloc(buffer->buffer, buffer->capacity); in buffer_reserve()
461 if (buffer->buffer == NULL) { in buffer_reserve()
475 return buffer->buffer + buffer->offset; in buffer_end()
480 buffer->offset = 0; in buffer_reset()
485 qemu_free(buffer->buffer); in buffer_free()
486 buffer->offset = 0; in buffer_free()
487 buffer->capacity = 0; in buffer_free()
488 buffer->buffer = NULL; in buffer_free()
493 memcpy(buffer->buffer + buffer->offset, data, len); in buffer_append()
[all …]
H A Dvnc.h61 uint8_t *buffer; member
460 void buffer_reserve(Buffer *buffer, size_t len);
461 int buffer_empty(Buffer *buffer);
462 uint8_t *buffer_end(Buffer *buffer);
463 void buffer_reset(Buffer *buffer);
464 void buffer_free(Buffer *buffer);
465 void buffer_append(Buffer *buffer, const void *data, size_t len);
H A Dvnc-jobs-async.c55 Buffer buffer; member
174 local->output = queue->buffer; in vnc_async_encoding_start()
248 vs.output.buffer[saved_offset] = (n_rectangles >> 8) & 0xFF; in vnc_worker_thread_loop()
249 vs.output.buffer[saved_offset + 1] = n_rectangles & 0xFF; in vnc_worker_thread_loop()
257 vnc_write(job->vs, vs.output.buffer, vs.output.offset); in vnc_worker_thread_loop()
291 buffer_free(&queue->buffer); in vnc_queue_clear()
H A Dvnc-jobs-sync.c55 vs->output.buffer[job->saved_offset] = (job->rectangles >> 8) & 0xFF; in vnc_job_push()
56 vs->output.buffer[job->saved_offset + 1] = job->rectangles & 0xFF; in vnc_job_push()
/illumos-kvm-cmd/block/
H A Ddmg.c61 uint64_t buffer; in read_off() local
62 if (bdrv_pread(bs->file, offset, &buffer, 8) < 8) in read_off()
64 return be64_to_cpu(buffer); in read_off()
69 uint32_t buffer; in read_uint32() local
70 if (bdrv_pread(bs->file, offset, &buffer, 4) < 4) in read_uint32()
72 return be32_to_cpu(buffer); in read_uint32()
/illumos-kvm-cmd/tests/
H A Dsha1.c38 unsigned char buffer[64]; member
41 void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]);
73 void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]) in SHA1Transform()
82 memcpy(block, buffer, 64); in SHA1Transform()
89 CHAR64LONG16* block = (const CHAR64LONG16*)buffer; in SHA1Transform()
159 memcpy(&context->buffer[j], data, (i = 64-j)); in SHA1Update()
160 SHA1Transform(context->state, context->buffer); in SHA1Update()
167 memcpy(&context->buffer[j], &data[i], len - i); in SHA1Update()

Completed in 67 milliseconds

123