"Fossies" - the Fresh Open Source Software Archive  

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

minfo.c  (mtools-4.0.35.tar.bz2):minfo.c  (mtools-4.0.36.tar.bz2)
skipping to change at line 47 skipping to change at line 47
} }
static void displayInfosector(Stream_t *Stream, union bootsector *boot) static void displayInfosector(Stream_t *Stream, union bootsector *boot)
{ {
InfoSector_t *infosec; InfoSector_t *infosec;
if(WORD(ext.fat32.infoSector) == MAX16) if(WORD(ext.fat32.infoSector) == MAX16)
return; return;
infosec = (InfoSector_t *) safe_malloc(WORD(secsiz)); infosec = (InfoSector_t *) safe_malloc(WORD(secsiz));
force_read(Stream, (char *) infosec, force_pread(Stream, (char *) infosec,
(mt_off_t) WORD(secsiz) * WORD(ext.fat32.infoSector), (mt_off_t) WORD(secsiz) * WORD(ext.fat32.infoSector),
WORD(secsiz)); WORD(secsiz));
printf("\nInfosector:\n"); printf("\nInfosector:\n");
printf("signature=0x%08x\n", _DWORD(infosec->signature1)); printf("signature=0x%08x\n", _DWORD(infosec->signature1));
if(_DWORD(infosec->count) != MAX32) if(_DWORD(infosec->count) != MAX32)
printf("free clusters=%u\n", _DWORD(infosec->count)); printf("free clusters=%u\n", _DWORD(infosec->count));
if(_DWORD(infosec->pos) != MAX32) if(_DWORD(infosec->pos) != MAX32)
printf("last allocated cluster=%u\n", _DWORD(infosec->pos)); printf("last allocated cluster=%u\n", _DWORD(infosec->pos));
} }
/* /*
* Number of hidden sector is only a 4 byte quantity if number of sectors is * Number of hidden sector is only a 4 byte quantity if number of sectors is
skipping to change at line 334 skipping to change at line 334
printf("\n"); printf("\n");
size = WORD_S(secsiz); size = WORD_S(secsiz);
buf = (unsigned char *) malloc(size); buf = (unsigned char *) malloc(size);
if(!buf) { if(!buf) {
fprintf(stderr, "Out of memory error\n"); fprintf(stderr, "Out of memory error\n");
exit(1); exit(1);
} }
ssize = READS(Stream, buf, 0, size); ssize = PREADS(Stream, buf, 0, size);
if(ssize < 0) { if(ssize < 0) {
perror("read boot sector"); perror("read boot sector");
exit(1); exit(1);
} }
print_sector("Boot sector hexdump", buf, (uint16_t)ssize) ; print_sector("Boot sector hexdump", buf, (uint16_t)ssize) ;
} }
} }
FREE(&Stream); FREE(&Stream);
exit(ex); exit(ex);
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added

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