Home | History | Annotate | Download | only in block

Lines Matching full:size

184 /* XXX: use host sector size if necessary with:
314 int size, ret, shift, sum;
324 size = (shift + count + 0x1ff) & ~0x1ff;
325 if (size > ALIGNED_BUFFER_SIZE)
326 size = ALIGNED_BUFFER_SIZE;
327 ret = raw_pread_aligned(bs, offset - shift, s->aligned_buf, size);
331 size = 512 - shift;
332 if (size > count)
333 size = count;
334 memcpy(buf, s->aligned_buf + shift, size);
336 buf += size;
337 offset += size;
338 count -= size;
339 sum += size;
350 size = (count + 0x1ff) & ~0x1ff;
351 if (size > ALIGNED_BUFFER_SIZE)
352 size = ALIGNED_BUFFER_SIZE;
354 ret = raw_pread_aligned(bs, offset, s->aligned_buf, size);
358 size = ret;
359 if (size > count)
360 size = count;
362 memcpy(buf, s->aligned_buf, size);
364 buf += size;
365 offset += size;
366 count -= size;
367 sum += size;
397 int size, ret, shift, sum;
410 size = 512 - shift;
411 if (size > count)
412 size = count;
413 memcpy(s->aligned_buf + shift, buf, size);
419 buf += size;
420 offset += size;
421 count -= size;
422 sum += size;
429 while ((size = (count & ~0x1ff)) != 0) {
431 if (size > ALIGNED_BUFFER_SIZE)
432 size = ALIGNED_BUFFER_SIZE;
434 memcpy(s->aligned_buf, buf, size);
436 ret = raw_pwrite_aligned(bs, offset, s->aligned_buf, size);
765 int64_t size;
788 if (ioctl(fd, DIOCGMEDIASIZE, (off_t *)&size))
793 size = pi.media_size;
795 size = 0;
797 if (size == 0)
800 size = LONG_LONG_MAX;
802 size = lseek(fd, 0LL, SEEK_END);
808 if (size == 2048LL * (unsigned)-1)
809 size = 0;
811 if (size <= 0 && !reopened && cdrom_reopen(bs) >= 0) {
821 * use the DKIOCGMEDIAINFO ioctl to read the size.
825 size = minfo.dki_lbsize * minfo.dki_capacity;
831 size = lseek(fd, 0, SEEK_END);
833 return size;
870 .help = "Virtual disk size"
1133 if (!strcmp(options->name, "size")) {