Home
last modified time | relevance | path

Searched refs:bytes_read (Results 1 – 25 of 94) sorted by relevance

1234

/linux/tools/power/acpi/tools/ec/
H A Dec_access.c129 int byte_off, bytes_read; in dump_ec() local
131 bytes_read = read(fd, buf, EC_SPACE_SIZE); in dump_ec()
133 if (bytes_read == -1) in dump_ec()
136 if (bytes_read != EC_SPACE_SIZE) in dump_ec()
137 fprintf(stderr, "Could only read %d bytes\n", bytes_read); in dump_ec()
140 for (byte_off = 0; byte_off < bytes_read; byte_off++) { in dump_ec()
154 bytes_read = read(fd, buf2, EC_SPACE_SIZE); in dump_ec()
156 if (bytes_read == -1) in dump_ec()
159 if (bytes_read != EC_SPACE_SIZE) in dump_ec()
160 fprintf(stderr, "Could only read %d bytes\n", bytes_read); in dump_ec()
[all …]
/linux/drivers/usb/misc/
H A Didmouse.c125 int bytes_read; in idmouse_create_image() local
130 bytes_read = sizeof(HEADER)-1; in idmouse_create_image()
159 while (bytes_read < IMGSIZE) { in idmouse_create_image()
162 dev->bulk_in_buffer + bytes_read, in idmouse_create_image()
177 bytes_read += bulk_read; in idmouse_create_image()
182 for (bytes_read = sizeof(HEADER)-1 + WIDTH-1; bytes_read < IMGSIZE; bytes_read += WIDTH) in idmouse_create_image()
183 if (dev->bulk_in_buffer[bytes_read] != 0x00) in idmouse_create_image()
187 for (bytes_read = IMGSIZE-WIDTH; bytes_read < IMGSIZE-1; bytes_read++) in idmouse_create_image()
188 if (dev->bulk_in_buffer[bytes_read] != 0xFF) in idmouse_create_image()
197 bytes_read); in idmouse_create_image()
/linux/drivers/net/wireless/ath/ath9k/
H A Drng.c73 int bytes_read = 0; in ath9k_rng_read() local
77 bytes_read = ath9k_rng_data_read(sc, buf, max >> 2); in ath9k_rng_read()
79 memcpy(buf + bytes_read, &word, max & 3UL); in ath9k_rng_read()
80 bytes_read += max & 3UL; in ath9k_rng_read()
83 if (!wait || !max || likely(bytes_read) || fail_stats > 110) in ath9k_rng_read()
90 if (wait && !bytes_read && max) in ath9k_rng_read()
91 bytes_read = -EIO; in ath9k_rng_read()
92 return bytes_read; in ath9k_rng_read()
/linux/drivers/net/wwan/iosm/
H A Diosm_ipc_flash.c101 u32 bytes_read; in ipc_flash_link_establish() local
111 IOSM_LER_RSP_SIZE, &bytes_read)) in ipc_flash_link_establish()
114 if (bytes_read != IOSM_LER_RSP_SIZE) in ipc_flash_link_establish()
130 u32 bytes_read; in ipc_flash_receive_data() local
134 IOSM_EBL_HEAD_SIZE, &bytes_read); in ipc_flash_receive_data()
141 if (bytes_read != IOSM_EBL_HEAD_SIZE) { in ipc_flash_receive_data()
147 &bytes_read); in ipc_flash_receive_data()
154 if (bytes_read != size) { in ipc_flash_receive_data()
452 u32 bytes_read, psi_size = fw->size - IOSM_DEVLINK_HDR_SIZE; in ipc_flash_boot_psi() local
470 IOSM_LER_ACK_SIZE, &bytes_read); in ipc_flash_boot_psi()
[all …]
H A Diosm_ipc_coredump.c21 int ret, bytes_to_read, bytes_read = 0, i = 0; in ipc_coredump_collect() local
37 bytes_read = 0; in ipc_coredump_collect()
39 bytes_to_read, &bytes_read); in ipc_coredump_collect()
44 remaining -= bytes_read; in ipc_coredump_collect()
45 i += bytes_read; in ipc_coredump_collect()
/linux/tools/perf/scripts/perl/
H A Drwtop.pl44 $reads{$common_pid}{bytes_read} += $ret;
46 if (!defined ($reads{$common_pid}{bytes_read})) {
47 $reads{$common_pid}{bytes_read} = 0;
136 foreach my $pid (sort { ($reads{$b}{bytes_read} || 0) <=>
137 ($reads{$a}{bytes_read} || 0) } keys %reads) {
141 my $bytes_read = $reads{$pid}{bytes_read} || 0;
144 $total_reads, $bytes_requested, $bytes_read);
H A Drw-by-pid.pl31 $reads{$common_pid}{bytes_read} += $ret;
33 if (!defined ($reads{$common_pid}{bytes_read})) {
34 $reads{$common_pid}{bytes_read} = 0;
82 foreach my $pid (sort { ($reads{$b}{bytes_read} || 0) <=>
83 ($reads{$a}{bytes_read} || 0) } keys %reads) {
87 my $bytes_read = $reads{$pid}{bytes_read} || 0;
90 $total_reads, $bytes_requested, $bytes_read);
/linux/tools/testing/selftests/coredump/
H A Dcoredump_socket_test.c148 ssize_t bytes_read, bytes_write; in TEST_F() local
150 bytes_read = read(fd_coredump, buffer, sizeof(buffer)); in TEST_F()
151 if (bytes_read < 0) { in TEST_F()
156 if (bytes_read == 0) in TEST_F()
159 bytes_write = write(fd_core_file, buffer, bytes_read); in TEST_F()
160 if (bytes_read != bytes_write) { in TEST_F()
163 …rr, "socket test: write to core file failed (read=%zd, write=%zd): %m\n", bytes_read, bytes_write); in TEST_F()
520 ssize_t bytes_read, bytes_write; in TEST_F() local
522 bytes_read = read(fd_coredump, buffer, sizeof(buffer)); in TEST_F()
523 if (bytes_read < 0) { in TEST_F()
[all …]
H A Dcoredump_socket_protocol_test.c174 ssize_t bytes_read, bytes_write; in TEST_F() local
176 bytes_read = read(fd_coredump, buffer, sizeof(buffer)); in TEST_F()
177 if (bytes_read < 0) { in TEST_F()
182 if (bytes_read == 0) in TEST_F()
185 bytes_write = write(fd_core_file, buffer, bytes_read); in TEST_F()
186 if (bytes_read != bytes_write) { in TEST_F()
190 bytes_read, bytes_write); in TEST_F()
324 ssize_t bytes_read; in TEST_F() local
326 bytes_read = read(fd_coredump, buffer, sizeof(buffer)); in TEST_F()
327 if (bytes_read > 0) { in TEST_F()
[all …]
H A Dcoredump_test_helpers.c349 ssize_t bytes_read = read(fd_coredump, buffer, sizeof(buffer)); in process_coredump_worker() local
350 if (bytes_read < 0) { in process_coredump_worker()
356 if (bytes_read == 0) in process_coredump_worker()
358 ssize_t bytes_write = write(fd_core_file, buffer, bytes_read); in process_coredump_worker()
359 if (bytes_write != bytes_read) { in process_coredump_worker()
363 bytes_read, bytes_write); in process_coredump_worker()
/linux/drivers/net/ethernet/cavium/liquidio/
H A Docteon_console.c435 s32 bytes_read) in output_console_line() argument
442 for (i = 0; i < bytes_read; i++) { in output_console_line()
470 if (line != &console_buffer[bytes_read]) { in output_console_line()
471 console_buffer[bytes_read] = '\0'; in output_console_line()
480 s32 bytes_read, tries, total_read; in check_console() local
496 bytes_read = in check_console()
499 if (bytes_read > 0) { in check_console()
500 total_read += bytes_read; in check_console()
505 console_buffer, bytes_read); in check_console()
507 } else if (bytes_read < 0) { in check_console()
[all …]
/linux/drivers/char/
H A Dadi.c51 size_t ver_buf_sz, bytes_read = 0; in adi_read() local
64 while (bytes_read < count) { in adi_read()
74 if (copy_to_user(buf + bytes_read, ver_buf, in adi_read()
80 bytes_read += ver_buf_sz; in adi_read()
83 ver_buf_sz = min_t(size_t, count - bytes_read, in adi_read()
88 (*offp) += bytes_read; in adi_read()
89 ret = bytes_read; in adi_read()
H A Dppdev.c121 ssize_t bytes_read = 0; in pp_read() local
146 while (bytes_read == 0) { in pp_read()
162 bytes_read = (*fn)(pport, kbuffer, need, flags); in pp_read()
164 bytes_read = parport_read(pport, kbuffer, need); in pp_read()
167 if (bytes_read != 0) in pp_read()
171 bytes_read = -EAGAIN; in pp_read()
176 bytes_read = -ERESTARTSYS; in pp_read()
185 if (bytes_read > 0 && copy_to_user(buf, kbuffer, bytes_read)) in pp_read()
186 bytes_read = -EFAULT; in pp_read()
190 return bytes_read; in pp_read()
/linux/fs/befs/
H A Ddatastream.c133 befs_off_t bytes_read = 0; /* bytes readed */ in befs_read_lsymlink() local
139 while (bytes_read < len) { in befs_read_lsymlink()
140 bh = befs_read_datastream(sb, ds, bytes_read, NULL); in befs_read_lsymlink()
143 "starting from %llu", bytes_read); in befs_read_lsymlink()
145 return bytes_read; in befs_read_lsymlink()
148 plen = ((bytes_read + BEFS_SB(sb)->block_size) < len) ? in befs_read_lsymlink()
149 BEFS_SB(sb)->block_size : len - bytes_read; in befs_read_lsymlink()
150 memcpy(buff + bytes_read, bh->b_data, plen); in befs_read_lsymlink()
152 bytes_read += plen; in befs_read_lsymlink()
156 bytes_read); in befs_read_lsymlink()
[all …]
/linux/tools/testing/selftests/sparc64/drivers/
H A Dadi-test.c182 int ret, bytes_read = 0; in read_adi() local
187 ret = read(fd, buf + bytes_read, buf_sz - bytes_read); in read_adi()
194 bytes_read += ret; in read_adi()
196 } while (bytes_read < buf_sz); in read_adi()
199 DEBUG_PRINT_L3("\tRead %d bytes\n", bytes_read); in read_adi()
201 return bytes_read; in read_adi()
207 int ret, i, bytes_read = 0; in pread_adi() local
214 ret = pread(fd, buf + bytes_read, buf_sz - bytes_read, in pread_adi()
222 bytes_read += ret; in pread_adi()
225 } while (bytes_read < buf_sz); in pread_adi()
[all …]
/linux/drivers/mtd/parsers/
H A Dparser_trx.c32 size_t bytes_read; in parser_trx_data_part_name() local
35 err = mtd_read(master, offset, sizeof(buf), &bytes_read, in parser_trx_data_part_name()
58 size_t bytes_read; in parser_trx_parse() local
73 err = mtd_read(mtd, 0, sizeof(trx), &bytes_read, (uint8_t *)&trx); in parser_trx_parse()
/linux/Documentation/usb/
H A Dgadget_printer.rst222 int bytes_read;
231 bytes_read = read(fd[0].fd, buf, BUF_SIZE);
233 if (bytes_read < 0) {
238 } else if (bytes_read > 0) {
240 fwrite(buf, 1, bytes_read, stdout);
274 int bytes_read = fread(buf, 1, BUF_SIZE, stdin);
276 if (!bytes_read) {
280 while (bytes_read) {
287 retval = write(fd[0].fd, buf, bytes_read);
295 bytes_read -= retval;
[all …]
/linux/drivers/w1/slaves/
H A Dw1_ds2413.c33 ssize_t bytes_read = -EIO; in state_read() local
59 bytes_read = 1; in state_read()
77 (bytes_read > 0) ? "succeeded" : "error", retries); in state_read()
78 return bytes_read; in state_read()
/linux/drivers/net/ethernet/netronome/nfp/
H A Dnfp_net_debugdump.c165 int bytes_read; in nfp_net_dump_load_dumpspec() local
179 bytes_read = nfp_rtsym_read(cpp, specsym, 0, dumpspec->data, sym_size); in nfp_net_dump_load_dumpspec()
180 if (bytes_read != sym_size) { in nfp_net_dump_load_dumpspec()
462 int bytes_read; in nfp_dump_csr_range() local
491 bytes_read = nfp_cpp_read(pf->cpp, cpp_id, cpp_rd_addr, in nfp_dump_csr_range()
493 err = bytes_read == reg_sz ? 0 : -EIO; in nfp_dump_csr_range()
617 int bytes_read; in nfp_dump_single_rtsym() local
654 bytes_read = nfp_rtsym_read(pf->cpp, sym, 0, dest, sym_size); in nfp_dump_single_rtsym()
655 if (bytes_read != sym_size) { in nfp_dump_single_rtsym()
656 if (bytes_read >= 0) in nfp_dump_single_rtsym()
[all …]
/linux/drivers/gpib/fmh_gpib/
H A Dfmh_gpib.c52 int *end, size_t *bytes_read) in fmh_gpib_read() argument
56 return nec7210_read(board, &priv->nec7210_priv, buffer, length, end, bytes_read); in fmh_gpib_read()
712 size_t length, int *end, size_t *bytes_read) in fmh_gpib_dma_read() argument
724 *bytes_read = 0; in fmh_gpib_dma_read()
790 *bytes_read += length - residue; in fmh_gpib_dma_read()
797 memcpy(buffer, e_priv->dma_buffer, *bytes_read); in fmh_gpib_dma_read()
801 if ((*bytes_read) >= length) { in fmh_gpib_dma_read()
803 (int)(*bytes_read), (int)length, (int)residue); in fmh_gpib_dma_read()
806 buffer[(*bytes_read)++] = fifos_read(e_priv, FIFO_DATA_REG) & fifo_data_mask; in fmh_gpib_dma_read()
815 if (*bytes_read > 0 && test_bit(READ_READY_BN, &nec_priv->state) == 0) { in fmh_gpib_dma_read()
[all …]
/linux/drivers/nvmem/
H A Du-boot-env.c29 size_t bytes_read; in u_boot_env_read() local
32 err = mtd_read(priv->mtd, offset, bytes, &bytes_read, val); in u_boot_env_read()
38 if (bytes_read != bytes) { in u_boot_env_read()
/linux/drivers/gpib/agilent_82357a/
H A Dagilent_82357a.c221 int bytes_written, bytes_read; in agilent_82357a_write_registers() local
264 &bytes_read, 1000); in agilent_82357a_write_registers()
269 retval, bytes_read); in agilent_82357a_write_registers()
270 agilent_82357a_dump_raw_block(in_data, bytes_read); in agilent_82357a_write_registers()
295 int bytes_written, bytes_read; in agilent_82357a_read_registers() local
343 &bytes_read, 10000); in agilent_82357a_read_registers()
348 retval, bytes_read); in agilent_82357a_read_registers()
349 agilent_82357a_dump_raw_block(in_data, bytes_read); in agilent_82357a_read_registers()
435 int bytes_written, bytes_read; in agilent_82357a_read() local
489 &bytes_read, msec_timeout); in agilent_82357a_read()
[all …]
/linux/drivers/tty/serial/
H A Dsunhv.c124 unsigned long bytes_read, i; in receive_chars_read() local
125 long stat = sun4v_con_read(ra, PAGE_SIZE, &bytes_read); in receive_chars_read()
128 bytes_read = 0; in receive_chars_read()
138 bytes_read = 1; in receive_chars_read()
155 for (i = 0; i < bytes_read; i++) in receive_chars_read()
163 port->icount.rx += bytes_read; in receive_chars_read()
166 bytes_read); in receive_chars_read()
/linux/drivers/pci/hotplug/
H A Dacpiphp_ibm.c359 int bytes_read = -EINVAL; in ibm_read_apci_table() local
365 bytes_read = ibm_get_table_from_acpi(&table); in ibm_read_apci_table()
366 if (bytes_read > 0 && bytes_read <= size) in ibm_read_apci_table()
367 memcpy(buffer, table, bytes_read); in ibm_read_apci_table()
370 return bytes_read; in ibm_read_apci_table()
/linux/drivers/gpib/ni_usb/
H A Dni_usb_gpib.c528 int bytes_written = 0, bytes_read = 0; in ni_usb_write_registers() local
562 retval = ni_usb_receive_bulk_msg(ni_priv, in_data, in_data_length, &bytes_read, 1000, 0); in ni_usb_write_registers()
563 if (retval || bytes_read != 16) { in ni_usb_write_registers()
566 retval, bytes_read); in ni_usb_write_registers()
567 ni_usb_dump_raw_block(in_data, bytes_read); in ni_usb_write_registers()
597 int *end, size_t *bytes_read) in ni_usb_read() argument
613 *bytes_read = 0; in ni_usb_read()
727 *bytes_read = actual_length; in ni_usb_read()
844 int bytes_written = 0, bytes_read = 0; in ni_usb_command_chunk() local
891 retval = ni_usb_receive_bulk_msg(ni_priv, in_data, in_data_length, &bytes_read, in ni_usb_command_chunk()
[all …]

1234