"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "copyfile.c" between
mtools-4.0.35.tar.bz2 and mtools-4.0.36.tar.bz2

About: Mtools is a collection of utilities to access MS-DOS disks from Unix without mounting them.

copyfile.c  (mtools-4.0.35.tar.bz2):copyfile.c  (mtools-4.0.36.tar.bz2)
skipping to change at line 46 skipping to change at line 46
return -1; return -1;
} }
if (!Target){ if (!Target){
fprintf(stderr,"Couldn't open target file\n"); fprintf(stderr,"Couldn't open target file\n");
return -1; return -1;
} }
pos = 0; pos = 0;
while(1){ while(1){
ret = READS(Source, buffer, pos, 8*16384); ret = READS(Source, buffer, 8*16384);
if (ret < 0 ){ if (ret < 0 ){
perror("file read"); perror("file read");
return -1; return -1;
} }
if(!ret) if(!ret)
break; break;
if(got_signal) if(got_signal)
return -1; return -1;
if (ret == 0) if (ret == 0)
break; break;
if ((retw = force_write(Target, buffer, if ((retw = force_write(Target, buffer, (size_t) ret)) != ret){
pos, (size_t) ret)) != ret){
if(retw < 0 ) if(retw < 0 )
perror("write in copy"); perror("write in copy");
else else
fprintf(stderr, fprintf(stderr,
"Short write %zd instead of %zd\n", "Short write %zd instead of %zd\n",
retw, ret); retw, ret);
if(errno == ENOSPC) if(errno == ENOSPC)
got_signal = 1; got_signal = 1;
return ret; return ret;
} }
 End of changes. 2 change blocks. 
3 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)