Lines Matching refs:num_bytes
47 size_t *num_bytes, in byte_to_block() argument
52 if (*num_bytes % 512 == 0) { in byte_to_block()
54 *blkcnt = (lbaint_t)(*num_bytes / 512); in byte_to_block()
56 *blkcnt = (lbaint_t)(*num_bytes / 512) + 1; in byte_to_block()
59 *blkcnt = (lbaint_t)(*num_bytes / 512) + 1; in byte_to_block()
61 if ((*offset % 512) + (*num_bytes % 512) < 512 || in byte_to_block()
62 (*offset % 512) + (*num_bytes % 512) == 512) { in byte_to_block()
63 *blkcnt = (lbaint_t)(*num_bytes / 512) + 1; in byte_to_block()
65 *blkcnt = (lbaint_t)(*num_bytes / 512) + 2; in byte_to_block()
94 size_t num_bytes, in read_from_partition() argument
113 byte_to_block(&offset, &num_bytes, &offset_blk, &blkcnt); in read_from_partition()
125 if ((offset % 512 == 0) && (num_bytes % 512 == 0)) { in read_from_partition()
139 memcpy(buffer, buffer_temp + (offset % 512), num_bytes); in read_from_partition()
140 *out_num_read = num_bytes; in read_from_partition()
150 size_t num_bytes, in write_to_partition() argument
158 byte_to_block(&offset, &num_bytes, &offset_blk, &blkcnt); in write_to_partition()
176 if ((offset % 512 != 0) && (num_bytes % 512) != 0) in write_to_partition()
180 memcpy(buffer_temp, buffer + (offset % 512), num_bytes); in write_to_partition()
423 size_t num_bytes, in rk_get_random() argument
430 for (i = 0; i < num_bytes; i++) { in rk_get_random()
442 size_t num_bytes, in get_preloaded_partition() argument
492 (ulong)preload_info->addr + num_bytes); in get_preloaded_partition()
497 0, num_bytes, in get_preloaded_partition()
518 *out_num_bytes_preloaded = num_bytes; in get_preloaded_partition()
537 *out_num_bytes_preloaded = num_bytes; /* return what it expects */ in get_preloaded_partition()
556 *out_num_bytes_preloaded = num_bytes; /* return what it expects */ in get_preloaded_partition()