patch-src_fat_c 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. --- dosfstools-3.0.26.orig/src/fat.c 2014-01-17 07:07:05.000000000 +0100
  2. +++ dosfstools-3.0.26/src/fat.c 2014-03-26 13:37:03.000000000 +0100
  3. @@ -180,7 +180,7 @@ void set_fat(DOS_FS * fs, uint32_t clust
  4. {
  5. unsigned char *data = NULL;
  6. int size;
  7. - loff_t offs;
  8. + off_t offs;
  9. if (new == -1)
  10. new = FAT_EOF(fs);
  11. @@ -264,9 +264,9 @@ uint32_t next_cluster(DOS_FS * fs, uint3
  12. return FAT_IS_EOF(fs, value) ? -1 : value;
  13. }
  14. -loff_t cluster_start(DOS_FS * fs, uint32_t cluster)
  15. +off_t cluster_start(DOS_FS * fs, uint32_t cluster)
  16. {
  17. - return fs->data_start + ((loff_t) cluster -
  18. + return fs->data_start + ((off_t) cluster -
  19. 2) * (uint64_t)fs->cluster_size;
  20. }
  21. @@ -475,7 +475,7 @@ void reclaim_file(DOS_FS * fs)
  22. /* If this cluster is the head of an orphan chain... */
  23. if (get_owner(fs, i) == &orphan && !num_refs[i]) {
  24. DIR_ENT de;
  25. - loff_t offset;
  26. + off_t offset;
  27. files++;
  28. offset = alloc_rootdir_entry(fs, &de, "FSCK%04dREC");
  29. de.start = htole16(i & 0xffff);