|
Lines 506-511
static pwrite64_t pwrite64_method = pwri
Link Here
|
| 506 |
*/ |
506 |
*/ |
| 507 |
static char *the_buffer; |
507 |
static char *the_buffer; |
| 508 |
static unsigned int the_buffer_size=DEFAULT_BUF_SIZE_MB*1024*1024; |
508 |
static unsigned int the_buffer_size=DEFAULT_BUF_SIZE_MB*1024*1024; |
|
|
509 |
static unsigned int directio_chunk = 4 * 1024 * 1024; |
| 509 |
|
510 |
|
| 510 |
/* |
511 |
/* |
| 511 |
* Synchronization objects |
512 |
* Synchronization objects |
|
Lines 1968-1977
int builtin_dd (int infd,int outfd,off64
Link Here
|
| 1968 |
highest_ecc_block = off/DVD_BLOCK; |
1969 |
highest_ecc_block = off/DVD_BLOCK; |
| 1969 |
assert (highest_ecc_block==2); |
1970 |
assert (highest_ecc_block==2); |
| 1970 |
/* Fill the_buffer up to the_buffer_size */ |
1971 |
/* Fill the_buffer up to the_buffer_size */ |
| 1971 |
while ((n=read (infd,the_buffer+off,the_buffer_size-off)) > 0) |
1972 |
while (off < the_buffer_size) { |
| 1972 |
{ off += n; |
1973 |
unsigned int to_read = the_buffer_size - off; |
| 1973 |
if (off == the_buffer_size) |
1974 |
|
|
|
1975 |
if (to_read > directio_chunk) |
| 1976 |
to_read = directio_chunk; |
| 1977 |
|
| 1978 |
if ((n = read(infd, the_buffer+off, to_read)) <= 0) |
| 1974 |
break; |
1979 |
break; |
|
|
1980 |
off += n; |
| 1975 |
} |
1981 |
} |
| 1976 |
if (n<0) goto out; |
1982 |
if (n<0) goto out; |
| 1977 |
|
1983 |
|