"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "mlabel.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.

mlabel.c  (mtools-4.0.35.tar.bz2):mlabel.c  (mtools-4.0.36.tar.bz2)
skipping to change at line 285 skipping to change at line 285
if (newLabel[0] != '\0') { if (newLabel[0] != '\0') {
ch.ignore_entry = 1; ch.ignore_entry = 1;
result = mwrite_one(RootDir,newLabel,0,labelit,NULL,&ch) ? result = mwrite_one(RootDir,newLabel,0,labelit,NULL,&ch) ?
0 : 1; 0 : 1;
} }
have_boot = 0; have_boot = 0;
if( (!show || newLabel[0]) || set_serial != SER_NONE) { if( (!show || newLabel[0]) || set_serial != SER_NONE) {
Fs = GetFs(RootDir); Fs = GetFs(RootDir);
have_boot = (force_read(Fs,boot.characters,0,sizeof(boot)) == have_boot = (force_pread(Fs,boot.characters,0,sizeof(boot)) ==
sizeof(boot)); sizeof(boot));
} }
if(WORD_S(fatlen)) { if(WORD_S(fatlen)) {
labelBlock = &boot.boot.ext.old.labelBlock; labelBlock = &boot.boot.ext.old.labelBlock;
} else { } else {
labelBlock = &boot.boot.ext.fat32.labelBlock; labelBlock = &boot.boot.ext.fat32.labelBlock;
} }
if(!show || newLabel[0]){ if(!show || newLabel[0]){
skipping to change at line 322 skipping to change at line 322
} }
if((set_serial != SER_NONE) & have_boot) { if((set_serial != SER_NONE) & have_boot) {
if(have_boot && boot.boot.descr >= 0xf0 && has_BPB4) { if(have_boot && boot.boot.descr >= 0xf0 && has_BPB4) {
set_dword(labelBlock->serial, serial); set_dword(labelBlock->serial, serial);
need_write_boot = 1; need_write_boot = 1;
} }
} }
if(need_write_boot) { if(need_write_boot) {
force_write(Fs, (char *)&boot, 0, sizeof(boot)); force_pwrite(Fs, (char *)&boot, 0, sizeof(boot));
/* If this is fat 32, write backup boot sector too */ /* If this is fat 32, write backup boot sector too */
if(!WORD_S(fatlen)) { if(!WORD_S(fatlen)) {
int backupBoot = WORD_S(ext.fat32.backupBoot); int backupBoot = WORD_S(ext.fat32.backupBoot);
force_write(Fs, (char *)&boot, force_pwrite(Fs, (char *)&boot,
backupBoot * WORD_S(secsiz), backupBoot * WORD_S(secsiz),
sizeof(boot)); sizeof(boot));
} }
} }
FREE(&RootDir); FREE(&RootDir);
exit(result); exit(result);
} }
 End of changes. 3 change blocks. 
5 lines changed or deleted 5 lines changed or added

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