2 Author: Pali Rohár <pali.rohar@gmail.com>
3 Date: Sun Jan 31 13:26:03 2021 +0100
5 Add missing files into distribution tarball
8 Author: Pali Rohár <pali.rohar@gmail.com>
9 Date: Sun Jan 31 03:03:39 2021 +0100
11 mkfs.fat: Read geom_start from sysfs
13 HDIO_GETGEO which provides start member is not supported for loop block
14 devices. Also start member is only unsigned long so it cannot be used for
15 bigger disks. So instead read geom_start from sysfs and store it into long
16 long type to prevent overflow.
19 Author: Pali Rohár <pali.rohar@gmail.com>
20 Date: Fri Jan 29 16:40:56 2021 +0100
22 Autogenerate release date in manpages
25 Author: Pali Rohár <pali.rohar@gmail.com>
26 Date: Fri Jan 29 16:40:20 2021 +0100
28 Update (C) and maintainers
31 Author: Pali Rohár <pali.rohar@gmail.com>
32 Date: Fri Jan 29 16:33:41 2021 +0100
34 Add TODO comments for checking integer overflow
37 Author: Pali Rohár <pali.rohar@gmail.com>
38 Date: Sat Jan 19 13:28:45 2019 +0100
40 Replace uint64_t type by unsigned long long type
43 Author: Pali Rohár <pali.rohar@gmail.com>
44 Date: Sat Jan 19 13:22:05 2019 +0100
46 Remove useless casting to uint64_t or long long in check_file()
48 Value of clusters * fs->cluster_size is file size and it always fits into
49 32bit value. So use just unsigned int type for it.
52 Author: Pali Rohár <pali.rohar@gmail.com>
53 Date: Sat Jan 19 13:20:16 2019 +0100
55 Check that file size is not larger than maximal possible size
58 Author: Pali Rohár <pali.rohar@gmail.com>
59 Date: Sat Jan 19 13:15:25 2019 +0100
61 Change fat_size type from off_t to unsigned int
63 Value in fat_size is result of multiplication of two 16bit unsigned values,
64 therefore it fits into unsigned int.
67 Author: Pali Rohár <pali.rohar@gmail.com>
68 Date: Fri Jan 29 02:10:58 2021 +0100
70 testsuite: Add reference images of fsck result tests
72 This ensures that fsck does not change its behavior and repair filesystems
73 in the same way. Repaired reference images were generated by dosfstools 4.1
74 to ensure that they are still same.
77 Author: Pali Rohár <pali.rohar@gmail.com>
78 Date: Fri Jan 29 02:10:22 2021 +0100
80 testsuite: Add fsck tests for fat labels
83 Author: Pali Rohár <pali.rohar@gmail.com>
84 Date: Sun Jan 3 23:22:42 2021 +0100
86 fsck.fat: Check and fix label
88 Checks the volume label from the root directory entry that is valid and
89 matches the label stored in boot sector.
91 Add new command line option -U which consider lowercase volume label as
92 invalid and allows only uppercase labels. By default lowercase volume
96 Author: Pali Rohár <pali.rohar@gmail.com>
97 Date: Tue Jan 14 00:58:21 2020 +0100
99 Simplify usage of validate_volume_label() function
101 Use new function dos_string_to_wchar_string() for converting label from DOS
102 OEM code page to wchar_t* string. Therefore caller does not have to supply
103 label in both DOS OEM encoding and locale independent wchar_t* string.
106 Author: Pali Rohár <pali.rohar@gmail.com>
107 Date: Sun Aug 19 18:54:07 2018 +0200
109 Update warning message about lowercase labels
111 They are working fine on MS-DOS and Windows systems.
114 Author: Pali Rohár <pali.rohar@gmail.com>
115 Date: Wed Aug 15 16:35:48 2018 +0200
117 charconv: Add functions for converting DOS strings to locale independent wchar_t strings
119 Use iconv library for it. And as a fallback use internal cp850_table.
122 Author: Pali Rohár <pali.rohar@gmail.com>
123 Date: Thu Jan 28 10:39:36 2021 +0100
125 testsuite: Update mkfs-fat32_2_res_sects.xxd test as it is now not aligned due to -a
128 Author: Pali Rohár <pali.rohar@gmail.com>
129 Date: Wed Jan 27 02:03:39 2021 +0100
131 manpages: End every sentence by a newline
134 Author: Pali Rohár <pali.rohar@gmail.com>
135 Date: Wed Jan 27 02:01:48 2021 +0100
137 mkfs.fat: Do not align number of sectors when -a was specified
140 Author: Pali Rohár <pali.rohar@gmail.com>
141 Date: Wed Jan 27 02:00:33 2021 +0100
143 mkfs.fat: Document that -r and -R specify minimal number (and not exact)
146 Author: Pali Rohár <pali.rohar@gmail.com>
147 Date: Wed Jan 27 01:58:38 2021 +0100
149 fsck: Move check_dirty_bits() from boot.c to check.c
152 Author: Pali Rohár <pali.rohar@gmail.com>
153 Date: Sun Jan 17 16:15:41 2021 +0100
155 fatlabel: Print warnings on stderr
157 Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803391
160 Author: Pali Rohár <pali.rohar@gmail.com>
161 Date: Sun Jan 17 19:45:26 2021 +0100
163 fatlabel: Do not call parts of fsck repair procedure
165 This change adds a new parameter for read_fat() function to indicate a mode
166 in which filesystem is doing to be used: Read-only, Read-write or Repair.
168 fsck.fat uses Repair mode and fatlabel either Read-only or Read-write
169 (which depends on fatlabel operation).
171 fatlabel cannot repair broken FAT filesystem like fsck.fat. So when trying
172 to modify FAT label on currupted FAT filesystem rather throw an fatal error
173 indicating that running fsck.fat is needed.
175 When fatlabel was called to just read existing FAT label, first FAT table
176 is corrupted and second FAT table is clean then use second FAT table.
178 This change also ensures that fatlabel does not print fsck/repair messages
179 on stdout, which should be used only for printing FAT label.
182 Author: Pali Rohár <pali.rohar@gmail.com>
183 Date: Sun Jan 17 22:47:18 2021 +0100
185 testsuite: Add tests for DOS Clean Shutdown bit
188 Author: Pali Rohár <pali.rohar@gmail.com>
189 Date: Sun Jan 17 20:20:39 2021 +0100
191 testsuite: Add fsck tests with broken first FAT cluster
193 Extend also test-fsck script to read additional arguments from .args file.
196 Author: Pali Rohár <pali.rohar@gmail.com>
197 Date: Sun Jan 17 19:34:10 2021 +0100
199 fsck.fat: Add code for fixing first FAT cluster
201 This patch tries to fix infamous fsck.fat error:
203 Both FATs appear to be corrupt. Giving up.
205 It just fill again FAT media type and sets other bits to one as it is
206 required by FAT specification. Similar thing is doing also Windows chkdsk
209 In the most cases corrupted first FAT cluster is fatal error which
210 indicates totally corrupted filesystem impossible to repair. So fixing
211 first FAT cluster is not done by fsck.fat automatically and needs to be
212 enabled by a new -F option, which forces usage of specified FAT table
213 (either clean or corrupted).
216 Author: Pali Rohár <pali.rohar@gmail.com>
217 Date: Sat Nov 17 01:12:52 2018 +0100
219 mkfs.fat: Allow to specify disk geometry via new -g option
222 Author: Pali Rohár <pali.rohar@gmail.com>
223 Date: Fri Jan 8 11:49:27 2021 +0100
225 testsuite: Add mkfs test for 600MB large 4K disk
228 Author: Pali Rohár <pali.rohar@gmail.com>
229 Date: Sun Oct 14 16:19:51 2018 +0200
231 mkfs.fat: Do not show verbose messages not relevant to selected FAT size
234 Author: Pali Rohár <pali.rohar@gmail.com>
235 Date: Fri Aug 17 14:26:30 2018 +0200
237 mkfs.fat: Fix text of verbose messages
240 Author: Pali Rohár <pali.rohar@gmail.com>
241 Date: Tue Aug 14 15:48:50 2018 +0200
243 mkfs.fat: Fix limits for number of clusters
245 According to Microsoft FAT specification (fatgen103.doc) disk with at least
246 4085 clusters and less then 65525 clusters is FAT16.
248 But Microsoft Windows FAT driver fastfat.sys detects disk with less then
249 4087 clusters as FAT12. Linux FAT drivers msdos.ko and vfat.ko detect disk
250 with 4085 clusters (or more) as FAT16, therefore for compatibility reasons
251 with both systems disallow formatting disks to 4085 or 4086 clusters.
253 So after this change mkfs.fat disallow to create a FAT16 which would be
254 misinterpreted as FAT12. Next run of cluster detection algorithm would
255 choose higher cluster size which decrease number of clusters.
257 According to specification, FAT32 is detected by at least 65525 clusters,
258 but Microsoft Windows FAT driver fastfat.sys, Linux FAT drivers msdos.ko
259 and vfat.ko detect disk as FAT32 when Sectors Per FAT (fat_length) is set
263 Author: Pali Rohár <pali.rohar@gmail.com>
264 Date: Sat Aug 11 20:34:08 2018 +0200
266 mkfs.fat: Fix calculation of FAT32 cluster size on non 512 bytes sector disks
268 Previous FAT32 calculation worked correctly only for disks with 512 byte
269 sectors. New calculation formula is generalized variant of previous one,
270 but to be sector size independent.
273 Author: Pali Rohár <pali.rohar@gmail.com>
274 Date: Wed Aug 15 15:11:30 2018 +0200
276 mkfs.fat: Fix printing number of sectors
278 It is unsigned 32bit number therefore use %u format.
281 Author: Pali Rohár <pali.rohar@gmail.com>
282 Date: Wed Aug 15 15:15:06 2018 +0200
284 mkfs.fat: Align total number of sectors to be multiple of sectors per track
286 This requirement is needed by DOS systems and also by Linux mtools project.
287 Without proper alignment, mtools applications refuse to work on such
291 Author: Pali Rohár <pali.rohar@gmail.com>
292 Date: Sun Jan 10 22:29:48 2021 +0100
294 testsuite: Add referenceFAT32mbr test data to dist_check_DATA
297 Author: Pali Rohár <pali.rohar@gmail.com>
298 Date: Sun Jan 10 22:16:49 2021 +0100
300 manpages: Escape dot in fsck.fat manpage at the beginning of the line
303 Author: felix <felix.von.s@posteo.de>
304 Date: Mon Apr 2 22:43:46 2018 +0200
306 fsck.fat: properly check for valid "." and ".." entries
308 This change makes fsck.fat check whether "." and ".." entries exist in
309 all non-root directories as the two very first. If those entries are
310 occupied by some other file, fsck.fat will offer to move them to some
311 later slot. "." and ".." entries found in any other slots are treated
312 as ordinary bad-shortname entries. The test case for this situation has
313 been enabled and verified to perform as expected.
315 The function drop_file() was also modified so that it does not mark
316 dropped file clusters as free. This was necessary because otherwise
317 dropping too-late "." and ".." entries would delete their containing
318 directory. If deleted entries' clusters are truly no longer used, they
319 shall be picked up by a later reclamation stage.
321 Additionally, subdirs() and check_file() were modified not to check
322 unused directory entries.
324 Additionally-fixed-by: Dave Odell <dmo2118@gmail.com>
327 Author: C. Masloch <pushbx@ulukai.org>
328 Date: Sat Oct 24 13:53:08 2020 +0200
330 fsck.fat: preserve info sector reserved fields
332 This allows the FSIBOOT stage of lDOS boot32.asm to remain
333 in the FSINFO sector even when the info entries are reset.
335 I reviewed several sources to determine whether we are in the right to
336 assume that the reserved 480 bytes used by FSIBOOT should be preserved
337 by drivers updating the FSINFO entry fields.
339 Quoting the document "Microsoft Extensible Firmware Initiative - FAT32
340 File System Specification - FAT: General Overview of On-Disk Format -
341 Version 1.03, December 6, 2000" on these bytes:
343 > [Name] FSI_Reserved1
349 > [Description] This field is currently reserved for future expansion.
350 > FAT32 format code should always initialize all bytes of this field
351 > to 0. Bytes in this field must currently never be used.
353 This specifically states that "FAT32 format code" should zero-initialise
354 this space. It does not specify that a driver should or should not reset
357 The FreeDOS kernel uses a struct [1] that does not include the space
358 used by FSIBOOT. Its driver's implementation [2] does preserve the
359 FSIBOOT area. I have verified this in dosemu2; if the FreeDOS kernel
360 updates the FSINFO sector it preserves this area.
362 The Linux kernel uses a struct with a "reserved1" member [3] which is
363 commented as being "Nothing as far as I can tell". If I am reading the
364 source correctly, its driver [4] also preserves this area when updating
367 Testing on MS-DOS version 7.10 (as bundled with MS Windows 98 SE) I
368 determined that it also preserves the area when updating the FSINFO entries.
370 The free software RxDOS/lDOS boot loader for FAT32 that I wrote uses
371 this reserved area to store its FSIBOOT stage, essentially an extension
372 to the primary boot sector loader. To avoid clashing with Microsoft
373 loaders which may use some of the reserved sectors, the large reserved
374 area in the FSINFO sector was selected to hold this stage (if sector
375 size is <= 512 bytes). If valid, the area starts with a signature [5]
376 the first four bytes of which form the letters "FSIB"; the subsequent
377 four bytes specify a protocol version. For example, the current
378 (non-experimental) version is "FSIBOOT3" [6].
380 If there is no FSINFO sector or the FSIBOOT signature does not match the
381 one expected, then the 'I' error code letter ("i"nvalid FS"I"BOOT) is
382 displayed and the loading is aborted [7]. Prior to this patch, if the
383 FSINFO entries were invalid (any of the three FSINFO signatures don't
384 match) and then fsck.fat was used and instructed to correct this, it
385 would reset the space used by FSIBOOT, rendering the image unbootable
386 if the lDOS boot32 loader had been installed into the image.
388 I previously posted a similar patch for mtools to the info-mtools
389 mailing list [8]. I was approached to check whether dosfstools behaved
390 as expected. I determined that this patch is needed to fix the corner
391 case of invalid FSINFO entries with FSIBOOT installed into the sector.
392 I also patched the lDOS instsect application [9] so it insures that the
393 FSINFO entries are valid while installing FSIBOOT. With either that
394 patch to instsect or this patch to dosfstools, FSIBOOT will always be
395 preserved when running fsck.fat on a file system.
398 https://github.com/FDOS/kernel/blob/6e42bb6d7c6dd304f738cf0d7a2db719598f1b9e/hdr/device.h#L325
400 https://github.com/FDOS/kernel/blob/6e42bb6d7c6dd304f738cf0d7a2db719598f1b9e/kernel/fattab.c#L116
402 https://github.com/torvalds/linux/blob/7cf726a59435301046250c42131554d9ccc566b8/include/uapi/linux/msdos_fs.h#L163
404 https://github.com/torvalds/linux/blob/7cf726a59435301046250c42131554d9ccc566b8/fs/fat/misc.c#L60
405 [5]: https://hg.ulukai.org/ecm/ldosboot/file/aa15fd7bc58e/boot32.asm#l1164
406 [6]: https://hg.ulukai.org/ecm/ldosboot/file/aa15fd7bc58e/boot32.asm#l27
407 [7]: https://hg.ulukai.org/ecm/ldosboot/file/aa15fd7bc58e/boot32.asm#l775
408 [8]: https://lists.gnu.org/archive/html/info-mtools/2020-10/msg00000.html
409 [9]: https://hg.ulukai.org/ecm/instsect/rev/eee5dfaa52f6
412 Author: Pali Rohár <pali.rohar@gmail.com>
413 Date: Sun Feb 16 12:33:32 2020 +0100
415 mkfs.fat: Update --help for -h (hidden sectors)
418 Author: Pali Rohár <pali.rohar@gmail.com>
419 Date: Sun Feb 16 12:22:04 2020 +0100
421 mkfs.fat: Relax -D option (BIOS drive number)
423 Allow to specify also second hard disk (0x81) or second floppy device
424 (0x01) as -D option = BIOS drive number.
427 Author: Pali Rohár <pali.rohar@gmail.com>
428 Date: Sun Feb 17 18:59:54 2019 +0100
430 manpages: Update mkfs.fat manpage about FAT32 backup boot sector
433 Author: Pali Rohár <pali.rohar@gmail.com>
434 Date: Sun Feb 17 11:48:32 2019 +0100
436 mkfs.fat: Write FAT32 backup info sector after FAT32 backup boot sector
438 Write it only in the case when location does not conflict with real/primary
439 FAT32 info sector and reserved area is big enough.
442 Author: Pali Rohár <pali.rohar@gmail.com>
443 Date: Sun Feb 17 11:01:15 2019 +0100
445 testsuite: Run fsck test step always even if mkfs test step fails
447 fsck test step can show more details about badly created image by mkfs.
450 Author: Pali Rohár <pali.rohar@gmail.com>
451 Date: Sun Feb 17 10:56:06 2019 +0100
453 testsuite: Add test for mkfs.fat with two FAT32 sectors in reserved area
456 Author: Pali Rohár <pali.rohar@gmail.com>
457 Date: Sun Feb 17 10:36:33 2019 +0100
459 mkfs.fat: Fix setting location of FAT32 backup boot sector
461 For FAT32 if there are only two sectors in reserved area, first must be
462 boot sector and second must be FAT32 fs info sector. And there would not be
463 FAT32 backup boot sector as it is optional. FAT32 info sector is for FAT32
466 When backup_boot variable is set to zero it means that no FAT32 backup boot
467 sector is written. Check that FAT32 backup boot sector differs from FAT32
468 info sector is already there.
470 Also allow user to specify zero for -b option which disable creating of
471 FAT32 backup boot sector.
474 Author: Pali Rohár <pali.rohar@gmail.com>
475 Date: Sun Feb 17 10:34:24 2019 +0100
477 mkfs.fat: Put FAT32 info sector number into variable
479 Also check that it is not same as backup boot sector value.
482 Author: Pali Rohár <pali.rohar@gmail.com>
483 Date: Sun Feb 17 10:32:08 2019 +0100
485 mkfs.fat: Rename info_sector buffer variable to info_sector_buffer
487 Also call free() unconditionally as it does nothing for NULL argument.
490 Author: Pali Rohár <pali.rohar@gmail.com>
491 Date: Sat Nov 24 19:45:39 2018 +0100
493 mkfs.fat: Remove dependency on systemd/udev
495 There is no need that mkfs.fat depends on systemd. It uses it only for
496 reading additional information about block device.
498 This patch replace systemd/udev dependency code by reading those additional
499 information about block device directly from sysfs.
501 So no functionality of mkfs.fat is lost or removed.
504 Author: Pali Rohár <pali.rohar@gmail.com>
505 Date: Sun Jan 5 00:58:41 2020 +0100
507 manpages: Fix '. SF' file names
510 Author: Pali Rohár <pali.rohar@gmail.com>
511 Date: Sat Nov 24 18:18:53 2018 +0100
513 manpages: Fix switching to previous font style
515 In troff manpage language previous font style is selected by "\fP"
516 sequence, not by "\fR". "\fR" selects roman font style.
519 Author: Pali Rohár <pali.rohar@gmail.com>
520 Date: Sun Nov 18 21:14:24 2018 +0100
522 manpages: Fix formatting of bullets
524 In troff manpage language bullet is written as "\(bu".
527 Author: Pali Rohár <pali.rohar@gmail.com>
528 Date: Sun Nov 18 21:10:29 2018 +0100
530 manpages: Fix formatting of emphases
532 To emphasize use italic font style instead of putting word into two
533 apostrophes. Ascii apostrophe in troff manpage language means "right single
534 quotation mark", therefore putting word into two apostrophes is fully
537 Also arguments and file names should be formatted in italic.
540 Author: Pali Rohár <pali.rohar@gmail.com>
541 Date: Sun Nov 18 21:01:55 2018 +0100
543 manpages: Fix formatting of hyphens, en and em dashes
545 In troff manpage language ascii minus is written as "\-", mathematical
546 minus as "\(mi", hyphen as "-", en-dash as "\(en" and em-dash as "\(em".
549 Author: Pali Rohár <pali.rohar@gmail.com>
550 Date: Sun Oct 21 12:58:19 2018 +0200
552 manpages: Clarify unit of BLOCK-COUNT
554 BLOCK-COUNT is always in KiB unit independently of the disk sector size,
555 FAT sector size or FAT cluster size.
558 Author: Pali Rohár <pali.rohar@gmail.com>
559 Date: Sun Aug 19 16:35:22 2018 +0200
561 fsck.fat: Check for DOS Clean Shutdown bit
563 DOS Clean Shutdown bit in first reserved FAT entry is cleared when DOS or
564 Windows FAT driver mounts a volume and set is back when doing unmount.
565 Therefore set this bit when clearing FAT dirty bit in boot sector.
568 Author: Pali Rohár <pali.rohar@gmail.com>
569 Date: Sat Jan 4 14:53:28 2020 +0100
571 mkfs.fat: Calculate CHS geometry according to SD Card Part 2 File System Specification
573 Use this CHS calculation when disk geometry is not available. This change
574 replaces hardcoded 64/32 value by formula based on total number of sectors.
576 For SD cards with more then 256MB capacity is CHS calculation according to
577 SD Card Part 2 File System Specification same as CHS calculation for hard
578 disks via LBA-Assist Translation.
581 Author: Pali Rohár <pali.rohar@gmail.com>
582 Date: Sun Aug 19 09:57:41 2018 +0200
584 mkfs.fat: Add a new option --mbr which fills MBR table with one partition
586 It is needed only for non-removable disks used on Microsoft Windows systems
587 and only when formatting whole unpartitioned disk.
589 Also some removable USB flash disks accessed via USB Mass Storage declares
590 themselves as non-removable and Microsoft Windows systems do not recognize
591 them without MBR partition table and MBR disk signature.
593 Because MBR sector and first FAT sector are very similar (starts with
594 boot code, ends with boot sign 0xAA55) they can live together at one
595 sector. Moreover location of the MBR partition table overlaps only with the
596 end of FAT boot code where is just place for the error message, it is
597 possible to fill (fake) MBR partition table with one partition which refers
598 to whole disk itself (starts at sector 0 and spans whole disk).
600 Similar thing is doing mformat (FAT12/16/32 formatting tool) from mtools
601 project or mkudffs (UDF formatting tool) from udftools project.
604 Author: Pali Rohár <pali.rohar@gmail.com>
605 Date: Mon Jan 27 22:12:38 2020 +0100
607 charconv: Do not use %lc format modifier for wide char which cannot be converted to multibyte string
610 Author: Pali Rohár <pali.rohar@gmail.com>
611 Date: Tue Jan 14 00:27:31 2020 +0100
613 charconv: Fix usage of iconv() for state-dependent encodings
615 After first main iconv() call set conversion state to the initial state and
616 store corresponding shift sequence to output buffer via second iconv() call.
619 Author: Pali Rohár <pali.rohar@gmail.com>
620 Date: Mon Jan 13 23:15:22 2020 +0100
622 charconv: Fix checks for overlong input strings
625 Author: Pali Rohár <pali.rohar@gmail.com>
626 Date: Wed Jan 8 01:03:24 2020 +0100
628 charconv: Use ICONV_CONST macro to fix compile warnings with GNU libiconv
630 Macro ICONV_CONST is defined by autoconf and expands either to "const" or
631 nothing based on what API provides iconv() implementation, either according
632 to SUSv2 or POSIX.1-2001/POSIX.1-2008.
635 Author: Pali Rohár <pali.rohar@gmail.com>
636 Date: Wed Jan 8 01:02:16 2020 +0100
638 charconv: Fix check for return value of iconv
640 iconv() returns (unsigned) size_t type, so its return value is always
641 different from (signed) negative -1. To compare with -1 it first needs to
642 be casted to size_t type.
645 Author: Pali Rohár <pali.rohar@gmail.com>
646 Date: Wed Jan 8 00:44:27 2020 +0100
648 charconv: Increase buffer size for output strings in current locale
650 MSDOS_NAME * 4 does not have to be enough size as iconv in translit mode
651 can return also 5 bytes per one wide character.
654 Author: Pali Rohár <pali.rohar@gmail.com>
655 Date: Wed Jan 8 00:42:35 2020 +0100
657 charconv: Fix buffer overflows by specifying output buffer size
660 Author: Pali Rohár <pali.rohar@gmail.com>
661 Date: Tue Jan 7 00:54:15 2020 +0100
663 charconv: Fix put_char() function
665 Ensure that this function always print characters according to current
666 locale. So do not treat characters above 0xA0 as printable when
667 dos_char_to_printable() cannot process them.
670 Author: Pali Rohár <pali.rohar@gmail.com>
671 Date: Tue Jan 7 00:52:43 2020 +0100
673 charconv: Fix comment for init_conversion() function
676 Author: Pali Rohár <pali.rohar@gmail.com>
677 Date: Tue Jan 7 00:52:25 2020 +0100
679 charconv: For internal CP850 conversion add translit table
681 This CP850 translit table was created by iconv ASCII//TRANSLIT as a 7bit ASCII fallback.
684 Author: Pali Rohár <pali.rohar@gmail.com>
685 Date: Tue Jan 7 00:50:09 2020 +0100
687 charconv: As a fallback try to use also non-translit iconv conversion
690 Author: Pali Rohár <pali.rohar@gmail.com>
691 Date: Mon Jan 6 18:30:28 2020 +0100
693 charconv: Use const for input strings
696 Author: Pali Rohár <pali.rohar@gmail.com>
697 Date: Mon Jan 6 18:29:30 2020 +0100
699 charconv: Rename third argument of local_string_to_dos_string()
701 Correct name is out_size as it is size of output buffer and not length of string.
704 Author: Lennart Poettering <lennart@poettering.net>
705 Date: Mon Aug 3 12:17:12 2020 +0200
707 mkfs: fsync() the block device before exiting
709 Let's make sure to sync the block device, before exiting. Otherwise, if
710 we operate on a loop device and people issue "losetup -d" right after
711 this command finishes our in-flight writes might never hit the disk.
713 (This took 4h of my life for me to figure out. The mkfs for all other
714 file systems I tested appear to synchronize when done, hence fat should
718 Author: Pali Rohár <pali.rohar@gmail.com>
719 Date: Mon Jan 27 22:22:35 2020 +0100
721 mkfs.fat: Mark struct fat32_fsinfo as packed
724 Author: Pali Rohár <pali.rohar@gmail.com>
725 Date: Mon Jan 27 22:25:20 2020 +0100
727 fatlabel: Update documentation about DOS codepage
730 Author: Pali Rohár <pali.rohar@gmail.com>
731 Date: Sat Jan 4 15:27:59 2020 +0100
733 mkfs.fat: Clarify licensing of the dummy boot sector
735 Original author H. Peter Anvin allowed to put mkfs.fat boot sector code
736 into the public domain.
739 Author: Pali Rohár <pali.rohar@gmail.com>
740 Date: Fri Feb 14 00:00:27 2020 +0100
742 manpages: Update documentation about hidden sectors
747 Author: David Gumberg <davidzgumberg@gmail.com>
748 Date: Sun Oct 13 18:21:57 2019 -0600
750 Get cross-platform libc6 generically
753 Author: Pali Rohár <pali.rohar@gmail.com>
754 Date: Mon Oct 14 12:21:36 2019 +0200
756 travis: use if ... fi construction
758 As single test command has side effect in return value for Travis.
761 Author: Pali Rohár <pali.rohar@gmail.com>
762 Date: Mon Oct 14 12:14:07 2019 +0200
764 travis: Check for fatlabel test errors only for non-static builds
766 Static builds have broken iconv support which is detected at configure time
767 as usable. This leads to usage of internal CP850 conversion table as
768 fallback solution which throws runtime non-fatal error.
771 Author: Pali Rohár <pali.rohar@gmail.com>
772 Date: Mon Oct 14 09:48:43 2019 +0200
774 tests: Check for stderr errors from fatlabel tests
777 Author: Pali Rohár <pali.rohar@gmail.com>
778 Date: Sun Jun 23 12:01:48 2019 +0200
780 charconv: Update Travis configuration
782 Use autogen.sh instead of non-working autoreconf and test also
783 static linked versions and configurations without iconv.
786 Author: Pali Rohár <pali.rohar@gmail.com>
787 Date: Sun Jun 23 10:47:44 2019 +0200
789 charconv: Add autogen.sh script
791 AM_ICONV macro depends on gettext installation. Unfortunately autoreconf is
792 not able to install config.rpath file so do it manually in autogen.sh.
795 https://lists.gnu.org/archive/html/bug-gettext/2011-10/msg00012.html
798 Author: Pali Rohár <pali.rohar@gmail.com>
799 Date: Sat Jun 22 22:14:31 2019 +0200
801 charconv: Fix sources for testdevinfo target
803 testdevinfo does not use any of charconv functions, nor any of mkfs
804 functions. So do not link charconv/mkfs into testdevinfo.
806 This fixes linking problems when iconv functions are not present in
810 Author: Pali Rohár <pali.rohar@gmail.com>
811 Date: Sat Jun 22 01:23:54 2019 +0200
813 charconv: Check return value of all set_dos_codepage() calls
816 Author: Pali Rohár <pali.rohar@gmail.com>
817 Date: Sat Jun 22 01:16:44 2019 +0200
819 charconv: Check presence of iconv
821 Use autoconf AM_ICONV macro for it. AM_ICONV should handle both cases when
822 iconv_open is available in external libiconv library or as part of libc
825 To force compilation of dosfstools without iconv support there is a new
826 configure option --without-iconv.
829 Author: Pali Rohár <pali.rohar@gmail.com>
830 Date: Sat Jun 22 01:14:37 2019 +0200
832 charconv: Fix return value from iconv_init_codepage function
835 Author: Pali Rohár <pali.rohar@gmail.com>
836 Date: Sat Jun 22 01:12:46 2019 +0200
838 charconv: Add fallback to internal CP850 table
840 Static linked version of glibc does not contain iconv with CP850 support.
841 As CP850 is default code page for all dosfstools programs add own internal
842 implementation which will be always supported. It would be used only in
843 case iconv_open() fails.
846 Author: Michael Forney <mforney@mforney.org>
847 Date: Fri Jun 7 08:48:13 2019 -0700
849 Use static inline function instead of statement expression
852 Author: Pali Rohár <pali.rohar@gmail.com>
853 Date: Wed Jun 5 09:25:52 2019 +0200
855 Fix Travis CI configuration for powerpc and arm
858 Author: Noé Rubinstein <nrubinstein@aldebaran.com>
859 Date: Mon Aug 31 15:19:57 2015 +0200
861 mkfs: document --offset in the man page
864 Author: Noé Rubinstein <nrubinstein@aldebaran.com>
865 Date: Thu Jul 2 15:49:06 2015 +0200
867 Allow specifying an offset in the device file in mkfs
870 Author: Tobias Stoeckmann <stoeckmann@users.noreply.github.com>
871 Date: Sun Feb 24 20:55:15 2019 +0100
873 Fix out of boundary read in fsck.fat/fatlabel
875 Faulty filesystems are able to trigger integer overflows in read_boot which eventually lead to insufficient allocation of memory for the FAT and therefore out of boundary reads.
878 Author: Pali Rohár <pali.rohar@gmail.com>
879 Date: Sun Aug 12 12:15:45 2018 +0200
881 device_info: Fix parsing partition number
883 Ensures that it is always valid number which does not overflow or
887 Author: Pali Rohár <pali.rohar@gmail.com>
888 Date: Sun Aug 12 12:15:21 2018 +0200
890 mkfs.fat: Fix parsing of block number
892 Block number must not be negative. It is 32bit so use long long type and
893 strtoll() function to ensure that converted positive 32bit value would fit
897 Author: Pali Rohár <pali.rohar@gmail.com>
898 Date: Sun Aug 12 12:13:35 2018 +0200
900 mkfs.fat: Fix validation of numeric command line arguments
902 Ensures that argument is always valid number which does not overflow or
906 Author: Pali Rohár <pali.rohar@gmail.com>
907 Date: Sun Aug 12 11:56:32 2018 +0200
909 mkfs.fat: Fix validation of volume ID
911 Use same logic as in fatlabel.
914 Author: Pali Rohár <pali.rohar@gmail.com>
915 Date: Sat Aug 11 22:49:37 2018 +0200
917 fatlabel: Fix validation of volume ID
919 Standard C function strtoull() does not signal underflow, therefore it
920 cannot be used for conversion of arbitrary string to integer with detection
923 Instead use function strtoll() and detect underflow (negative value)
926 Note that strto* functions skips and ignores leading whitespace characters,
927 so detects them manually via standard C function isspace().
930 Author: Pali Rohár <pali.rohar@gmail.com>
931 Date: Sat Jan 19 09:48:25 2019 +0100
933 Update Travis configuration
935 * Use both gcc and clang compilers
936 * Compile with -fwrapv and -fsanitize=address
937 * Compile in both 32 and 64 modes for x86 systems
938 * Cross compile for little endian arm and big endian powerpc
939 * Run cross compiled binaries in qemu
942 Author: Tobias Stoeckmann <tobias@stoeckmann.org>
943 Date: Mon Jan 14 22:47:40 2019 +0100
945 Renamed len to out_size.
947 As pointed out by pali it makes sense to rename len to out_size
948 to make explicitly sure by proper naming that this is the actually
949 available memory size at "out", not the length of a string.
951 Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
954 Author: Tobias Stoeckmann <tobias@stoeckmann.org>
955 Date: Mon Jan 14 19:36:11 2019 +0100
957 Fixed off-by-one in local_string_to_dos_string.
959 The function local_string_to_dos_string is vulnerable to an off-by-one
960 buffer overflow. In fact, it is triggered in default usage and becomes
961 visible when compiled with ASAN:
963 $ CFLAGS="-fsanitize=address" ./configure
964 $ dd if=/dev/zero of=example.iso bs=1024 seek=64 count=1
965 $ ./src/mkfs.fat example.iso
966 mkfs.fat 4.1+git (2017-01-24)
967 =================================================================
968 ==3857==ERROR: AddressSanitizer: stack-buffer-overflow on address ...
970 The problem is that the argument "len" to local_string_to_dos_string
971 stores the length of the output buffer. Yet it can also be used as an
974 If the whole "out" buffer has been written to, bytes_out is 0 and
975 the assignment in out[len-bytes_out] therefore leads to an off-by-one.
977 Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
980 Author: Pali Rohár <pali.rohar@gmail.com>
981 Date: Sun Nov 18 20:47:29 2018 +0100
983 Fix memory leaks in read_fat() function
985 Function read_fat() allocates memory to the user supplied buffer. Therefore
986 that function needs complement function for releasing allocated memory and
987 user needs to call if after finish its work.
989 This patch fixes memory leaks in fsck.fat and fatlabel tools.
994 Author: Pali Rohár <pali.rohar@gmail.com>
995 Date: Sat Sep 29 10:08:12 2018 +0200
997 mkfs.fat: Fix endianity for hidden_sectors
999 Global variable hidden_sectors is in host byte order.
1002 Author: Pali Rohár <pali.rohar@gmail.com>
1003 Date: Tue Aug 14 21:13:52 2018 +0200
1005 mkfs.fat: Add some workaround for Year 2038 Bug
1007 Check return values of time(), gmtime() and localtime() function which may
1008 fail. Fallback to date/time 1.1.1980 00:00:00 when those functions fail.
1010 For generating volume id, add fallback code based on rand() function.
1013 Author: Pali Rohár <pali.rohar@gmail.com>
1014 Date: Tue Aug 14 20:57:27 2018 +0200
1016 fsck.fat: Fix Year 2038 Bug
1018 Do not use time_t type and strftime() function which are affected by the
1019 Year 2038 Bug. Instead parse date/time directly from DOS format which
1020 avoids conversion from DOS to UNIX + conversion from UNIX to string.
1023 Author: Andreas Bombe <aeb@debian.org>
1024 Date: Tue Aug 14 12:58:58 2018 +0200
1026 Fix gcc sprintf() length warnings
1028 There are two sprintf() calls that receive warnings from current
1029 versions of gcc for possibly overrunning the temporary buffers they're
1032 The first one in src/check.c is theoretically safe since strftime()
1033 shouldn't generate such a long string. Reduce the maximum length of the
1034 strftime() string to fix this warning. Also detect strftime() errors
1035 and overwrite the buffer with a message in that case.
1037 The second one in src/boot.c should not be possible and is a limitation
1038 of gcc's detection. It assumes that %02x could write up to 8
1039 characters, even though the arguments are pointers to uint8_t which
1040 can't be more than two characters. Placate gcc by lengthening the
1041 temporary buffer by 12 bytes.
1044 Author: Pali Rohár <pali.rohar@gmail.com>
1045 Date: Mon May 7 09:27:16 2018 +0200
1047 mkfs.fat: Add support for --codepage option for label and validate it
1050 Author: Pali Rohár <pali.rohar@gmail.com>
1051 Date: Mon May 7 09:26:42 2018 +0200
1053 fatlabel: Implement proper checks when setting new label
1055 According to Microsoft FAT specification "fatgen103.doc" there are
1056 following restrictions for FAT label stored in root directory:
1058 * DIR_Name[0] may not equal 0x20.
1060 * Lower case characters are not allowed in DIR_Name (what these characters
1061 are is country specific).
1063 * The following characters are not legal in any bytes of DIR_Name:
1065 - Values less than 0x20 except for the special case of 0x05 in
1068 - 0x22, 0x2A, 0x2B, 0x2C, 0x2E, 0x2F, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F,
1069 0x5B, 0x5C, 0x5D, and 0x7C
1071 And another Microsoft "FAT32 Spec (SDA Contribution).pdf" describe:
1073 * DIR_Name[0] cannot equal 0x20 (in other words, names cannot start with a
1077 Author: Andreas Bombe <aeb@debian.org>
1078 Date: Mon Jun 11 14:21:17 2018 +0200
1080 Remove long file name when changing short file name
1082 In the current state, long file names are poorly supported and in case
1083 the file got automatically or manually renamed in auto_rename() or
1084 rename_file(), only the short file name would be manipulated.
1086 Only the checksum would be fixed to have the LFN stay valid. This would
1087 cause issues such as the rename being hidden by the unchanged LFN or
1088 duplicate LFNs remaining if they were the cause for a rename.
1090 Change so that existing LFNs are removed for files being renamed.
1093 Author: Andreas Bombe <aeb@debian.org>
1094 Date: Mon Jun 11 14:17:03 2018 +0200
1096 Print error message when auto_rename() is called on FAT32 root directory
1098 Use the same error message as rename_file() uses for the same reason
1099 when called on the FAT32 root directory pseudo file rather than silently
1103 Author: felix <felix.von.s@posteo.de>
1104 Date: Mon Jun 11 04:35:35 2018 +0200
1106 Fix allowing changes in SFNs reporting bogus error on FAT32 root directory
1108 The code to permit spaces in short filenames introduced in commit
1109 4d01db7c6 caused the root directory pseudo file to be checked for a bad
1110 name. Since the name for that file is not set (zeroed out), bad_name()
1111 would report an error. Attempting to fix it would do nothing as the
1112 rename functions check for and ignore the root directory.
1114 Fix by checking for the root directory in bad_name().
1117 Author: Andreas Bombe <aeb@debian.org>
1118 Date: Sun Jun 10 03:09:14 2018 +0200
1120 fsck: Fix -S option not being recognized
1122 The call to getopt_long() did not include the -S option, so that it was
1123 not recognized even though its handling was implemented.
1126 Author: felix <felix.von.s@posteo.de>
1127 Date: Mon Apr 2 10:20:10 2018 +0200
1129 fsck.fat: Allow spaces in the middle of SFNs
1131 Also, introduce an -S option (mostly) restoring previous behaviour.
1134 Author: Pali Rohár <pali.rohar@gmail.com>
1135 Date: Wed Mar 7 18:00:15 2018 +0100
1137 manpages: Add section DOS CODEPAGES to fatlabel
1139 Table was extracted from the National Language Support (NLS) API Reference:
1140 https://www.microsoft.com/resources/msdn/goglobal/default.mspx?OS=Windows+7
1142 And filtered by codepages supported by GNU libiconv.
1145 Author: Pali Rohár <pali.rohar@gmail.com>
1146 Date: Wed Mar 7 17:59:50 2018 +0100
1148 fatlabel: Add support for --codepage option
1150 FAT label in both boot sector and root directory is stored according to
1151 current OEM code page. Microsoft Windows system treat FAT label really in
1152 this way. In most cases OEM code page is just 8bit extension of the
1153 printable ASCII, therefore for ASCII-only labels there is no change.
1155 By default OEM code page 850 is used which contains most of the characters
1156 that are also available in ISO-8859-1. Same default which is used by
1157 fsck.fat and mlabel (from mtools project).
1160 Author: Pali Rohár <pali.rohar@gmail.com>
1161 Date: Wed Mar 7 17:58:05 2018 +0100
1163 fsck.fat: Change default DOS codepage to 850
1165 The reason for change is that 850 is more common on Windowes and used by
1166 more regions as 437. Also it contains most of the characters that are also
1167 available in ISO-8859-1. And 850 is also default DOS code page used by
1168 mtools, which is used on Linux.
1171 Author: Pali Rohár <pali.rohar@gmail.com>
1172 Date: Wed Mar 7 17:57:23 2018 +0100
1174 Initialize iconv "from codepage" with //TRANSLIT
1176 This would allow to show characters from DOS codepage on systems which
1177 current locale does not support it via transliteration.
1179 For example byte E8 in DOS CP437 (e with a grave accent) does not have
1180 representation in Linux locale Latin2. But it can be shown after
1181 transliteration as simple character "e".
1184 Author: Pali Rohár <pali.rohar@gmail.com>
1185 Date: Wed Mar 7 17:57:13 2018 +0100
1187 Initialize only LC_CTYPE locale
1189 LC_ALL is not needed as locale is used just for CODESET. LC_CTYPE is enough
1190 for using nl_langinfo(CODESET).
1193 Author: Pali Rohár <pali.rohar@gmail.com>
1194 Date: Sun Apr 8 11:37:29 2018 +0200
1196 Add tests for FAT32 labels
1198 These FAT32 images were generated for FAT label test suite in October 2017.
1199 Now fatlabel reports same FAT32 label as MS-DOS 6, 7 and Windows 98, XP, 10.
1201 For more information about test result see email:
1202 https://www.spinics.net/lists/kernel/msg2640891.html
1205 Author: Pali Rohár <pali.rohar@gmail.com>
1206 Date: Thu Nov 9 21:25:05 2017 +0100
1208 mkfs.fat: Correctly process 0xe5 as first character of directory entry
1210 Same as commit 51da71aa9edc36fabf83323282f14e7ee71aa07b but for mkfs.fat.
1213 Author: Pali Rohár <pali.rohar@gmail.com>
1214 Date: Thu Nov 9 21:25:01 2017 +0100
1216 fsck.fat: Handle 0xe5 as first character of directory entry
1218 Same as commit 51da71aa9edc36fabf83323282f14e7ee71aa07b but for fsck.fat.
1221 Author: Pali Rohár <pali.rohar@gmail.com>
1222 Date: Thu Nov 30 00:07:39 2017 +0100
1224 manpages: Add section COMPATIBILITY and BUGS to fatlabel
1227 Author: Pali Rohár <pali.rohar@gmail.com>
1228 Date: Thu Nov 30 00:07:22 2017 +0100
1230 fatlabel: Optimize size of the binary
1232 Move implementation of the alloc_rootdir_entry() function from the check.c
1233 to boot.c and do not link unneeded objects files into fatlabel binary.
1235 This would decrease size of the fatlabel binary nearly by half. With -g -O2
1236 size before was about 194131 bytes and after just 104497 bytes.
1239 Author: Pali Rohár <pali.rohar@gmail.com>
1240 Date: Thu Nov 30 00:07:05 2017 +0100
1242 fatlabel: Clear ATTR_VOLUME from directory entry when removing label
1244 Older versions of fatlabel ignored FAT entries with deletion mark 0xE5 and
1245 tried to read labels also from those entries. This fix clear ATTR_VOLUME so
1246 older versions would not try to read label from deleted entry.
1249 Author: Pali Rohár <pali.rohar@gmail.com>
1250 Date: Thu Nov 30 00:06:51 2017 +0100
1252 fatlabel: Print label without padding spaces
1254 Every entry in FAT directory is padded with spaces, which are not part of
1255 entry name. Therefore show also label from root FAT directory without those
1259 Author: Pali Rohár <pali.rohar@gmail.com>
1260 Date: Thu Nov 30 00:06:36 2017 +0100
1262 fatlabel: Show only label stored in root directory
1264 MS-DOS 6.22, MS-DOS 7.10, Windows 98, Windows XP and also Windows 10
1265 ignores label stored in boot sector. When label in boot sector is non-empty
1266 and label in root directory is missing then they treat situation as there
1267 is no label for particular disk. So when labels in boot sector and root
1268 directory are out of sync, fatlabel shown different label as those MS-DOS
1269 and Windows systems. To make behavior between DOS, Windows and Linux
1270 consistent, ignores label in boot sector also in fatlabel.
1273 Author: Ashe David Sterkehus <ashe.goulding@gmail.com>
1274 Date: Wed Nov 22 00:20:40 2017 +0900
1276 mkfs: Check volume label given with -n is no longer than 11 characters
1281 Author: Will Newton <willn@resin.io>
1282 Date: Thu Aug 31 10:42:13 2017 +0100
1284 src/check.c: Fix up mtools created bad dir entries
1286 mtools writes uninitialized data to the case field of some
1287 directory entries. Running fsck.fat on these filesystems
1288 will cause the directory to get deleted which can lead to
1289 data loss. Detect this situation and clear the flag instead.
1291 mtools patch to fix the original issue:
1293 https://lists.gnu.org/archive/html/info-mtools/2014-08/msg00000.html
1295 Signed-off-by: Will Newton <willn@resin.io>
1298 Author: Andreas Bombe <aeb@debian.org>
1299 Date: Sun Oct 15 16:26:01 2017 +0200
1301 manpages: Remove formatting from NAME sections where it doesn't belong
1303 The .SH NAME sections are supposed to contain just "name \- description"
1304 with no bolding on the name.
1306 Signed-off-by: Andreas Bombe <aeb@debian.org>
1309 Author: Andreas Bombe <aeb@debian.org>
1310 Date: Sun Oct 1 15:17:13 2017 +0200
1312 manpages: Clarify rules for volume labels as implemented
1314 Signed-off-by: Andreas Bombe <aeb@debian.org>
1317 Author: Andreas Bombe <aeb@debian.org>
1318 Date: Sun Oct 1 15:16:12 2017 +0200
1320 manpages: Make SEE ALSO sections conform to conventions
1322 Signed-off-by: Andreas Bombe <aeb@debian.org>
1325 Author: Andreas Bombe <aeb@debian.org>
1326 Date: Sun Oct 1 03:57:59 2017 +0200
1328 Harmonize unknown command line option handling
1330 Now all binaries will show help and not try to print something like
1331 "unknown option '?'" because '?' is the value getopt_long() returns when
1332 it encounters an unknown option. At this point, getopt_long() has
1333 already printed the problem to stderr so we don't have to.
1335 The default action on getopt_long() return values (neither known option
1336 nor '?') is to report an internal error with the unexpected value.
1338 Signed-off-by: Andreas Bombe <aeb@debian.org>
1341 Author: Andreas Bombe <aeb@debian.org>
1342 Date: Sun Oct 1 03:04:00 2017 +0200
1344 fatlabel: Add new -r, --reset option
1346 This new option removes the label or generates a new serial number if in
1349 Signed-off-by: Andreas Bombe <aeb@debian.org>
1352 Author: Andreas Bombe <aeb@debian.org>
1353 Date: Sun Oct 1 02:43:03 2017 +0200
1355 fatlabel: Don't access element of argv array that may not exist
1357 Signed-off-by: Andreas Bombe <aeb@debian.org>
1360 Author: Andreas Bombe <aeb@debian.org>
1361 Date: Sun Oct 1 02:27:31 2017 +0200
1363 Move generation of serial number into new function generate_volume_id()
1365 Signed-off-by: Andreas Bombe <aeb@debian.org>
1368 Author: Andreas Bombe <aeb@debian.org>
1369 Date: Sun Oct 1 02:17:41 2017 +0200
1371 Add remove_label() function
1373 Signed-off-by: Andreas Bombe <aeb@debian.org>
1376 Author: Andreas Bombe <aeb@debian.org>
1377 Date: Sun Oct 1 01:42:55 2017 +0200
1379 fatlabel: Refuse empty strings as labels
1381 Signed-off-by: Andreas Bombe <aeb@debian.org>
1384 Author: Andreas Bombe <aeb@debian.org>
1385 Date: Sun Oct 1 01:28:32 2017 +0200
1387 Handle 0xe5 as first character of volume label
1389 Directory entries are not allowed to have 0xe5 as the first character as
1390 that is the marker for deleted entries. Instead, these have to be
1391 converted to 0x05 on writing and the other way on reading.
1393 Signed-off-by: Andreas Bombe <aeb@debian.org>
1396 Author: Andreas Bombe <aeb@debian.org>
1397 Date: Sun Oct 1 01:11:05 2017 +0200
1399 Remove leftover handling of split directory entry name
1401 The name field in DIR_ENT used to be split into name and ext. Reading
1402 the volume label from a DIR_ENT used to require merging the contents of
1403 both fields and that handling was still there as reading parts of the
1404 same name field and merging them. Simply read in one go instead.
1406 Signed-off-by: Andreas Bombe <aeb@debian.org>
1409 Author: Andreas Bombe <aeb@debian.org>
1410 Date: Sun Oct 1 00:54:12 2017 +0200
1412 Terminate volume label search at end of directory
1414 In find_volume_de() there is no point in scanning the directory entries
1415 after the first end of directory marker (name starts with a zero byte).
1416 Simply return 0 if end of directory is encountered.
1418 Signed-off-by: Andreas Bombe <aeb@debian.org>
1421 Author: Andreas Bombe <aeb@debian.org>
1422 Date: Sun Oct 1 00:46:05 2017 +0200
1424 Avoid returning deleted directory entries as labels
1426 In find_volume_de(), only the attributes were tested to decide whether a
1427 directory entry was a volume label. This could lead to deleted entries
1428 being returned. Check the name for deleted or unallocated marker to
1431 Signed-off-by: Andreas Bombe <aeb@debian.org>
1434 Author: Pali Rohár <pali.rohar@gmail.com>
1435 Date: Wed Jul 5 20:44:00 2017 +0200
1437 fatlabel: Fix erasing label
1439 Empty label needs to be stored as "NO NAME ". Like in mkfs treat label
1440 which starts with character 0xE5 as empty.
1443 Author: Pali Rohár <pali.rohar@gmail.com>
1444 Date: Wed Jul 5 20:37:17 2017 +0200
1446 mkfs: Handle -n "" correctly
1448 When user specify empty argument for -n, then it is empty label and needs
1449 to be transformed to NO_NAME. Also treat -n argument which starts with
1450 character 0xE5 as empty because label is stored also in root FAT directory
1451 and such entry is marked as deleted.
1456 Author: Pali Rohár <pali.rohar@gmail.com>
1457 Date: Thu Sep 28 10:13:56 2017 +0200
1459 fatlabel: Fix parsing volume ID
1461 * Do not allow specifying empty argument as volume ID
1462 * Check for errno (as general error) after more specific errors
1467 Author: Andreas Bombe <aeb@debian.org>
1468 Date: Mon Sep 25 01:21:23 2017 +0200
1470 fatlabel: Implement volume ID mode
1472 When given the new -i or --volume-id option, fatlabel will display or
1473 change the volume ID (serial number) instead of the volume label. The ID
1474 is displayed as an 8 digit hexadecimal number, when changing it must
1475 also be given as a hexadecimal number that fits within 32 bits.
1479 Signed-off-by: Andreas Bombe <aeb@debian.org>
1482 Author: Andreas Bombe <aeb@debian.org>
1483 Date: Mon Sep 25 00:36:33 2017 +0200
1485 Add write_serial() function
1487 write_serial() works like write_boot_label() but sets the volume ID
1488 instead of the volume label in the boot sector.
1490 Signed-off-by: Andreas Bombe <aeb@debian.org>
1493 Author: Andreas Bombe <aeb@debian.org>
1494 Date: Mon Sep 25 00:07:17 2017 +0200
1496 Make fs_open() path argument const char*
1498 Signed-off-by: Andreas Bombe <aeb@debian.org>
1501 Author: Andreas Bombe <aeb@debian.org>
1502 Date: Sun Sep 24 22:32:16 2017 +0200
1504 Read volume ID in read_boot()
1506 The DOS_FS struct gets a new 32 bit field "serial" and read_boot() will
1507 now read the volume ID into this field.
1509 Signed-off-by: Andreas Bombe <aeb@debian.org>
1512 Author: Andreas Bombe <aeb@debian.org>
1513 Date: Thu Sep 21 15:20:33 2017 +0200
1515 fatlabel: Expand help message by description and options
1517 Signed-off-by: Andreas Bombe <aeb@debian.org>
1520 Author: Andreas Bombe <aeb@debian.org>
1521 Date: Thu Sep 21 15:15:54 2017 +0200
1523 fatlabel: Change option parsing to getopt_long()
1525 Signed-off-by: Andreas Bombe <aeb@debian.org>
1528 Author: Andreas Bombe <aeb@debian.org>
1529 Date: Sat Aug 5 20:02:04 2017 -0400
1531 Warn that -r is useless with FAT32 filesystems
1533 The option -r specifies the root directory size that neither is nor can
1534 be fixed on FAT32. If generating a FAT32 filesystem and this option is
1535 specified, warn the user that it has no effect.
1539 Signed-off-by: Andreas Bombe <aeb@debian.org>
1542 Author: Jakub Wilk <jwilk@jwilk.net>
1543 Date: Tue Jul 11 01:01:20 2017 +0200
1545 Fix signed integer overflow in FSTART
1547 uint16_t was promoted to int, and then left shift could overflow it.
1548 Add explicit cast to uint32_t to avoid undefined behavior.
1550 Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
1551 Signed-off-by: Andreas Bombe <aeb@debian.org>
1554 Author: Emanuel Czirai <xftroxgpx@gmail.com>
1555 Date: Fri May 5 22:43:54 2017 +0200
1561 Starting check/repair pass.
1562 FATs differ but appear to be intact.1) Use first FAT
1568 Author: Andreas Bombe <aeb@debian.org>
1569 Date: Thu Jun 29 20:56:03 2017 +0200
1571 mkfs: List all options with short descriptions in --help message
1573 Make the help message more informative by giving a short description,
1574 simplifying the usage line and giving a short description of every
1575 option. The usage line now also shows the actual executable name instead
1576 of a hardwired 'mkfs.fat'.
1578 Signed-off-by: Andreas Bombe <aeb@debian.org>
1581 Author: Andreas Bombe <aeb@debian.org>
1582 Date: Wed Jun 28 15:17:33 2017 +0200
1584 mkfs, fsck: Add --variant=TYPE command line option
1586 TYPE can be 'standard' or 'atari' (case insensitive) to select the
1587 desired mode rather than having to toggle with -A.
1589 Signed-off-by: Andreas Bombe <aeb@debian.org>
1592 Author: Andreas Bombe <aeb@debian.org>
1593 Date: Tue May 30 21:26:44 2017 +0200
1595 manpages: Rework the intro of the mkfs man page
1597 Acknowledge that image files can be used in place of device files.
1598 Remove mentions of "under Linux" since it has been portable for a while.
1600 Signed-off-by: Andreas Bombe <aeb@debian.org>
1603 Author: Andreas Bombe <aeb@debian.org>
1604 Date: Fri Apr 21 20:47:32 2017 +0200
1606 manpages, configure.ac: Correct description of Atari format selection
1608 The -A option doesn't turn on (or turn off) Atari format selection, it
1609 toggles it with every occurrence. Change wording in the man pages to
1612 Also mention that automatic selection can happen only on 68k Atari Linux
1613 in the man pages and the --enable-atari-check option help in
1616 Signed-off-by: Andreas Bombe <aeb@debian.org>
1619 Author: Andreas Bombe <aeb@debian.org>
1620 Date: Thu Apr 6 20:47:11 2017 +0200
1622 Disable legacy check for 68k Atari by default
1624 The code that checked for Atari hardware when compiled for the 68k
1625 architecture is now disabled by default. A new configure option
1626 --enable-atari-check allows enabling it again.
1628 In addition to the the new configure option and the symbol __mc68000__
1629 it also depends on __linux__, since its implementation checks Linux
1630 specific /proc files.
1632 Signed-off-by: Andreas Bombe <aeb@debian.org>
1635 Author: Andreas Bombe <aeb@debian.org>
1636 Date: Wed Apr 5 20:40:33 2017 +0200
1638 Move all three check_atari() and atari_format definitions to common.c
1640 Now that mkfs is also using common.c, all three identical check_atari()
1641 definitions from mkfs, fsck and fatlabel can be combined in a single
1642 location in common.c
1644 Signed-off-by: Andreas Bombe <aeb@debian.org>
1647 Author: Andreas Bombe <aeb@debian.org>
1648 Date: Wed Apr 5 20:29:20 2017 +0200
1650 mkfs: Link with common.c and use its die() implementation
1652 Now common.c is linked into mkfs and its die() implementation is used
1653 instead of the local implementation. That implementation consisting of a
1654 die() macro and fatal_error() function has been removed.
1656 To reproduce current messages exactly, there is now a program_name
1657 variable in common.c. If it is not NULL, die() will prepend its contents
1658 to the message it prints.
1660 The previous implementation implicitly passed device_name to the
1661 printf() so that die() invocations only needed to put "%s" where they
1662 wanted the device name to appear in the string. These invocations now
1663 have explicit device_name arguments.
1665 Signed-off-by: Andreas Bombe <aeb@debian.org>
1668 Author: Andreas Bombe <aeb@debian.org>
1669 Date: Tue Apr 4 20:42:02 2017 +0200
1671 fsck.fat.h: Remove extern declarations of interactive and write_immed
1673 These two declarations were forgotten when the variables moved to
1676 Signed-off-by: Andreas Bombe <aeb@debian.org>
1679 Author: Andreas Bombe <aeb@debian.org>
1680 Date: Mon Apr 3 20:53:14 2017 +0200
1682 fsck: Switch to getopt_long() option parser and add --help option
1684 Signed-off-by: Andreas Bombe <aeb@debian.org>
1687 Author: Andreas Bombe <aeb@debian.org>
1688 Date: Mon Apr 3 20:45:20 2017 +0200
1690 fsck: Pass the exit value to use to usage()
1692 Signed-off-by: Andreas Bombe <aeb@debian.org>
1695 Author: Andreas Bombe <aeb@debian.org>
1696 Date: Mon Apr 3 20:41:31 2017 +0200
1698 fsck: Clean up usage() message a little
1700 Bring the usage() help message more in line with common conventions.
1702 Signed-off-by: Andreas Bombe <aeb@debian.org>
1705 Author: Andreas Bombe <aeb@debian.org>
1706 Date: Fri Mar 31 14:41:42 2017 +0200
1708 mkfs.fat.c: Change misleading comment about FAT32 selection
1710 There was an apparently very old comment in setup_tables() about FAT32
1711 not yet being chosen automatically. If a specific FAT size is not
1712 requested from the command line, establish_params() will previously have
1713 set size_fat to 32 when the filesystem size is at least 512 MiB.
1715 Signed-off-by: Andreas Bombe <aeb@debian.org>
1718 Author: Andreas Bombe <aeb@debian.org>
1719 Date: Fri Mar 24 20:40:12 2017 +0100
1721 fsck: Add quit choice to interactive prompts
1723 All prompts now get an additional 'q' choice to explicitly quit fsck.
1724 Selecting 'q' will print a message detailing the situation and ask for
1727 Since the message describing the situation depends on whether fsck is in
1728 immediate-write mode, the variable selecting that is moved to common.c
1729 to make it accessible to the get_choice() function.
1731 Signed-off-by: Andreas Bombe <aeb@debian.org>
1734 Author: Andreas Bombe <aeb@debian.org>
1735 Date: Thu Feb 23 21:00:59 2017 +0100
1737 fsck: Make prompts asking for writing changes at end more verbose and clear
1739 Signed-off-by: Andreas Bombe <aeb@debian.org>
1742 Author: Andreas Bombe <aeb@debian.org>
1743 Date: Wed Feb 22 20:07:25 2017 +0100
1745 fsck: Don't ask whether to perform changes in immediate write mode
1747 When all changes have already been written directly, it is useless to
1748 ask whether to commit the changes and probably confusing to the user.
1750 Signed-off-by: Andreas Bombe <aeb@debian.org>
1753 Author: Andreas Bombe <aeb@debian.org>
1754 Date: Tue Feb 21 21:36:04 2017 +0100
1758 Signed-off-by: Andreas Bombe <aeb@debian.org>
1761 Author: Andreas Bombe <aeb@debian.org>
1762 Date: Tue Feb 21 21:24:14 2017 +0100
1764 Overhaul interactive prompts
1766 All uses of get_key() are converted to get_choice() and fsck now
1767 disables canonical terminal mode to directly get key presses. It is no
1768 longer required to press enter after typing the choice and it is no
1769 longer possible to enter whole strings where only a character is
1770 expected. The reaction to invalid input should be consistent now (i.e.
1771 always repeat the prompt).
1773 Signed-off-by: Andreas Bombe <aeb@debian.org>
1776 Author: Andreas Bombe <aeb@debian.org>
1777 Date: Tue Feb 21 21:14:43 2017 +0100
1779 Add get_choice() function
1781 The get_choice() function is intended to supersede get_key(). It takes
1782 pairs of return values and strings for every choice and a
1783 non-interactive default choice, does the prompting and reading of user
1784 input (if interactive) and returns the value for the selected choice.
1786 Since it needs to know if it runs in interactive mode, the "interactive"
1787 variable has been moved to common.c and removed from fsck.fat.c and
1790 Signed-off-by: Andreas Bombe <aeb@debian.org>
1793 Author: Andreas Bombe <aeb@debian.org>
1794 Date: Tue Feb 21 14:15:12 2017 +0100
1796 Add get_line() function to read user input in canonical mode
1798 The function will first save the terminal state and enable canonical and
1799 echo mode, display a prompt, call fgets(), then restore previous
1800 terminal mode. This allows it to work correctly regardless of the
1801 current terminal mode.
1803 Signed-off-by: Andreas Bombe <aeb@debian.org>
1806 Author: Andreas Bombe <aeb@debian.org>
1807 Date: Mon Feb 20 14:09:43 2017 +0100
1809 Add asprintf() wrapper
1811 Make xasprintf() a wrapper that calls asprintf() and terminates if an
1812 error occurs like the alloc() function does for malloc(). The
1813 availability of the non-standard asprintf() call is checked in
1814 configure.ac and xasprintf() uses a local implementation if it isn't.
1816 Signed-off-by: Andreas Bombe <aeb@debian.org>
1819 Author: Andreas Bombe <aeb@debian.org>
1820 Date: Fri Feb 10 14:06:40 2017 +0100
1822 Fix printf format specifier for printing label
1824 Fix a mistake introduced in the last commit where a field width instead
1825 of precision was given for rendering a fixed length string (without null
1828 Signed-off-by: Andreas Bombe <aeb@debian.org>
1831 Author: Andreas Bombe <aeb@debian.org>
1832 Date: Thu Jan 26 21:31:03 2017 +0100
1834 Turn label in struct DOS_FS into char array from pointer
1836 Signed-off-by: Andreas Bombe <aeb@debian.org>
1839 Author: Andreas Bombe <aeb@debian.org>
1840 Date: Thu Jan 26 21:27:19 2017 +0100
1842 Append +git to version number
1844 Signed-off-by: Andreas Bombe <aeb@debian.org>
1846 commit 820c2f9 (tag: v4.1)
1847 Author: Andreas Bombe <aeb@debian.org>
1848 Date: Tue Jan 24 13:10:23 2017 +0100
1850 Releasing version 4.1
1852 Signed-off-by: Andreas Bombe <aeb@debian.org>
1855 Author: Andreas Bombe <aeb@debian.org>
1856 Date: Mon Jan 23 03:10:56 2017 +0100
1858 fatlabel: Make sure printf style patterns in label are not expanded
1860 Writing a label to an unlabeled filesystem involves creating a root
1861 directory entry to contain the label. For this, the
1862 alloc_rootdir_entry() function used for creating new directory nodes for
1863 recovered orphan cluster chains is reused. However, this expects the
1864 filename to be a printf style pattern to generate a unique name.
1866 If the filesystem is unlabeled and the new label contains a printf
1867 specifier other than %d or similar, the attempted expansion of the
1868 pattern might crash fatlabel.
1870 Change alloc_rootdir_entry() to take an additional argument gen_name and
1871 only expand the name if its value is true.
1873 Signed-off-by: Andreas Bombe <aeb@debian.org>
1876 Author: Andreas Bombe <aeb@debian.org>
1877 Date: Fri Nov 4 13:10:58 2016 +0100
1879 testsuite: Add missing fsck test files to dist_check_DATA
1881 Signed-off-by: Andreas Bombe <aeb@debian.org>
1884 Author: Andreas Bombe <aeb@debian.org>
1885 Date: Thu Nov 3 20:03:25 2016 +0100
1887 testsuite: Test for bad characters in file names
1889 The FAT16 test image contains four files with three errors. One has a
1890 space in the name, one a space in the extension and one contains '>' in
1893 Signed-off-by: Andreas Bombe <aeb@debian.org>
1896 Author: Andreas Bombe <aeb@debian.org>
1897 Date: Sun Sep 18 00:11:43 2016 +0200
1899 fsck: Fix reporting of length to truncate with shared clusters
1901 When files share clusters and one of the two files has been selected to
1902 truncate fsck reports which file has been selected and the length to
1903 which it will be truncated. All code paths erronously printed the length
1904 of the file that was not going to be truncated, leading to possible user
1907 Signed-off-by: Andreas Bombe <aeb@debian.org>
1910 Author: Andreas Bombe <aeb@debian.org>
1911 Date: Sat Sep 17 23:34:07 2016 +0200
1913 testsuite: Test for files sharing clusters
1915 The FAT32 test image contains three files. One shares a cluster with the
1916 root directory and the other two share clusters among themselves.
1918 Signed-off-by: Andreas Bombe <aeb@debian.org>
1921 Author: Andreas Bombe <aeb@debian.org>
1922 Date: Sat Sep 17 22:41:07 2016 +0200
1924 testsuite: Run fsck in test-mkfs
1926 Now the test-mkfs script also runs fsck on the created image to test its
1927 basic operation. The test fails if fsck reports seeing an error.
1929 Signed-off-by: Andreas Bombe <aeb@debian.org>
1932 Author: Andreas Bombe <aeb@debian.org>
1933 Date: Sat Sep 17 22:25:06 2016 +0200
1935 Fix FAT32 FSInfo signature checking
1937 In commit 7444694 the definition of struct info_sector was corrected to
1938 match the FSInfo sector specification. The initialization was adapted,
1939 but other places were missed. All runs of fsck would then incorrectly
1940 report a signature error on the FSInfo sector.
1942 Signed-off-by: Andreas Bombe <aeb@debian.org>
1945 Author: Nico Roeser <nico@n1c0.de>
1946 Date: Fri Sep 16 20:05:08 2016 +0200
1948 mkfs: Bring back ability to set sector size.
1950 This had accidently been broken when the code was overhauled, resulting
1951 in unconditionally setting the sector size when devinfo detected it.
1953 Signed-off-by: Andreas Bombe <aeb@debian.org>
1956 Author: Andreas Bombe <aeb@debian.org>
1957 Date: Fri Sep 16 03:32:12 2016 +0200
1959 Request minimum automake version 1.11 and add workaround for <1.13
1961 Before automake 1.13, parallel-tests wasn't the default set it
1962 explicitly in the automake options list. The parallel test harness was
1963 introduced in 1.11 therefore that is the minimum now.
1965 However, the AM_TESTS_ENVIRONMENT variable was only starting to work in
1966 1.13, so there is now a version check and a conditional assignment to
1967 TESTS_ENVIRONMENT (which should be for user setting only) in case
1968 automake is 1.11 or 1.12.
1970 Without it, the fact of xxd being found is not passed to the test
1971 scripts which then skip all tests due to perceived lack of xxd.
1973 Signed-off-by: Andreas Bombe <aeb@debian.org>
1976 Author: Andreas Bombe <aeb@debian.org>
1977 Date: Fri Sep 16 01:45:17 2016 +0200
1979 Add missing autoreconf step to Travis CI configuration
1981 Signed-off-by: Andreas Bombe <aeb@debian.org>
1984 Author: Andreas Bombe <aeb@debian.org>
1985 Date: Fri Sep 16 01:39:08 2016 +0200
1987 Add configuration for the Travis CI build service
1989 Signed-off-by: Andreas Bombe <aeb@debian.org>
1992 Author: Andreas Bombe <aeb@debian.org>
1993 Date: Wed Sep 14 20:37:57 2016 +0200
1995 Check and fix printf style arguments to die() and pdie()
1997 Add the "format" gcc style attribute to the declarations of die() and
1998 pdie() so that the compiler knows how to check their arguments for
2001 Fix all problematic calls detected by this.
2003 Signed-off-by: Andreas Bombe <aeb@debian.org>
2006 Author: Andreas Bombe <aeb@debian.org>
2007 Date: Wed Sep 14 03:38:08 2016 +0200
2009 Make some implicit integer conversions safer
2011 Coverity reports a few places where signed or short integers are
2012 promoted to int and then extended to long which might cause unintended
2013 sign extension. Given the context (being sector sizes and similar) the
2014 values should never actually reach unsafe values, but this patch cleans
2017 Signed-off-by: Andreas Bombe <aeb@debian.org>
2020 Author: Andreas Bombe <aeb@debian.org>
2021 Date: Tue Sep 13 20:25:34 2016 +0200
2023 mkfs: Remove redundant unreachable warning message
2025 At some point the check for too many clusters for user requested FAT16
2026 was moved a few lines above. The original location can only be reached
2027 when the cluster count is too low for FAT16 which means the too many
2028 clusters message can not be triggered there.
2030 Found through the dead code detection of Coverity Scan.
2032 Signed-off-by: Andreas Bombe <aeb@debian.org>
2035 Author: Andreas Bombe <aeb@debian.org>
2036 Date: Tue Sep 13 20:12:21 2016 +0200
2038 Fix octal character parsing in file_cvt()
2040 Apparently the octal code parsing got rewritten into a loop at some
2041 point while the rest of the code was not removed. It was impossible to
2042 specify an octal character code without the function returning an error.
2044 This affected the -u and -d options for fsck.
2046 Found through the dead code detection of Coverity Scan.
2048 Signed-off-by: Andreas Bombe <aeb@debian.org>
2051 Author: Andreas Bombe <aeb@debian.org>
2052 Date: Mon Sep 12 20:21:53 2016 +0200
2054 testsuite: Test for circular cluster chain
2056 The test image contains a file four clusters in length where the third
2057 cluster has been modified to point back to the second cluster.
2059 Signed-off-by: Andreas Bombe <aeb@debian.org>
2062 Author: Andreas Bombe <aeb@debian.org>
2063 Date: Mon Sep 12 19:51:10 2016 +0200
2065 Fix truncation logic in circular chain check
2067 When scanning for circular chains, the first FAT entry that appeared a
2068 second time in a chain should cause the previous cluster to be the
2069 termination of the chain.
2071 To that end, test_file() keeps variables to point to the previous
2072 cluster and the current number of clusters. When the -t option is given,
2073 all clusters are checked to be readable and skipped (variables not
2074 updates) in test_file() when they are not.
2076 The problem was that the variables were updated only when the read check
2077 succeeded. If the -t option is not given, that check does not happen and
2078 the variables keep their initial value. The circular chain fix would
2079 then always truncate to zero length and fail to update the free cluster
2080 count, requiring a second fsck run.
2082 Fix by updating these variables unconditionally when -t option is not
2085 Signed-off-by: Andreas Bombe <aeb@debian.org>
2088 Author: Andreas Bombe <aeb@debian.org>
2089 Date: Mon Sep 12 14:39:11 2016 +0200
2091 testsuite: Test for too long cluster chain
2093 The test image contains a file marked as 7 bytes in length (just a small
2094 part of 1 cluster) in the directory entry that has 2 clusters assigned
2097 Signed-off-by: Andreas Bombe <aeb@debian.org>
2100 Author: Andreas Bombe <aeb@debian.org>
2101 Date: Wed Sep 7 21:09:41 2016 +0200
2103 Fix definition and initialization of fsinfo sector
2105 Change the definition of the fsinfo struct to be more in line with the
2106 official definition, in particular make the trailing signature field 32
2107 bit instead of 16 bit. During initialization in init_fsinfo(), first
2108 clear the whole struct to zero before setting fields, to make sure
2109 reserved fields are zeroed.
2113 Signed-off-by: Andreas Bombe <aeb@debian.org>
2116 Author: Andreas Bombe <aeb@debian.org>
2117 Date: Wed Sep 7 20:45:29 2016 +0200
2121 Add the framework for a fsck testsuite and a few tests, including a test
2122 for the yet unimplemented check for misordered dot/dotdot directory
2125 The test driver runs fsck twice on a given image and fails the test if
2126 the first run does not detect an error or the second run still detects
2129 Signed-off-by: Andreas Bombe <aeb@debian.org>
2132 Author: Andreas Bombe <aeb@debian.org>
2133 Date: Tue May 31 03:32:42 2016 +0200
2135 Add testsuite foundations
2137 Add testsuite on the basis of the automake framework. As a start, three
2138 tests for basic mkfs functionality compare mkfs generated images against
2141 Signed-off-by: Andreas Bombe <aeb@debian.org>
2144 Author: Andreas Bombe <aeb@debian.org>
2145 Date: Wed Sep 7 03:48:16 2016 +0200
2147 Append +git to version number in configure.ac
2149 Don't let dosfstools compiled from git with additional commits show the
2150 exact release version number.
2152 Signed-off-by: Andreas Bombe <aeb@debian.org>
2155 Author: Álvaro Fernández Rojas <noltari@gmail.com>
2156 Date: Thu Jun 30 08:43:50 2016 +0200
2158 Add config.guess and config.sub to gitignore
2160 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2161 Signed-off-by: Andreas Bombe <aeb@debian.org>
2164 Author: Álvaro Fernández Rojas <noltari@gmail.com>
2165 Date: Thu Jun 30 08:41:51 2016 +0200
2167 Use autoconf to look for OS X endian include.
2169 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2170 Signed-off-by: Andreas Bombe <aeb@debian.org>
2173 Author: Alessio Sergi <al3hex@gmail.com>
2174 Date: Fri May 6 18:18:18 2016 +0200
2176 src/device_info.c: Fix undefined PATH_MAX under musl
2178 In musl libc, PATH_MAX is defined in <limits.h>.
2180 Signed-off-by: Andreas Bombe <aeb@debian.org>
2183 Author: Lars Wendler <polynomial-c@gentoo.org>
2184 Date: Tue May 10 09:47:57 2016 +0200
2186 Don't link to udev via LDFLAGS. There's LDADD for such a task.
2189 https://www.gnu.org/software/automake/manual/html_node/Linking.html
2191 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
2192 Signed-off-by: Andreas Bombe <aeb@debian.org>
2195 Author: Andreas Bombe <aeb@debian.org>
2196 Date: Wed May 11 03:44:58 2016 +0200
2198 mkfs: Default to 64/32 heads/sectors for targets smaller than 512 MB
2200 This may put defaults in certain use cases a little bit more in line
2201 with the old defaults in versions up to 3.0.28. It has mostly aesthetic
2202 value in most cases.
2204 Signed-off-by: Andreas Bombe <aeb@debian.org>
2206 commit 786e66e (tag: v4.0)
2207 Author: Andreas Bombe <aeb@debian.org>
2208 Date: Fri May 6 03:19:07 2016 +0200
2210 Releasing version 4.0.
2212 Signed-off-by: Andreas Bombe <aeb@debian.org>
2215 Author: Andreas Bombe <aeb@debian.org>
2216 Date: Fri May 6 02:34:42 2016 +0200
2218 src/Makefile.am: Fix CPPFLAGS for VPATH builds
2220 The -I flag to add the blkdev subdir to the include search path is now
2221 relative to $(srcdir) to allow VPATH builds to work. Additionally move
2222 the -I flag from the mkfs_fat and testdevinfo CFLAGS to CPPFLAGS where
2223 it actually belongs.
2225 Signed-off-by: Andreas Bombe <aeb@debian.org>
2228 Author: Andreas Bombe <aeb@debian.org>
2229 Date: Wed Apr 27 21:38:37 2016 +0200
2231 read_boot(): Handle excessive FAT size specifications
2233 The variable used for storing the FAT size (in bytes) was an unsigned
2234 int. Since the size in sectors read from the BPB was not sufficiently
2235 checked, this could end up being zero after multiplying it with the
2236 sector size while some offsets still stayed excessive. Ultimately it
2237 would cause segfaults when accessing FAT entries for which no memory
2240 Make it more robust by changing the types used to store FAT size to
2241 off_t and abort if there is no room for data clusters. Additionally
2242 check that FAT size is not specified as zero.
2244 Fixes #25 and fixes #26.
2246 Reported-by: Hanno Böck
2247 Signed-off-by: Andreas Bombe <aeb@debian.org>
2250 Author: Andreas Bombe <aeb@debian.org>
2251 Date: Wed Apr 27 14:16:53 2016 +0200
2253 Use variable total_fat_entries in read_boot() for readability
2255 Signed-off-by: Andreas Bombe <aeb@debian.org>
2258 Author: Álvaro Fernández Rojas <noltari@gmail.com>
2259 Date: Fri Apr 8 12:20:46 2016 +0200
2261 Add missing iconv library for OS X
2263 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2264 Signed-off-by: Andreas Bombe <aeb@debian.org>
2267 Author: Álvaro Fernández Rojas <noltari@gmail.com>
2268 Date: Fri Apr 8 12:20:27 2016 +0200
2270 Add endian support for OS X
2272 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2273 Signed-off-by: Andreas Bombe <aeb@debian.org>
2276 Author: Joel Holdsworth <joel.holdsworth@vcatechnology.com>
2277 Date: Thu Mar 10 00:53:07 2016 +0000
2279 Configure option to disable building with libudev
2281 Signed-off-by: Andreas Bombe <aeb@debian.org>
2284 Author: Andreas Bombe <aeb@debian.org>
2285 Date: Mon Feb 22 03:47:14 2016 +0100
2287 Remove use of PATH_MAX in path_name()
2289 The length of a file path on the checked filesystem has no relation to
2290 the maximum path length of the system fsck is running on. So replace it
2291 with a constant of our own.
2293 As a bonus this will not fail compilation on a system without PATH_MAX.
2295 Signed-off-by: Andreas Bombe <aeb@debian.org>
2298 Author: Andreas Bombe <aeb@debian.org>
2299 Date: Wed Feb 17 21:04:35 2016 +0100
2301 Add preliminary entry for release 4.0 to NEWS
2303 Signed-off-by: Andreas Bombe <aeb@debian.org>
2306 Author: Andreas Bombe <aeb@debian.org>
2307 Date: Wed Feb 17 21:02:06 2016 +0100
2309 Adjust ridiculous source indentation in io.c
2311 Signed-off-by: Andreas Bombe <aeb@debian.org>
2314 Author: Andreas Bombe <aeb@debian.org>
2315 Date: Wed Feb 17 20:51:53 2016 +0100
2317 Document ./configure --enable-compat-symlinks in README
2319 Signed-off-by: Andreas Bombe <aeb@debian.org>
2322 Author: Andreas Bombe <aeb@debian.org>
2323 Date: Wed Feb 17 15:16:27 2016 +0100
2325 Add include paths.h in the HAVE_DECL_GETMNTENT case
2327 _PATH_MOUNTED is now used for getmntent() in place of MOUNTED because
2328 the latter was marked as a deprecated alias in glibc's mntent.h. The
2329 mntent.h of musl libc does not include the _PATH_MOUNTED however. Fix
2330 this by including paths.h alongside mntent.h
2332 Signed-off-by: Andreas Bombe <aeb@debian.org>
2335 Author: Andreas Bombe <aeb@debian.org>
2336 Date: Wed Feb 17 15:06:56 2016 +0100
2338 man fsck: Document the -c option
2340 Signed-off-by: Andreas Bombe <aeb@debian.org>
2343 Author: Andreas Bombe <aeb@debian.org>
2344 Date: Mon Feb 15 02:10:57 2016 +0100
2346 Add NEWS file with changes of the last two releases
2348 Signed-off-by: Andreas Bombe <aeb@debian.org>
2351 Author: Andreas Bombe <aeb@debian.org>
2352 Date: Fri Feb 12 03:56:16 2016 +0100
2354 Make filesystem mounted check portable
2356 A new function is_device_mounted() in device_info.c is now used by
2357 check_mount() in mkfs.fat.c. It contains the getmntent() using code
2358 used before in check_mount() and now an alternative using getmntinfo()
2359 as found on the BSDs.
2361 In case neither function is available, is_device_mounted() defaults to
2362 reporting that the device isn't mounted.
2364 Signed-off-by: Andreas Bombe <aeb@debian.org>
2367 Author: Andreas Bombe <aeb@debian.org>
2368 Date: Fri Feb 12 01:57:33 2016 +0100
2370 Make use of endian.h portable to BSD
2372 The endian.h found on Linux and the BSDs appear to be compatible, but
2373 they are found in different locations. Add tests in configure.ac and a
2374 new endian_compat.h file that has the logic to include the correct
2377 Signed-off-by: Andreas Bombe <aeb@debian.org>
2380 Author: Andreas Bombe <aeb@debian.org>
2381 Date: Wed Feb 10 21:30:06 2016 +0100
2383 Fix format string in check_file() (%lu → %llu)
2385 The cluster chain length printing needs a 64 bit calculation, so we can
2386 just use unsigned long long instead of uint64_t and use the format
2389 Signed-off-by: Andreas Bombe <aeb@debian.org>
2392 Author: Andreas Bombe <aeb@debian.org>
2393 Date: Fri Feb 5 14:39:00 2016 +0100
2395 blkdev.c: Prevent unused parameter warnings in fallback code
2397 Signed-off-by: Andreas Bombe <aeb@debian.org>
2400 Author: Andreas Bombe <aeb@debian.org>
2401 Date: Fri Feb 5 14:36:14 2016 +0100
2403 blkdev_get_size(): Remove unused variable ch
2405 Signed-off-by: Andreas Bombe <aeb@debian.org>
2408 Author: Andreas Bombe <aeb@debian.org>
2409 Date: Wed Feb 10 03:22:19 2016 +0100
2411 Reinstate alignment of FAT32 structures to cluster size
2413 This reverts commits 17c956cb9 and d63e0d627 where the alignment was
2414 removed because it created problems with a device that refused to read
2415 the aligned filesystem. The option -a is already provided to disable
2416 alignment in order to handle such cases.
2418 This change brings it back in line with FAT12/16 where alignment wasn't
2419 disabled and brings consistency with the current command line options,
2420 where only the option to disable alignment exists but no opposite option
2423 Signed-off-by: Andreas Bombe <aeb@debian.org>
2426 Author: Andreas Bombe <aeb@debian.org>
2427 Date: Wed Feb 3 03:38:33 2016 +0100
2429 Makefile.am: Add historic documentation to distribution
2431 Signed-off-by: Andreas Bombe <aeb@debian.org>
2434 Author: Andreas Bombe <aeb@debian.org>
2435 Date: Wed Feb 3 02:38:24 2016 +0100
2437 src/Makefile.am: Add forgotten msdos_fs.h to mkfs_fat_SOURCES
2439 Signed-off-by: Andreas Bombe <aeb@debian.org>
2442 Author: Andreas Bombe <aeb@debian.org>
2443 Date: Wed Feb 3 02:34:51 2016 +0100
2445 Remove sys/ioctl.h and linux/fd.h include from io.c
2447 These weren't used anymore and the linux/fd.h include would
2448 gratuitously cause compilation to fail on non-Linux environments.
2450 Signed-off-by: Andreas Bombe <aeb@debian.org>
2453 Author: Andreas Bombe <aeb@debian.org>
2454 Date: Wed Feb 3 02:31:00 2016 +0100
2456 Reinstate some #include <sys/types.h>
2458 These shouldn't have been removed in commit 245d0cce5. Put them back for
2459 correctness even though the definitions were pulled in implicitly.
2461 Signed-off-by: Andreas Bombe <aeb@debian.org>
2464 Author: Andreas Bombe <aeb@debian.org>
2465 Date: Wed Jan 27 21:38:29 2016 +0100
2467 src/Makefile.am: Put all header files in appropriate _SOURCES variables
2469 With the headers missing the dist targets of the automake generated
2470 Makefiles would not include them and make the resulting dist
2473 Also combine sources collections into common variables for
2476 Signed-off-by: Andreas Bombe <aeb@debian.org>
2479 Author: Andreas Bombe <aeb@debian.org>
2480 Date: Wed Jan 27 15:28:42 2016 +0100
2482 mkfs man: Note that sector sizes > 4096 are non-standard
2484 Signed-off-by: Andreas Bombe <aeb@debian.org>
2487 Author: Andreas Bombe <aeb@debian.org>
2488 Date: Mon Jan 25 21:30:23 2016 +0100
2490 mkfs: Improve parsing of bad blocks file
2492 The bad blocks file that can be given to mkfs via the -l option had a
2493 very simplistic design. It failed to notice it was parsing an empty
2494 line and would report errors for that.
2496 Replace it with a more robust version that ignores empty lines as well
2497 as leading and trailing white space. Additionally it produces meaningful
2501 Signed-off-by: Andreas Bombe <aeb@debian.org>
2504 Author: Andreas Bombe <aeb@debian.org>
2505 Date: Mon Jan 25 02:47:12 2016 +0100
2507 mkfs: Limit filesystem size on targets that are too large
2509 For FAT filesystems, the number of sectors has to fit into a 32 bit
2510 variable. Previously this was not checked possibly causing invalid
2511 filesystems to be generated.
2513 Now there is a check for that case which will limit the number of
2514 sectors if needed and print a warning that disk space will be left
2515 unused in that case.
2517 Signed-off-by: Andreas Bombe <aeb@debian.org>
2520 Author: Andreas Bombe <aeb@debian.org>
2521 Date: Fri Jan 22 21:29:20 2016 +0100
2523 mkfs: Improved bounds checking in mark_FAT_sector()/mark_FAT_cluster()
2525 In mark_FAT_sector() the sector number itself is now checked against
2526 limits instead of the computed cluster number. Even with sector number
2527 before the start of the data area, the cluster number may be valid for
2528 the first cluster due to dividing by the cluster size.
2530 Both functions now check for upper limits and should prevent writing
2531 past the valid end of the FAT.
2533 Signed-off-by: Andreas Bombe <aeb@debian.org>
2536 Author: Andreas Bombe <aeb@debian.org>
2537 Date: Fri Jan 15 02:17:16 2016 +0100
2539 mkfs: Fix offset error in FAT12/16 bad cluster marking
2541 The root directory wasn't factored in to the calculation of the data
2542 area start sector. On FAT32 the root directory is in the data area, but
2543 for FAT12 and FAT16 it is a reserved space before the start of the data
2546 On FAT12 and FAT16, this resulted in the wrong clusters being marked
2547 during bad blocks mapping, whether from check_blocks() or from reading
2548 the user supplied bad blocks file.
2550 Signed-off-by: Andreas Bombe <aeb@debian.org>
2553 Author: Andreas Bombe <aeb@debian.org>
2554 Date: Fri Jan 15 01:59:59 2016 +0100
2556 mkfs: Fix off-by-2 error in bad cluster marking
2558 mark_FAT_sector(), which has the mark_sector_bad() macro as its sole
2559 user, computed the cluster number corresponding to the sector by taking
2560 its offset from the first data sector and dividing by sectors per
2563 What it missed was that the first data cluster is number 2 and not 0.
2564 This meant all marks were off by 2 and when the first two clusters are
2565 supposed to be marked, it would overwrite the reserved cluster values
2566 and create an invalid filesystem.
2568 Signed-off-by: Andreas Bombe <aeb@debian.org>
2571 Author: Andreas Bombe <aeb@debian.org>
2572 Date: Thu Jan 14 14:43:00 2016 +0100
2574 .gitignore: Add .dirstamp
2576 Signed-off-by: Andreas Bombe <aeb@debian.org>
2579 Author: Andreas Bombe <aeb@debian.org>
2580 Date: Thu Jan 14 14:38:53 2016 +0100
2582 mkfs: Reword non-standard sector size warning
2584 Signed-off-by: Andreas Bombe <aeb@debian.org>
2587 Author: Andreas Bombe <aeb@debian.org>
2588 Date: Wed Dec 30 15:10:35 2015 +0100
2590 Clean up includes in mkfs.fat.c
2592 Moving the device probing out into device_info.c removed the need for a
2593 number of includes in mkfs.fat.c. Remove them and add a define for
2594 BLOCK_SIZE, which was the only thing used from linux/fs.h.
2596 Signed-off-by: Andreas Bombe <aeb@debian.org>
2599 Author: Andreas Bombe <aeb@debian.org>
2600 Date: Sun Nov 29 01:59:10 2015 +0100
2602 Don't use pointer to first member when more of the struct gets copied
2604 Where a fs_write() of "first 13 bytes of directory entry" is intended,
2605 actually use pointer to directory entry structure instead of the 11
2606 byte name field at the beginning.
2608 This does not change how the code works, it is just a clean up.
2610 Signed-off-by: Andreas Bombe <aeb@debian.org>
2613 Author: Andreas Bombe <aeb@debian.org>
2614 Date: Sun Nov 29 00:44:48 2015 +0100
2616 Remove name/extension split in directory entry structures
2618 Both the DIR_ENT structure in fsck.fat.h and the msdos_dir_entry in
2619 msdos_fs.h - these represent the on disk format of directory entries -
2620 had the name field split into name[8] followed by ext[3].
2622 By far the most operations on name are on the full name including
2623 extension and they treated the name field as an 11 byte array. This is
2624 an array overflow that worked because the structs have the attribute
2625 packed and the extension field is following right after.
2627 Nevertheless, this is not clean C and the merging of both fields
2628 actually simplified the code in a few places.
2630 Signed-off-by: Andreas Bombe <aeb@debian.org>
2633 Author: Andreas Bombe <aeb@debian.org>
2634 Date: Fri Nov 27 21:29:49 2015 +0100
2636 Free allocated strings after use
2638 There are multiple calls to cnv_unicode() in lfn.c which returns an
2639 allocated string. Most had the appropriate free() calls after printing
2640 the strings. Add the missing two calls where memory was leaked.
2644 Signed-off-by: Andreas Bombe <aeb@debian.org>
2647 Author: Andreas Bombe <aeb@debian.org>
2648 Date: Fri Nov 27 03:34:51 2015 +0100
2650 Add test for and include linux/hdreg.h in blkdev.c
2652 Before, blkdev did not include it and depended on its own fallback
2653 definition of the ioctl and struct hd_geometry.
2655 Signed-off-by: Andreas Bombe <aeb@debian.org>
2658 Author: Andreas Bombe <aeb@debian.org>
2659 Date: Fri Nov 27 03:28:14 2015 +0100
2661 Add FDGETPRM attempt to blkdev_get_geometry()
2663 If HDIO_GETGEO isn't available or has failed, try FDGETPRM. This should
2664 get the geometry from floppy drivers where HDIO_GETGEO isn't supported.
2666 Signed-off-by: Andreas Bombe <aeb@debian.org>
2669 Author: Andreas Bombe <aeb@debian.org>
2670 Date: Fri Nov 27 03:25:55 2015 +0100
2672 Add blkdev_get_start() for getting partition start offset
2674 Signed-off-by: Andreas Bombe <aeb@debian.org>
2677 Author: Andreas Bombe <aeb@debian.org>
2678 Date: Thu Nov 26 23:33:02 2015 +0100
2680 Remove use of libblkid again
2682 It appears libblkid is not as widely available as presumed, since some
2683 platforms only have the original libblkid included in e2fsprogs which
2684 lacks the needed functionality. This commit removes the requirement and
2687 As a replacement, blkdev.c from util-linux is included, which offers the
2688 required basic functionality in a portable way.
2690 Signed-off-by: Andreas Bombe <aeb@debian.org>
2693 Author: Andreas Bombe <aeb@debian.org>
2694 Date: Wed Oct 21 21:32:30 2015 +0200
2696 Use just device size not major number in Atari mode
2698 In Atari mode, read_boot() in boot.c used the device major number to
2699 determine whether to use FAT12. It would always use FAT12 for a floppy,
2700 otherwise only if it is a RAM disk or loopback device and has a size
2701 corresponding to standard floppy formats.
2703 Since this check was already broken for a long time (another place that
2704 assumed 8 bit major numbers) and there is no real point to make the
2705 distinction based on device, this commit reduces the check to just
2706 compare against standard floppy sizes.
2708 Signed-off-by: Andreas Bombe <aeb@debian.org>
2711 Author: Andreas Bombe <aeb@debian.org>
2712 Date: Wed Oct 21 00:18:22 2015 +0200
2714 Remove loff_t and llseek()
2716 There appear to have been multiple conversions to 64 bit file offsets on
2717 32 bit architectures in dosfstools over the years, but today with the
2718 proper setup off_t is 64 bits and simple lseek() can be used. The
2719 AC_SYS_LARGEFILE macro in configure.ac does what is required to make
2722 Given this, convert all uses of loff_t to off_t, remove llseek()
2723 definitions and change llseek() calls to plain lseek().
2725 Signed-off-by: Andreas Bombe <aeb@debian.org>
2728 Author: Andreas Bombe <aeb@debian.org>
2729 Date: Fri Oct 16 21:47:04 2015 +0200
2731 Remove DJGPP support
2733 These macros have been added back when dosfstools was around version 2.
2734 It is difficult to say whether these are still working correctly or
2735 whether they are in use at all. FreeDOS appears to still show version
2736 2.11 of dosfstools in their software directory.
2738 Supporting actual MS-DOS or compatible may need more work in the
2739 current state of things and this DJGPP support can be removed until
2742 Signed-off-by: Andreas Bombe <aeb@debian.org>
2745 Author: Andreas Bombe <aeb@debian.org>
2746 Date: Thu Oct 8 16:17:22 2015 +0200
2748 mkfs.fat: Complete overhaul of device probing
2750 The device probing in mkfs.fat is used to get device parameters where
2751 needed and also to decide whether to refuse overwriting a device due to
2752 possible user error. This code has suffered severe bitrot and is highly
2753 Linux specific. Highlights include using hardcoded major/minor device
2754 numbers to classify a device, and using 8 bits major/minor numbers that
2755 have become obsolete a long time ago and thus often misidentifying a
2758 The overhauled implementation is now in src/device_info.c and makes use
2759 of libudev (optional, recommended) and libblkid (required) to probe the
2760 device and where Linux ioctls are required it provides fallbacks and
2761 does not attempt to call these on non-Linux systems. The FAT parameter
2762 selection has been unified and simplified in the process.
2764 A new executable testdevinfo has been added that gets built but not
2765 automatically installed. It takes one file name, uses the same probing
2766 as mkfs.fat would with verbose messages enabled and displays the
2769 Signed-off-by: Andreas Bombe <aeb@debian.org>
2772 Author: Andreas Bombe <aeb@debian.org>
2773 Date: Sat Sep 12 02:54:33 2015 +0200
2775 Die on out of range cluster values in set_fat()/get_fat()
2777 To prevent bugs caused by FAT corruption inside fsck to go unnoticed,
2778 add a check against out of range requested cluster values in get_fat()
2779 and against out of range cluster to change and new cluster value in
2782 When an invalid cluster value is detected, these functions now die()
2783 with an "internal error" message.
2785 Signed-off-by: Andreas Bombe <aeb@debian.org>
2788 Author: Andreas Bombe <aeb@debian.org>
2789 Date: Mon Sep 14 00:33:49 2015 +0200
2791 configure.ac: Use AS_HELP_STRING to format option help
2793 Signed-off-by: Andreas Bombe <aeb@debian.org>
2796 Author: Andreas Bombe <aeb@debian.org>
2797 Date: Mon Sep 14 00:30:40 2015 +0200
2799 version.h: Use @configure_input@ autoconf variable in boilerplate
2801 Signed-off-by: Andreas Bombe <aeb@debian.org>
2804 Author: Andreas Bombe <aeb@debian.org>
2805 Date: Mon Sep 14 00:29:27 2015 +0200
2807 .gitignore: Add TAGS in addition to tags
2809 Signed-off-by: Andreas Bombe <aeb@debian.org>
2812 Author: Andreas Bombe <aeb@debian.org>
2813 Date: Fri Sep 11 20:28:12 2015 +0200
2815 Rename clusters field in DOS_FS struct
2817 Rename it to data_clusters to prevent mistaking the clusters field of
2818 the DOS_FS struct as the total number of FAT entries instead of the
2819 number of data clusters (two less than the number of entries).
2821 Signed-off-by: Andreas Bombe <aeb@debian.org>
2824 Author: Andreas Bombe <aeb@debian.org>
2825 Date: Fri Sep 11 19:47:29 2015 +0200
2827 set_fat(): Fix off-by-2 error leading to corruption in FAT12
2829 In FAT12 two 12 bit entries are combined to a 24 bit value (three
2830 bytes). Therefore, when an even numbered FAT entry is set in FAT12, it
2831 must be be combined with the following entry. To prevent accessing
2832 beyond the end of the FAT array, it must be checked that the cluster is
2835 Previously, the check tested that the requested cluster was equal to
2836 fs->clusters - 1. However, fs->clusters is the number of data clusters
2837 not including the two reserved FAT entries at the start so the test
2838 triggered two clusters early.
2840 If the third to last entry was written on a FAT12 filesystem with an
2841 odd number of clusters, the second to last entry would be corrupted.
2842 This corruption may also lead to invalid memory accesses when the
2843 corrupted entry becomes out of bounds and is used later.
2845 Change the test to fs->clusters + 1 to fix.
2847 Reported-by: Hanno Böck
2848 Signed-off-by: Andreas Bombe <aeb@debian.org>
2851 Author: Andreas Bombe <aeb@debian.org>
2852 Date: Fri Sep 11 19:34:10 2015 +0200
2854 set_fat(): Move FAT12 next cluster check up
2856 In FAT12 two 12 bit entries are combined to a 24 bit value (three
2857 bytes). Therefore, when an even numbered FAT entry is set in FAT12, it
2858 must be be combined with the following entry. To prevent accessing
2859 beyond the end of the FAT array, it must be checked that the cluster is
2862 This check was broken in ff1b24e9 (first included in 3.0.3) as the
2863 lookup was done unconditionally and the check influenced only using the
2866 Move the check up to fix.
2868 Signed-off-by: Andreas Bombe <aeb@debian.org>
2871 Author: Andreas Bombe <aeb@debian.org>
2872 Date: Tue Sep 8 03:58:29 2015 +0200
2874 Prevent out of bound array read in date_dos2unix()
2876 The function date_dos2unix() is called during fsck while showing
2877 information about duplicate file names. In case the date field of a
2878 directory entry contains the invalid value 0 for the month,
2879 date_dos2unix would read index -1 of the day_n array.
2881 Add a check to prevent that and also make the day_n array const on this
2884 Reported-by: Hanno Böck
2885 Signed-off-by: Andreas Bombe <aeb@debian.org>
2888 Author: Yann E. MORIN <yann.morin.1998@free.fr>
2889 Date: Sun Aug 16 15:55:43 2015 +0200
2891 mkfs.fat: fix incorrect int type
2893 u_int32_t is not a stanard type, while uint32_t is. This fixes builds
2894 with the musl C library, which only defines so-called "clean" headers;
2895 build failures are like (back-quotes and elision manually added for
2898 http://autobuild.buildroot.org/results/a09/a0923d7f6d4dbae02eba4c5024bbdae3a52aa85a/build-end.log
2900 /home/peko/autobuild/instance-1/output/host/usr/bin/x86_64-linux-gcc -D_LARGEFILE_SOURCE \
2901 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_GNU_SOURCE -D_LARGEFILE_SOURCE \
2902 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o mkfs.fat.o src/mkfs.fat.c
2903 src/mkfs.fat.c: In function 'main':
2904 src/mkfs.fat.c:1415:18: error: 'u_int32_t' undeclared (first use in this function)
2905 volume_id = (u_int32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); [...]
2907 src/mkfs.fat.c:1415:18: note: each undeclared identifier is reported only once for each
2908 function it appears in
2910 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2911 Signed-off-by: Andreas Bombe <aeb@debian.org>
2914 Author: Andreas Bombe <aeb@debian.org>
2915 Date: Wed Jun 3 03:33:10 2015 +0200
2917 Add README.md, remove Markdown formatting from README
2919 Signed-off-by: Andreas Bombe <aeb@debian.org>
2922 Author: Andreas Bombe <aeb@debian.org>
2923 Date: Wed Jun 3 03:27:24 2015 +0200
2925 Add simple README in Markdown format
2927 Signed-off-by: Andreas Bombe <aeb@debian.org>
2930 Author: Andreas Bombe <aeb@debian.org>
2931 Date: Tue Jun 2 18:25:06 2015 +0200
2933 Configure option for legacy names symlinks
2935 The symlinks from the old names (mkdosfs, dosfsck, etc.) are now only
2936 created on "make install" when the --enable-compat-symlinks option was
2939 Signed-off-by: Andreas Bombe <aeb@debian.org>
2942 Author: Andreas Bombe <aeb@debian.org>
2943 Date: Sun May 31 02:40:19 2015 +0200
2945 Convert build system to autoconf/automake
2947 In preparation for fixing the horribly outdated and broken device
2948 checking - which will likely involve using additional libraries like
2949 libblkid - as well as making this package portable to other operating
2950 systems, the build system is now the tried and true autoconf/automake
2951 combination which should make both goals a little more straightforward.
2953 The release version number and date are now in configure.ac and
2954 substituted by configure where they are needed. Now it is no longer
2955 necessary to change the number in multiple places for a release and the
2956 man pages get the number substituted directly into them, making the
2957 update-version.sh script and the VERSION file obsolete.
2959 The English man pages are moved back up one directory to mark their
2960 status as the master copy for all translations. At the moment the po4a
2961 translation infrastructure is defunct since it isn't integrated into
2962 the automake environment yet. So far it hasn't been used, so that is
2963 not an actual regression.
2965 The date in the man pages is not automatically updated anymore. This is
2966 as it should be, since the date is supposed to signify the time of the
2967 last nontrivial change and not the release date of the software.
2969 Signed-off-by: Andreas Bombe <aeb@debian.org>
2971 commit 85022fe (tag: v3.0.28)
2972 Author: Andreas Bombe <aeb@debian.org>
2973 Date: Sat May 16 02:56:17 2015 +0200
2975 Releasing version 3.0.28.
2977 Signed-off-by: Andreas Bombe <aeb@debian.org>
2980 Author: Andreas Bombe <aeb@debian.org>
2981 Date: Sat May 16 02:10:18 2015 +0200
2983 manpages: Mark MT and ME tags as untranslated for po4a
2985 Signed-off-by: Andreas Bombe <aeb@debian.org>
2988 Author: Andreas Bombe <aeb@debian.org>
2989 Date: Sun May 10 19:59:02 2015 +0200
2991 mkfs: Small changes to FAT32 cluster size selection
2993 Put the cluster size selection back in line with the table used in
2994 Microsoft's fatgen103.pdf and fix the comment. This only involved
2995 changing some comparison operators, all values stayed the same.
2997 Signed-off-by: Andreas Bombe <aeb@debian.org>
3000 Author: Andreas Bombe <aeb@debian.org>
3001 Date: Mon Apr 20 23:41:34 2015 +0200
3003 fsck: Mention -r is default in usage message
3005 Signed-off-by: Andreas Bombe <aeb@debian.org>
3008 Author: Andreas Bombe <aeb@debian.org>
3009 Date: Mon Apr 20 23:30:56 2015 +0200
3011 manpages: Remove obsolete information about Linux FAT support
3013 Signed-off-by: Andreas Bombe <aeb@debian.org>
3016 Author: Andreas Bombe <aeb@debian.org>
3017 Date: Thu Apr 16 23:16:08 2015 +0200
3019 manpages: Convert the rest of argument placeholders to upper case
3021 Signed-off-by: Andreas Bombe <aeb@debian.org>
3024 Author: Andreas Bombe <aeb@debian.org>
3025 Date: Thu Apr 16 22:51:20 2015 +0200
3027 manpages: Fix formatting
3029 Make the manpages conform to the rules for groff sources. First,
3030 eliminate empty lines because these create vertical spaces where it
3031 isn't desired. Man page sources should not contain empty lines. Second,
3032 put a line break between sentences in a paragraph. A period is
3033 recognized and formatted as a full stop period only when a line break
3034 comes right after it.
3036 Signed-off-by: Andreas Bombe <aeb@debian.org>
3039 Author: Andreas Bombe <aeb@debian.org>
3040 Date: Fri Apr 10 20:32:50 2015 +0200
3042 fsck: Verify first cluster of a file is not 1
3044 Previously the FAT was checked for any out of bounds entries which were
3045 cleared. However the first cluster of a file, as specified in its
3046 directory entry, was not verified to not be 1.
3048 In addition to missing this filesystem error, code that correctly
3049 assumes the FAT contained no bad entries anymore could still look up
3050 invalid table indices depending on the value stored in entry 1. With
3051 the right values and FAT size this can lead to a segfault by accessing
3054 Now test_file() will ignore files where the first cluster equals 1 and
3055 an additional check in check_file() will truncate them.
3057 This bug was reported in http://bugs.debian.org/773885 by Jakub Wilk.
3059 Signed-off-by: Andreas Bombe <aeb@debian.org>
3062 Author: Andreas Bombe <aeb@debian.org>
3063 Date: Thu Apr 2 23:35:00 2015 +0200
3065 Simplify synopses of man pages
3067 Since there is only one mode of invocation for the tools, it is
3068 somewhat pointless to list every possible option in the synopsis.
3070 Fix a few style inconsistencies in addition, specifically that
3071 placeholders for option arguments are in capital letters and should be
3072 shown where the option is described.
3074 Signed-off-by: Andreas Bombe <aeb@debian.org>
3077 Author: Andreas Bombe <aeb@debian.org>
3078 Date: Wed Apr 1 20:55:58 2015 +0200
3080 Update homepage and maintainer sections of man pages
3082 Signed-off-by: Andreas Bombe <aeb@debian.org>
3085 Author: Andreas Bombe <aeb@debian.org>
3086 Date: Wed Apr 1 20:05:01 2015 +0200
3088 mkfs: Show a clearer message that file already exists with -C
3090 Signed-off-by: Andreas Bombe <aeb@debian.org>
3093 Author: Andreas Bombe <aeb@debian.org>
3094 Date: Mon Mar 30 21:12:51 2015 +0200
3096 mkfs: Remove O_TRUNC from file creation call
3098 open() is called with O_EXCL | O_CREAT, so it will definitely create a
3099 new, empty file or error out. O_TRUNC is superfluous and may be harmless
3100 in practice but its effect under these circumstances is unspecified.
3102 Signed-off-by: Andreas Bombe <aeb@debian.org>
3105 Author: Andreas Bombe <aeb@debian.org>
3106 Date: Mon Mar 30 21:09:51 2015 +0200
3108 mkfs: Use ftruncate() for expanding created file
3110 Signed-off-by: Andreas Bombe <aeb@debian.org>
3113 Author: Andreas Bombe <aeb@debian.org>
3114 Date: Tue Mar 24 21:32:40 2015 +0100
3116 mkfs: Add --invariant option
3118 The --invariant option is designed to prevent random or time based
3119 differences to end up in generated filesystems so that multiple runs
3120 generate on the same file or device create completely identical results.
3122 This is intended for debugging or regression testing of mkfs.fat.
3124 Signed-off-by: Andreas Bombe <aeb@debian.org>
3127 Author: Andreas Bombe <aeb@debian.org>
3128 Date: Thu Mar 19 21:35:21 2015 +0100
3130 mkfs: Add long option parsing
3132 Add long option parsing with getopt_long() to mkfs and define --help as
3133 the first long option. The usage() function now takes an exit code
3134 parameter so that the --help option handling can exit the program with
3135 a success exit code.
3137 Signed-off-by: Andreas Bombe <aeb@debian.org>
3140 Author: Andreas Bombe <aeb@debian.org>
3141 Date: Mon Mar 16 21:08:35 2015 +0100
3143 Do not expect EOF as return value of getopt()
3145 Signed-off-by: Andreas Bombe <aeb@debian.org>
3148 Author: Andreas Bombe <aeb@debian.org>
3149 Date: Wed Mar 11 21:45:04 2015 +0100
3151 fsck.fat: Fix read beyond end of array on FAT12
3153 When a FAT12 filesystem contains an odd number of clusters, setting the
3154 last cluster with set_fat() will trigger a read of the next entry,
3155 which does not exist in the fat array allocated for this.
3157 Round up the allocation to an even number of FAT entries for FAT12 so
3158 that this is fixed without introducing special casing in get_fat().
3160 Signed-off-by: Andreas Bombe <aeb@debian.org>
3163 Author: Álvaro Fernández Rojas <noltari@gmail.com>
3164 Date: Sat Mar 7 13:23:23 2015 +0100
3166 Remove linux/msdos_fs.h includes
3168 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3169 Signed-off-by: Andreas Bombe <aeb@debian.org>
3172 Author: Álvaro Fernández Rojas <noltari@gmail.com>
3173 Date: Thu Feb 26 19:22:54 2015 +0100
3175 Remove non standard int types
3177 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3178 Signed-off-by: Andreas Bombe <aeb@debian.org>
3181 Author: Álvaro Fernández Rojas <noltari@gmail.com>
3182 Date: Thu Feb 26 19:41:19 2015 +0100
3186 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3187 Signed-off-by: Andreas Bombe <aeb@debian.org>
3190 Author: Álvaro Fernández Rojas <noltari@gmail.com>
3191 Date: Thu Feb 26 12:51:23 2015 +0100
3193 Makefile: avoid using install -D
3195 OS X and FreeBSD are not compatible with this option
3197 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3198 Signed-off-by: Andreas Bombe <aeb@debian.org>
3201 Author: Álvaro Fernández Rojas <noltari@gmail.com>
3202 Date: Thu Feb 26 12:50:57 2015 +0100
3204 Makefile: fix typo in uninstall-man
3206 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3207 Signed-off-by: Andreas Bombe <aeb@debian.org>
3210 Author: Andreas Bombe <aeb@debian.org>
3211 Date: Thu Feb 19 21:22:54 2015 +0100
3213 fsck.fat: Make -r option default
3215 Default mode is now to interactively repair with the option to write
3216 the changes back at the end (like the -r option) instead of the previous
3217 default mode of interactively correcting but never writing back the
3220 The -r option continues to be recognized by fsck.fat.
3222 Signed-off-by: Andreas Bombe <aeb@debian.org>
3225 Author: Andreas Bombe <aeb@debian.org>
3226 Date: Fri Feb 20 03:19:28 2015 +0100
3228 mkfs.fat: Allow 0xF0 to be specified as media byte
3230 Let the -M option accept 0xF0, which should be the proper descriptor
3231 byte for 3.5" 1.44 MB and 2.88 MB floppies.
3233 Also split the error reporting for -M between badly formatted and
3236 Signed-off-by: Andreas Bombe <aeb@debian.org>
3239 Author: Andreas Bombe <aeb@debian.org>
3240 Date: Wed Jan 28 15:07:18 2015 +0100
3242 Make all char* that may take literals const
3244 Every char* variable or function argument that may be given a literal
3245 string is now made const. Additionally add -Wwrite-strings to CFLAGS to
3246 enable a warning where const would be missing.
3248 Signed-off-by: Andreas Bombe <aeb@debian.org>
3251 Author: Andreas Bombe <aeb@debian.org>
3252 Date: Mon Dec 29 18:24:54 2014 +0100
3254 mkfs.fat.c: Use unsigned char for binary data
3256 Simple char technically works for the dummy_boot_jump variables, but
3257 some compiler warning settings would give a warning over a signed char
3258 overflowing with the values given as initializers.
3260 Signed-off-by: Andreas Bombe <aeb@debian.org>
3263 Author: Andreas Bombe <aeb@debian.org>
3264 Date: Sun Nov 16 19:49:22 2014 +0100
3266 Fix indentation of "fix power loss damage" commit
3268 I fixed the (sometimes misleading) indentation of the code introduced in
3269 commit 6893c45 to be in line with the reset of the code and also removed
3270 the /* PATCH ED+DL */ comments which are quite meaningless to the wider
3273 Signed-off-by: Andreas Bombe <aeb@debian.org>
3276 Author: Andreas Bombe <aeb@debian.org>
3277 Date: Sat Nov 15 16:48:48 2014 +0100
3279 Add tags and editor backup files to .gitignore
3281 Signed-off-by: Andreas Bombe <aeb@debian.org>
3283 commit cb98ae2 (tag: v3.0.27)
3284 Author: Andreas Bombe <aeb@debian.org>
3285 Date: Wed Nov 12 01:10:23 2014 +0100
3287 Releasing version 3.0.27.
3289 Signed-off-by: Andreas Bombe <aeb@debian.org>
3292 Author: Andreas Bombe <aeb@debian.org>
3293 Date: Wed Nov 12 00:22:17 2014 +0100
3295 fsck.fat: Don't print version string every time -v is encountered
3297 Remove the printing of the version string every time -v is seen during
3298 command line parsing in fsck.fat. The version string is printed anyway
3299 before opening the filesystem device/image.
3301 Signed-off-by: Andreas Bombe <aeb@debian.org>
3304 Author: Andreas Bombe <aeb@debian.org>
3305 Date: Tue Nov 11 23:25:30 2014 +0100
3307 Fix attempt to rename root dir in fsck due to uninitialized fields
3309 When add_file() is called with offset 0, it will construct a DIR_ENT for
3310 the root directory instead of reading the contents from the filesystem.
3311 It did not initialize the whole DIR_ENT on the stack, just select
3314 In particular, the lcase field was left with an undefined value. If
3315 that value happened to include the FAT_NO_83NAME bit, the "neither long
3316 nor short file name" check in bad_name() added in 3.0.26 would trigger
3317 and cause an attempt to rename the entry (which is not possible).
3320 $ /sbin/fsck.fat -y bad.img
3321 fsck.fat 3.0.26 (2014-03-07)
3323 Bad short file name ().
3326 bad.img: 14 files, 19388/403266 clusters
3328 This commit changes the initialization zeroize the whole struct before
3329 setting individual fields. Thanks to AlexisM, who found the cause and
3330 posted a patch on the Debian bug http://bugs.debian.org/764992 .
3332 Signed-off-by: Andreas Bombe <aeb@debian.org>
3335 Author: Andreas Bombe <aeb@debian.org>
3336 Date: Tue Nov 11 22:49:50 2014 +0100
3338 Support long file names in volume labeling code
3340 The code to find the volume label directory entry in find_volume_de()
3341 did not consider long file names so far. Directory entries that make up
3342 long file names have four attribute bits set, including the "volume"
3345 This caused the code to mistake a directory entry that is part of a
3346 long file name as the volume name entry. If such an entry is found
3347 first, fatlabel would print garbage when asked to display the label and
3348 mangle the long file name when asked to set it. The latter would lead
3349 to the loss of the long file name and require a fsck to clean up.
3351 Change so that the set of attributes equal that of LFN entries will no
3352 langer match as a volume label.
3354 Signed-off-by: Andreas Bombe <aeb@debian.org>
3356 commit 1646f6e (tag: v3.0.26)
3357 Author: Daniel Baumann <mail@daniel-baumann.ch>
3358 Date: Fri Mar 7 18:40:13 2014 +0100
3360 Releasing version 3.0.26.
3362 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3365 Author: Dir Lotter <dirk.lotter@siemens.com>
3366 Date: Fri Mar 7 18:25:39 2014 +0100
3368 Fix "odd" files created by frequent power-loss.
3370 After running many power losses the filesystem can degrate, containing "odd"
3371 files making the filesystem corrupt that could not be solved by fsck:
3373 * file was not visible in a ls -l
3374 * ls -i reported a "invalid file name" on the console
3375 * a test program with diropen/dirread showed the file, a stat on this file
3377 * file was not accessible and could not be deleted
3379 After digging into the code we found why fsck didn't repair the file system:
3380 One thing was we don't have short filenames. Another issue was that the LFN
3381 pointer was set to NULL and so it looked like we didn't have short and long
3384 Our patch of check.c includes:
3386 * returns 1 from function bad_name() in case no short and no long filename
3388 * auto_rename() and rename_file() got a special handling for the case no short
3390 - it enables the short file name (we think here was a weakness of the old
3391 code: it changed the short filename but didn't enabled it in the
3392 file->dir_ent.lcase entry)
3393 - it reset all attributes except ATTR_DIR and ATTR_VOLUME
3395 This solved our problem pretty well.
3397 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3400 Author: Natanael Copa <ncopa@alpinelinux.org>
3401 Date: Sat Feb 8 18:53:30 2014 +0100
3403 Build fixes for musl libc.
3405 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3407 commit 52588b7 (tag: v3.0.25)
3408 Author: Daniel Baumann <mail@daniel-baumann.ch>
3409 Date: Fri Jan 17 07:11:11 2014 +0100
3411 Releasing version 3.0.25.
3413 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3416 Author: Daniel Baumann <mail@daniel-baumann.ch>
3417 Date: Fri Jan 17 07:09:54 2014 +0100
3419 Updating copyright headers for 2014.
3421 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3424 Author: Andrew Tridgell <tridge@samba.org>
3425 Date: Tue Jan 14 09:37:51 2014 +1100
3427 Fixed remaining 64 bit build warnings.
3429 Some of these may be real bugs.
3431 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3434 Author: Andrew Tridgell <tridge@samba.org>
3435 Date: Tue Jan 14 09:25:28 2014 +1100
3437 Prevent corruption of FAT during fsck on 64 bit platforms.
3439 unsigned long is 64 bit on x86-64, which means set_fat was writing two
3440 entries, which corrupts the next entry. This can cause loss of data in
3443 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3445 commit 0d2c9bc (tag: v3.0.24)
3446 Author: Daniel Baumann <mail@daniel-baumann.ch>
3447 Date: Sat Nov 23 10:36:55 2013 +0100
3449 Releasing version 3.0.24.
3451 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3454 Author: Jaroslav Skarvada <jskarvad@redhat.com>
3455 Date: Sat Nov 23 10:34:48 2013 +0100
3457 Fixed dosfsck on big endian platforms (Resolves: rhbz#1029695).
3459 It seems there is problem in the double conversion on big endians.
3460 The first conversion is done by the explicit conversion to __u16
3461 in the GET_UNALIGNED_W macro, so the secondary conversion by le16toh
3462 seems to be redundant (and wrong).
3464 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3466 commit 6debb4a (tag: v3.0.23)
3467 Author: Daniel Baumann <mail@daniel-baumann.ch>
3468 Date: Tue Oct 15 08:05:46 2013 +0200
3470 Releasing version 3.0.23.
3472 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3475 Author: Daniel Baumann <mail@daniel-baumann.ch>
3476 Date: Tue Oct 15 08:04:11 2013 +0200
3478 Reformating mkfs.fat manpage.
3480 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3483 Author: Michael Shigorin <mike@altlinux.org>
3484 Date: Tue Oct 15 01:29:33 2013 +0400
3486 Fixing "Fixing default sectors per cluster for FAT32" for UEFI.
3488 FAT32 "EFI System Partition" is basically required for UEFI boot;
3489 commit ge048a8d broke that for me with both virtualbox-4.2 and
3490 real hardware (ASUS C60M1-I to be exact) given ~250Mb filesystem.
3492 This commit amends that one by reverting its effects for these
3493 small sizes by restoring 512b cluster size for <= 260Mb FAT32.
3495 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3498 Author: Daniel Baumann <mail@daniel-baumann.ch>
3499 Date: Fri Aug 9 09:38:13 2013 +0200
3501 Also allowing lowercase labels in mkfs (with warning message) consistent with the recent fsck change, thanks to Michael Baum <mbaum@devonit.com>.
3503 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3506 Author: Tim Harder <radhermit@gentoo.org>
3507 Date: Fri Jul 19 18:15:21 2013 +0200
3509 Add install-man dependency to install-symlinks Makefile target.
3511 This fixes a race condition during parallel installs where man page
3512 symlinks won't be installed because install-man hasn't been run yet.
3514 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3516 commit 651f91c (tag: v3.0.22)
3517 Author: Daniel Baumann <mail@daniel-baumann.ch>
3518 Date: Fri Jul 19 07:01:19 2013 +0200
3520 Releasing version 3.0.22.
3522 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3525 Author: Daniel Baumann <mail@daniel-baumann.ch>
3526 Date: Fri Jul 19 06:55:24 2013 +0200
3528 Addding install-symlinks target to phony targets in Makefile.
3530 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3533 Author: Daniel Baumann <mail@daniel-baumann.ch>
3534 Date: Fri Jul 19 06:55:00 2013 +0200
3536 Adding uninstall-symlinks target in Makefile.
3538 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3541 Author: Daniel Baumann <mail@daniel-baumann.ch>
3542 Date: Fri Jul 19 06:45:40 2013 +0200
3544 Allowing fatlabel to write labels in all lowercase but give a warning about DOS/Windows (Closes: #714971).
3546 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3549 Author: John S Gruber <JohnSGruber@gmail.com>
3550 Date: Fri Jul 19 06:40:21 2013 +0200
3552 Add options and make dos boot sector more compatible with reference system (Closes: #552673).
3554 Unless overridden by the user sets the DOS boot sector's
3555 hidden-sectors field to match the start of a hard disk's
3558 Initialize DOS boot sector drive_number according to FAT media type
3559 Addresses LP: #398241 and Debian #552673
3561 Adds options to override the DOS boot sector device_number and
3564 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3567 Author: Daniel Baumann <mail@daniel-baumann.ch>
3568 Date: Wed Jul 17 12:52:20 2013 +0200
3570 Correcting wrong check preventing installation of fatlabel legacy manpage symlink.
3572 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3574 commit d0065d3 (tag: v3.0.21)
3575 Author: Daniel Baumann <mail@daniel-baumann.ch>
3576 Date: Tue Jul 16 08:34:28 2013 +0200
3578 Releasing version 3.0.21.
3580 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3583 Author: Jaroslav Skarvada <jskarvad@redhat.com>
3584 Date: Tue Jun 25 14:53:14 2013 +0200
3586 Adding the missing -p option to the fsck manpage (to be consistent with the output of the tool).
3588 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3591 Author: Patrick J. Volkerding <volkerdi@slackware.com>
3592 Date: Mon Jun 24 14:23:00 2013 +0200
3594 Using $MANDIR instead of hardcoded ${PREFIX}/share/man in the Makefile.
3596 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3599 Author: Daniel Baumann <mail@daniel-baumann.ch>
3600 Date: Fri Jun 14 18:50:31 2013 +0200
3602 Making install-symlinks Makefile target depend on install-bin to not break when using make in parallel, thanks to David Walser <luigiwalser@yahoo.com>.
3604 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3607 Author: Daniel Baumann <mail@daniel-baumann.ch>
3608 Date: Wed Jun 12 13:00:10 2013 +0200
3610 Using US digit date format in version date, rather than name abbrev.
3612 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3614 commit a64195f (tag: v3.0.20)
3615 Author: Daniel Baumann <mail@daniel-baumann.ch>
3616 Date: Wed Jun 12 12:25:32 2013 +0200
3618 Releasing version 3.0.20.
3620 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3623 Author: Daniel Baumann <mail@daniel-baumann.ch>
3624 Date: Wed Jun 12 12:07:58 2013 +0200
3626 Softening message about different boot sectors a bit (Closes: #704198).
3628 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3631 Author: Daniel Baumann <mail@daniel-baumann.ch>
3632 Date: Wed Jun 12 11:42:52 2013 +0200
3634 Harmonizing program name output.
3636 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3639 Author: Martin Wilck <mwilck@arcor.de>
3640 Date: Wed Jun 12 11:38:00 2013 +0200
3642 Don't align FAT to cluster size.
3644 See previous patch for explanation.
3646 With this patch and the previous two, the
3647 mkdosfs generated FAT32 file systems work well in my extremely
3648 picky TechniSat device. Of course, they're also detected cleanly
3649 by Linux and Windows.
3651 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3654 Author: Martin Wilck <mwilck@arcor.de>
3655 Date: Wed Jun 12 11:36:08 2013 +0200
3657 Don't align FAT32 reserved sectors to cluster size.
3659 For certain file system sizes (in particular, exact GB sizes -
3660 don't ask me why) a Technisat HD S2 Plus DVB receiver will still
3661 choke on mkdosfs generated file systems, even if the sectors per
3662 cluster problem is fixed.
3664 By comparing the properties of generated FAT32 FS with results
3665 of the Windows tool "h2format" (www.heise.de/download/h2format.html),
3666 I found that the remaining problems were caused by rounding of the
3667 reserved sectors and FAT space to cluster size (the h2format tool
3670 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3673 Author: Martin Wilck <mwilck@arcor.de>
3674 Date: Wed Jun 12 11:33:33 2013 +0200
3676 Fixing default sectors per cluster for FAT32 (Closes: #690062).
3678 The default sectors per cluster calculated by mkdosfs are outdated,
3679 see http://technet.microsoft.com/en-us/library/cc938438.aspx.
3681 The deviations may cause some 3rd party devices (e.g. TechniSat DVB
3682 receivers) to hang when reading mkdosfs generated file systems.
3684 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3687 Author: Daniel Baumann <mail@daniel-baumann.ch>
3688 Date: Tue Jun 11 20:19:09 2013 +0200
3690 Splitting out legacy symlink creation in toplevel Makefile to own target.
3692 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3695 Author: Daniel Baumann <mail@daniel-baumann.ch>
3696 Date: Wed Jun 12 11:29:12 2013 +0200
3698 Correcting wrong toolname in fsck.fat.
3700 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3703 Author: Daniel Baumann <mail@daniel-baumann.ch>
3704 Date: Tue Jun 11 19:51:47 2013 +0200
3706 Consistently spelling filesystem as filesystem, and not file system.
3708 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3711 Author: Daniel Baumann <mail@daniel-baumann.ch>
3712 Date: Tue Jun 11 19:30:19 2013 +0200
3714 Removing Debian reference in GPL license headers.
3716 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3718 commit 5505cc2 (tag: v3.0.19)
3719 Author: Daniel Baumann <mail@daniel-baumann.ch>
3720 Date: Tue Jun 11 18:46:03 2013 +0200
3722 Releasing version 3.0.19.
3724 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3727 Author: Daniel Baumann <mail@daniel-baumann.ch>
3728 Date: Tue Jun 11 18:44:50 2013 +0200
3730 Running indent on source files.
3732 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3735 Author: Daniel Baumann <mail@daniel-baumann.ch>
3736 Date: Tue Jun 11 18:41:41 2013 +0200
3738 Using memcpy instead of strcpy to fix segfault with fortify, thanks to Dave Reisner <falconindy@jabber.org>.
3740 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3743 Author: Daniel Baumann <mail@daniel-baumann.ch>
3744 Date: Sun Jun 9 13:17:16 2013 +0200
3746 Correcting fsck.fat spelling error in manpages, thanks to E.J.M. Hartman <E.J.M.Hartman@tudelft.nl>.
3748 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3750 commit 2d8ef9b (tag: v3.0.18)
3751 Author: Daniel Baumann <mail@daniel-baumann.ch>
3752 Date: Thu Jun 6 09:49:00 2013 +0200
3754 Releasing version 3.0.18.
3756 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3759 Author: Daniel Baumann <mail@daniel-baumann.ch>
3760 Date: Thu Jun 6 09:38:45 2013 +0200
3762 Adding initial i18n support for manpages with po4a.
3764 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3767 Author: Daniel Baumann <mail@daniel-baumann.ch>
3768 Date: Thu Jun 6 09:17:13 2013 +0200
3770 Renaming tools to sane namespace and keeping legacy symlinks in place.
3772 dosfslabel becomes fatlabel,
3773 dosfsck becomes fsck.fat,
3774 and mkdosfs becomes mkfs.fat.
3776 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3779 Author: Daniel Baumann <mail@daniel-baumann.ch>
3780 Date: Wed Jun 5 07:12:03 2013 +0200
3782 Correcting wrong spelling of Debian in mkdosfs manpage.
3784 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3787 Author: Daniel Baumann <mail@daniel-baumann.ch>
3788 Date: Wed Jun 5 07:10:50 2013 +0200
3790 Correcting spelling typo in boot.c.
3792 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3795 Author: Martin Pitt <martinpitt@gnome.org>
3796 Date: Fri May 24 09:35:44 2013 +0200
3798 dosfslabel: Do not read beyond string length (Closes: #709587).
3800 When checking whether the label contains any lower-case characters, do not read
3801 beyond the end of the string.
3803 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3805 commit 4203a90 (tag: v3.0.17)
3806 Author: Daniel Baumann <mail@daniel-baumann.ch>
3807 Date: Wed May 29 10:14:09 2013 +0200
3809 Releasing version 3.0.17.
3811 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3814 Author: Daniel Baumann <mail@daniel-baumann.ch>
3815 Date: Wed May 29 09:48:24 2013 +0200
3817 Updating maximal lenght of a label in manpage to talk about bytes instead of characters, thanks to Francois Wendling <frwendling@gmail.com> (Closes: #655953).
3819 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3822 Author: Jaroslav Skarvada <jskarvad@redhat.com>
3823 Date: Wed May 29 09:56:08 2013 +0200
3825 Fixing segfault in dosfslabel.
3827 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3830 Author: James Byrne <jbyrne@aminocom.com>
3831 Date: Mon Apr 22 12:29:51 2013 +0100
3833 Allow operation on SH4 CPUs and remove compiler warnings.
3835 Simplify the GET_UNALIGNED_W macro and use it in all cases instead of making it
3836 conditional on CPU types. This missed some CPUs that needed it (e.g. SH4), and
3837 in any case the implementation caused "dereferencing type-punned pointer will
3838 break strict-aliasing rules" warnings.
3840 Enable extra warnings, but disable signed comparison and missing field
3841 initializer warnings as these are not helpful.
3843 Update write_boot_label() so that the boot_sector_16 and boot_sector cases are
3844 handled separately instead of using an aliased pointer, as that causes
3845 "dereferencing type-punned pointer will break strict-aliasing rules" warnings.
3847 Make date_dos2unix(), usage() and cdiv() static functions as they are only used
3848 in the files in which they are declared.
3850 Update bad_name() and lfn_get() so that the extension is processed separately
3851 instead of by indexing past the end of the name field as that causes "array
3852 subscript is above array bounds" warnings.
3854 Update the dosfsck() main function to avoid a warning that free_clusters may
3855 be used uninitialized. Do not print the final count of files and clusters when
3856 dosfsck is run with the "-b" option because the used files and clusters have
3857 not been counted in this case.
3859 Alter the setup_tables() function so that it does not cause an "array subscript
3860 is below array bounds" warning.
3862 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3865 Author: James Byrne <jbyrne@aminocom.com>
3866 Date: Mon Apr 22 13:32:01 2013 +0100
3868 Add a .gitignore file.
3870 Add a .gitignore file so that the results of compilation do not appear as
3873 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3876 Author: James Byrne <jbyrne@aminocom.com>
3877 Date: Mon Apr 22 12:38:52 2013 +0100
3879 Finish cleanup of byteswap code.
3881 Commit 9ba8992 left three references to the old CT_LE_W macro.
3882 Remove these since no conversion was needed as the value being
3885 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3888 Author: Daniel Baumann <mail@daniel-baumann.ch>
3889 Date: Thu Apr 4 08:08:00 2013 +0200
3891 Shortening links to upstream homepage.
3893 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3896 Author: Cristian Rodríguez <crrodriguez@opensuse.org>
3897 Date: Fri Mar 1 08:23:34 2013 +0100
3899 Fix offsetof definition.
3901 * include stddef.h to get the correct offsetof definition.
3902 * remove local offsetof definition, systems not having it on stddef.h
3903 are in violation of C89, C99, POSIX.1-2001.
3905 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3908 Author: Cristian Rodríguez <crrodriguez@opensuse.org>
3909 Date: Fri Mar 1 08:58:36 2013 +0100
3911 Cleanup byteswap code.
3913 Remove all duplicate macro definitions for byteswapping routines
3914 and replace them for proper usage of userspace endian(3).
3916 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3918 commit 8733e12 (tag: v3.0.16)
3919 Author: Daniel Baumann <mail@daniel-baumann.ch>
3920 Date: Wed May 29 10:06:01 2013 +0200
3922 Releasing version 3.0.16.
3924 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3927 Author: Petr Gajdos <pgajdos@suse.cz>
3928 Date: Fri Mar 1 08:34:12 2013 +0100
3930 Create rootdir entry volume label with mkdosfs, create it when
3931 it doesn't exist with dosfslabel.
3933 See https://bugzilla.novell.com/show_bug.cgi?id=657011#c4
3934 for more information.
3936 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3939 Author: Petr Gajdos <pgajdos@suse.cz>
3940 Date: Fri Mar 1 08:33:18 2013 +0100
3942 Forbid lowercase letters in label.
3944 See https://bugzilla.novell.com/show_bug.cgi?id=657011#c4 and
3945 http://support.microsoft.com/kb/71715/en-us for more information.
3947 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3950 Author: Petr Gajdos <pgajdos@suse.cz>
3951 Date: Fri Mar 1 08:32:02 2013 +0100
3953 Read label also from rootdir entry.
3955 See https://bugzilla.novell.com/show_bug.cgi?id=657011#c4
3956 for more information.
3958 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3961 Author: Petr Gajdos <pgajdos@suse.cz>
3962 Date: Fri Mar 1 08:30:21 2013 +0100
3964 alloc_rootdir_entry() is intended to be called with pattern == "FSCK%04dREC",
3965 the old code (probably c&p from auto_rename()) doesn't reflect this.
3967 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3970 Author: Petr Gajdos <pgajdos@suse.cz>
3971 Date: Fri Mar 1 08:29:00 2013 +0100
3973 Instead of eleven blanks, fill in "NO NAME " as specification tells.
3975 See https://bugzilla.novell.com/show_bug.cgi?id=657011#c4 and
3976 http://www.win.tue.nl/~aeb/linux/fs/fat/fat-1.html for more information.
3978 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3981 Author: Petr Gajdos <pgajdos@suse.cz>
3982 Date: Fri Mar 1 08:58:15 2013 +0100
3984 Write uppercase letters in label.
3986 See https://bugzilla.novell.com/show_bug.cgi?id=657011#c4 and
3987 http://support.microsoft.com/kb/71715/en-us for more information.
3989 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3991 commit a75fb1c (tag: v3.0.15)
3992 Author: Daniel Baumann <mail@daniel-baumann.ch>
3993 Date: Thu Feb 21 15:06:52 2013 +0100
3995 Releasing version 3.0.15.
3997 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4000 Author: Alexander Korolkov <alexander.korolkov@gmail.com>
4001 Date: Mon Feb 4 00:22:34 2013 +0400
4003 Using wcstombs() to convert LFN unicode characters to printable text.
4005 This closes Debian bug #596336.
4007 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4010 Author: Alexander Korolkov <alexander.korolkov@gmail.com>
4011 Date: Sun Sep 5 18:59:47 2010 +0400
4013 Recode short filenames from DOS codepage (default 437).
4015 Recode short filenames from DOS codepage (default 437) to the current
4016 character encoding. This makes messages of dosfsck more readable.
4017 Partially closes Debian bug #596336.
4019 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4022 Author: Jaroslav Skarvada <jskarvad@redhat.com>
4023 Date: Thu Feb 21 14:40:52 2013 +0100
4025 Fixing root directory allocation.
4027 See https://bugzilla.redhat.com/show_bug.cgi?id=674095 for more information.
4029 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4032 Author: Jaroslav Skarvada <jskarvad@redhat.com>
4033 Date: Thu Feb 21 14:40:25 2013 +0100
4035 Fixing device detection.
4037 See https://bugzilla.redhat.com/show_bug.cgi?id=710480 for more information.
4039 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4041 commit 7a75638 (tag: v3.0.14)
4042 Author: Daniel Baumann <mail@daniel-baumann.ch>
4043 Date: Wed Jan 23 13:22:01 2013 +0100
4045 Releasing version 3.0.14.
4047 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4050 Author: Daniel Baumann <mail@daniel-baumann.ch>
4051 Date: Wed Jan 23 13:16:20 2013 +0100
4053 Documenting dosfsck -b in its manpage.
4055 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4058 Author: Oleksij Rempel <bug-track@fisher-privat.net>
4059 Date: Wed Jan 23 12:36:56 2013 +0100
4061 Adding option for bootsector read-only check.
4063 Most boot sectors may contains marker for filesystem state. We can this
4064 bit on every mount and warn user if some thing wrong, without checking
4065 complete filesystem.
4067 Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
4068 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4071 Author: Oleksij Rempel <bug-track@fisher-privat.net>
4072 Date: Wed Jan 23 12:35:13 2013 +0100
4074 Checking boot sector for dirty bit.
4076 Some OSos use reseved byte of boot sector to set state of the file
4077 system. If first bit set, then filesystem is proably damaged - write
4078 operation was not finished/cache not snycted/...
4080 Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
4081 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4084 Author: Daniel Baumann <mail@daniel-baumann.ch>
4085 Date: Wed Jan 23 12:25:59 2013 +0100
4087 Completing and updating all copyright headers for 2013.
4089 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4092 Author: Daniel Baumann <mail@daniel-baumann.ch>
4093 Date: Wed Jan 23 12:17:20 2013 +0100
4095 Updating my email address.
4097 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4099 commit 13cdb4d (tag: v3.0.13)
4100 Author: Daniel Baumann <mail@daniel-baumann.ch>
4101 Date: Sat Jun 30 19:10:44 2012 +0200
4103 Releasing version 3.0.13.
4105 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4108 Author: Jaroslav Škarvada <jskarvad@redhat.com>
4109 Date: Sat Jun 30 19:09:11 2012 +0200
4111 Fix 'dosfslabel throws "Seek to 114116076544:Invalid argument" error when labeling'.
4113 See https://bugzilla.redhat.com/show_bug.cgi?id=693662 for more information.
4115 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4117 commit e243612 (tag: v3.0.12)
4118 Author: Daniel Baumann <mail@daniel-baumann.ch>
4119 Date: Sat Oct 29 08:40:53 2011 +0200
4121 Releasing version 3.0.12.
4123 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4126 Author: Michael Casadevall <mcasadevall@ubuntu.com>
4127 Date: Tue Jun 7 19:19:30 2011 +0200
4129 Correcting miscalculation of sector number in some cases.
4131 mkdosfs will incorrectly calculate the number of sectors of a
4132 given FAT partition if the number sectors are odd due to
4133 count_blocks incorrectly handling the remainder of a division
4134 operation. This miscalculation causes the OMAP4 bootloader to
4137 This bug can be observed by comparing the total sector size in
4138 fdisk expert more to fsck.msdos; this discrepancy only shows up
4139 when the number of sectors are odd.
4141 See https://bugs.launchpad.net/ubuntu/+source/dosfstools/+bug/794043
4142 for more information.
4144 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4147 Author: Daniel Baumann <mail@daniel-baumann.ch>
4148 Date: Sat Jan 8 23:38:59 2011 +0100
4152 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4155 Author: Sergey Gusarov <laborer2008@gmail.com>
4156 Date: Sat Jan 8 23:36:11 2011 +0100
4158 Fixing compiler warnings related to the mismatch of types "char *" / "unsigned
4161 These warnings appear when you compile the project with the option "-Wall", what
4162 is done with the current default Makefile.
4164 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4167 Author: Jaroslav Skarvada <jskarvad@redhat.com>
4168 Date: Thu Jan 6 22:35:00 2011 +0100
4170 Fixing overflow bug in reclaim_file function, see
4171 https://bugzilla.redhat.com/show_bug.cgi?id=660154 for more information.
4173 The problem is that alloc_rootdir_entry counts with 10000 files at max, but the
4174 filename buffer is only 8 chars long. Due to pattern mask used it results to
4175 only 10 files at max (FSCK0-9REC). If there is more than 10 files, it overflows
4178 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4181 Author: Sergey Gusarov <laborer2008@gmail.com>
4182 Date: Thu Jan 6 22:31:39 2011 +0100
4184 Fixing conversion specifiers in accordance with the type of expressions.
4186 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4189 Author: Daniel Baumann <mail@daniel-baumann.ch>
4190 Date: Sun Jan 2 15:41:44 2011 +0100
4192 Indenting source files.
4194 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4197 Author: Daniel Baumann <mail@daniel-baumann.ch>
4198 Date: Sun Jan 2 15:39:03 2011 +0100
4200 Adding Nindent script from syslinux.
4202 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4204 commit 66d55cd (tag: v3.0.11)
4205 Author: Daniel Baumann <mail@daniel-baumann.ch>
4206 Date: Fri Dec 24 17:58:29 2010 +0100
4208 Releasing version 3.0.11.
4210 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4213 Author: Michael Stapelberg <michael@stapelberg.de>
4214 Date: Fri Nov 19 14:09:36 2010 +0100
4216 Add better error message when the device cannot be opened.
4218 This is helpful for SD cards or other removable media which have an enabled
4219 write lock -- without the "Permission denied" message, the user has to strace
4220 mkdosfs to find out what's going on.
4222 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4225 Author: Jaroslav Skarvada <jskarvad@redhat.com>
4226 Date: Fri Oct 8 13:38:16 2010 +0200
4228 Unalign on s390x, see http://bugzilla.redhat.com/show_bug.cgi?id=624596 for
4231 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4233 commit 5ef7f1f (tag: v3.0.10)
4234 Author: Daniel Baumann <mail@daniel-baumann.ch>
4235 Date: Sun Sep 12 09:35:47 2010 +0200
4237 Releasing version 3.0.10.
4239 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4242 Author: Alexander Korolkov <alexander.korolkov@gmail.com>
4243 Date: Sun Sep 12 09:29:12 2010 +0200
4245 Modify LFN direntries when file is renamed or deleted, see
4248 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4251 Author: Alexander Korolkov <alexander.korolkov@gmail.com>
4252 Date: Sun Sep 12 09:27:07 2010 +0200
4254 If the test of short filename fails, dosfsck could complain about
4255 bad long filename, see Debian bug #596327.
4257 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4260 Author: Alexander Korolkov <alexander.korolkov@gmail.com>
4261 Date: Sun Sep 12 09:24:47 2010 +0200
4263 dosfsck: don't complain about bad filenames when short filename
4264 contains 7 or more characters with codes 128-255, see Debian
4267 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4270 Author: Mitch Rybczynski <mrybczynski@miovision.com>
4271 Date: Mon Jul 5 14:45:54 2010 +0200
4273 Adding __arm__ define check for some crosscompile toolchains.
4275 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4278 Author: Daniel Baumann <mail@daniel-baumann.ch>
4279 Date: Sun Mar 14 16:42:32 2010 +0100
4281 Modernizing dosfslabel manpage.
4283 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4286 Author: Daniel Baumann <mail@daniel-baumann.ch>
4287 Date: Sun Mar 14 16:33:47 2010 +0100
4289 Modernizing dosfsck manpage.
4291 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4294 Author: Daniel Baumann <mail@daniel-baumann.ch>
4295 Date: Sun Mar 14 16:05:32 2010 +0100
4297 Fixing spelling error in boot.c.
4299 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4301 commit 5b6849d (tag: v3.0.9)
4302 Author: Daniel Baumann <mail@daniel-baumann.ch>
4303 Date: Sun Jan 31 08:31:32 2010 +0100
4305 Releasing version 3.0.9.
4307 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4310 Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
4311 Date: Sun Jan 31 00:11:41 2010 -0500
4313 Be sure to store the updated reserved_sector count in the boot sector,
4314 see Debian bug #567337.
4316 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4318 commit 2a3bef8 (tag: v3.0.8)
4319 Author: Daniel Baumann <mail@daniel-baumann.ch>
4320 Date: Sat Jan 23 10:16:18 2010 +0100
4322 Releasing version 3.0.8.
4324 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4327 Author: Daniel Baumann <mail@daniel-baumann.ch>
4328 Date: Sat Jan 23 10:15:01 2010 +0100
4330 Removing some cruft in end-comments.
4332 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4335 Author: Steven J. Magnani <steve@digidescorp.com>
4336 Date: Thu Jan 21 16:58:11 2010 +0100
4338 When compiling a 32-bit version of dosfstools on an x86_64 machine,
4339 the resulting applications report strange errors on "large" (> 2 GiB)
4342 Seek to -2118967808:Invalid argument
4344 Warning: Filesystem is FAT32 according to fat_length and fat32_length fields,
4345 but has only 8613 clusters, less than the required minimum of 65525.
4346 This may lead to problems on some systems.
4348 This appears to be due to compilation with a 32-bit off_t and lseek() library
4351 Use lseek64 for positioning, and change some suspect uses of off_t to loff_t.
4353 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4356 Author: Steven J. Magnani <steve@digidescorp.com>
4357 Date: Thu Jan 21 16:56:26 2010 +0100
4359 If dosfsck is run in read-only mode (-n), exit with code 0
4360 if the only issue found is an uninitialized free cluster summary.
4362 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4365 Author: Steven J. Magnani <steve@digidescorp.com>
4366 Date: Thu Jan 21 16:55:30 2010 +0100
4368 On x86_64, dosfsck incorrectly claims that a free_cluster summary of
4369 0xFFFFFFFF, defined by Microsoft to be "uninitialized," is wrong.
4371 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4374 Author: H. Peter Anvin <hpa@zytor.com>
4375 Date: Fri Jan 8 09:16:38 2010 +0100
4377 mkdosfs: correct alignment of the root directory.
4379 Correct the code to align the root directory; it was broken before
4380 since bs.dir_entries had already been set at the point of alignment.
4381 This patch removes the dual use of bs.dir_entries and root_dir_entries
4382 to carry the same information: the information is carried in
4383 root_dir_entires exclusively, and then bs.dir_entries is set inside
4384 setup_tables() at a late point.
4386 The code to align the root directory is also wrapped in
4387 if (align_structures); this avoids rounding the number of root
4388 directory entries up to a whole sector when used with -a
4389 (i.e. preserves the previous behavior.)
4391 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4394 Author: H. Peter Anvin <hpa@zytor.com>
4395 Date: Wed Jan 6 20:55:36 2010 +0100
4397 mkdosfs: improve wording in the man page for the -a option.
4399 Improve the English language used in the man page for the -a (no
4400 align) option to mkdosfs.
4402 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4405 Author: Daniel Baumann <mail@daniel-baumann.ch>
4406 Date: Wed Jan 6 11:27:25 2010 +0100
4408 Adding reference to dosfslable in mkdosfs manpage.
4410 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4413 Author: H. Peter Anvin <hpa@zytor.com>
4414 Date: Wed Jan 6 11:18:55 2010 +0100
4416 mkdosfs: by default align all structures to cluster boundaries
4418 Align all data structures (reserved sectors, FATs, root directory for
4419 FAT12/16) to an even multiple of the cluster size. This means that if
4420 the partition is aligned, so will all clusters be. This adds
4421 significant performance for anything where the physical sector size is
4422 larger than the logical sector size, e.g. flash media or large-sector
4425 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4427 commit 171bc07 (tag: v3.0.7)
4428 Author: Daniel Baumann <mail@daniel-baumann.ch>
4429 Date: Thu Dec 24 10:53:36 2009 +0100
4431 Releasing version 3.0.7.
4433 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4436 Author: Ben Hutchings <ben@decadent.org.uk>
4437 Date: Thu Dec 24 09:55:52 2009 +0100
4439 Fixing dosfslabel to set volume label in the right place,
4440 see Debian bug #559985.
4442 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4445 Author: Lubomir Rintel <lkundrak@v3.sk>
4446 Date: Thu Dec 24 09:39:39 2009 +0100
4448 Fixing out-of bound writes.
4450 Firstly, packed attribute is added to the structure so that extension
4451 is guarranteed to immediately follow name for the cross-name-extension
4454 Secondly, writes into dir_entry->name that span through the extension as
4455 well are split into two, so that FORTIFY_SOURCE's bound checking does
4456 not abort dosfsck. There also was an off-by-one error in auto_rename()'s
4459 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4462 Author: San Mehat <san@google.com>
4463 Date: Thu Dec 24 09:31:41 2009 +0100
4465 Adding custom exit code in dosfsck for the case where the FS is read only.
4467 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4469 commit 0657e01 (tag: v3.0.6)
4470 Author: Daniel Baumann <mail@daniel-baumann.ch>
4471 Date: Sun Oct 4 10:59:33 2009 +0200
4473 Releasing version 3.0.6.
4475 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4478 Author: Steven J. Magnani <steve@digidescorp.com>
4479 Date: Sun Oct 4 10:58:43 2009 +0200
4481 Attempt to improve clarity of the orphan cluster reclaim code.
4482 Minor optimization - remove some unnecessary checking.
4484 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4487 Author: Steven J. Magnani <steve@digidescorp.com>
4488 Date: Sun Oct 4 08:37:19 2009 +0200
4490 Close hole that permitted clusters to link to (invalid) cluster 1.
4492 If an orphan chain that linked to cluster 1 was reclaimed to a file,
4493 deletion of the file would result in a filesystem panic.
4495 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4498 Author: Steven J. Magnani <steve@digidescorp.com>
4499 Date: Sun Oct 4 08:32:30 2009 +0200
4501 Fix erroneous report of huge number of clusters in use on big-endian
4502 systems when the FSINFO free cluster count is reset.
4504 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4506 commit 16ba63f (tag: v3.0.5)
4507 Author: Daniel Baumann <mail@daniel-baumann.ch>
4508 Date: Mon Jul 27 14:26:11 2009 +0200
4510 Releasing version 3.0.5.
4512 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4515 Author: Piotr Kaczuba <pepe@attika.ath.cx>
4516 Date: Sun Jul 26 22:21:25 2009 +0200
4518 Signed/unsigned char mismatch in check.c causes false positives
4519 in bad_name() and can result in data loss, see Debian bug #538758.
4521 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4524 Author: Andrew Tridgell <tridge@samba.org>
4525 Date: Sun Jul 26 22:12:06 2009 +0200
4527 Update to new kernel patches that add FAT_NO_83NAME flag.
4529 See http://lkml.org/lkml/2009/7/20/425 and
4530 http://lkml.org/lkml/2009/7/20/424 for more information.
4532 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4534 commit dd0f0b5 (tag: v3.0.4)
4535 Author: Daniel Baumann <mail@daniel-baumann.ch>
4536 Date: Tue Jul 21 08:10:52 2009 +0200
4538 Releasing version 3.0.4.
4540 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4543 Author: Andrew Tridgell <tridge@samba.org>
4544 Date: Tue Jul 21 07:59:22 2009 +0200
4546 Modify dosfstools to support the dummy 8.3 short filename values
4547 used by Linux systems with the VFAT_FS_DUALNAMES option disabled.
4549 See http://lkml.org/lkml/2009/6/26/313 and
4550 http://lkml.org/lkml/2009/6/26/314 for more information.
4552 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4555 Author: Paul Rupe <prupe@nc.rr.com>
4556 Date: Tue May 19 10:37:52 2009 +0200
4558 Fixing "Too many files need repair" error during fsck.
4560 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4562 commit 7c16098 (tag: v3.0.3)
4563 Author: Daniel Baumann <mail@daniel-baumann.ch>
4564 Date: Mon May 18 15:12:04 2009 +0200
4566 Releasing version 3.0.3.
4568 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4571 Author: Daniel Baumann <mail@daniel-baumann.ch>
4572 Date: Mon May 18 15:10:55 2009 +0200
4574 Also declaring arm as an unaligned architecture, see Debian bug #502961.
4576 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4579 Author: Steven J. Magnani <steve@digidescorp.com>
4580 Date: Mon May 18 15:01:49 2009 +0200
4582 Adding support for limited-memory embedded systems.
4584 This patch reorganizes heap memory usage by dosfsck and mkdosfs
4585 to support limited-memory embedded systems - in particular, those
4586 based on Xilinx's Microblaze processor. It also adds a few comments.
4588 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4591 Author: Mike Frysinger <vapier@gentoo.org>
4592 Date: Thu Mar 5 07:03:36 2009 +0100
4594 Declaring Blackfin as an unaligned architecture.
4596 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4598 commit b54a8a4 (tag: v3.0.2)
4599 Author: Daniel Baumann <mail@daniel-baumann.ch>
4600 Date: Sat Feb 28 09:48:04 2009 +0100
4602 Releasing version 3.0.2.
4604 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4607 Author: Hiroaki Ishizawa <hiroaki.ishizawa@gmail.com>
4608 Date: Fri Feb 13 10:00:46 2009 +0100
4610 dosfsck corrupts root directory when fs->nfats is 1.
4612 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4615 Author: Stepan Kasal <skasal@redhat.com>
4616 Date: Fri Jan 30 14:56:33 2009 +0100
4618 src/dosfslabel.c (main): After writing the label, exit code should be 0.
4620 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4623 Author: Daniel Baumann <mail@daniel-baumann.ch>
4624 Date: Fri Jan 30 14:06:01 2009 +0100
4626 Also installing ChangeLog in install-doc target of Makefile.
4628 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4631 Author: Stepan Kasal <skasal@redhat.com>
4632 Date: Fri Jan 30 14:05:12 2009 +0100
4634 Makefile: Do not clobber time stamps of doc files.
4636 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4638 commit df2d2f1 (tag: v3.0.1)
4639 Author: Daniel Baumann <mail@daniel-baumann.ch>
4640 Date: Sun Nov 23 22:45:45 2008 +0100
4642 Releasing version 3.0.1.
4644 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4647 Author: Daniel Baumann <mail@daniel-baumann.ch>
4648 Date: Sun Nov 23 18:41:01 2008 +0100
4650 Applying Fedoras dosfstools-vfat-timingfix.diff from Bill Nottingham
4651 <notting@redhat.com> to fix vfat timing issue. See
4652 https://bugzilla.redhat.com/show_bug.cgi?id=448247 for more information.
4654 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4657 Author: Ulrich Mueller <ulm@gentoo.org>
4658 Date: Tue Oct 7 07:55:37 2008 +0200
4660 Patch to check for bad number of clusters in dosfsck:
4662 * FAT16 filesystems with 65525 clusters or more will be rejected
4663 (Before, this was not tested for. Up to 65535 clusters were accepted
4666 * For FAT32 filesystems with less than 65525 a warning message will be
4669 Macro MSDOS_FAT12 is now replaced by FAT12_THRESHOLD to make it
4670 consistent with the definition in mkdosfs and to remove the dependency
4671 on the kernel version.
4673 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4676 Author: Dann Frazier <dannf@hp.com>
4677 Date: Tue Sep 30 07:25:19 2008 +0200
4679 Changing some wording to make the indended meaning of "full-disk device"
4682 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4684 commit 21e9ba0 (tag: v3.0.0)
4685 Author: Daniel Baumann <mail@daniel-baumann.ch>
4686 Date: Sun Sep 28 11:43:19 2008 +0200
4688 Releasing version 3.0.0.
4690 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4693 Author: Daniel Baumann <mail@daniel-baumann.ch>
4694 Date: Sun Sep 28 11:29:01 2008 +0200
4696 Adding GPL headers to all files.
4698 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4701 Author: Daniel Baumann <mail@daniel-baumann.ch>
4702 Date: Sun Sep 28 10:51:55 2008 +0200
4704 Adding new GPL license file.
4706 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4709 Author: Daniel Baumann <mail@daniel-baumann.ch>
4710 Date: Fri Sep 26 23:31:12 2008 +0200
4712 Redoing Makefile from scratch.
4714 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4717 Author: Daniel Baumann <mail@daniel-baumann.ch>
4718 Date: Sat Sep 27 00:17:38 2008 +0200
4720 Removing whitespaces in all files at EOL and EOF.
4722 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4725 Author: Daniel Baumann <mail@daniel-baumann.ch>
4726 Date: Fri Sep 26 23:48:56 2008 +0200
4728 Adding Debians dosfslabel.8 manpage from Francois Wendling
4729 <frwendling@free.fr>.
4731 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4734 Author: Daniel Baumann <mail@daniel-baumann.ch>
4735 Date: Fri Sep 26 18:36:04 2008 +0200
4737 Updating version.h includes to new location of version.h file.
4739 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4742 Author: Daniel Baumann <mail@daniel-baumann.ch>
4743 Date: Fri Sep 26 18:19:36 2008 +0200
4745 Removing old lsm file.
4747 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4750 Author: Daniel Baumann <mail@daniel-baumann.ch>
4751 Date: Fri Sep 26 18:07:47 2008 +0200
4753 Removing old cvsignore files.
4755 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4758 Author: Daniel Baumann <mail@daniel-baumann.ch>
4759 Date: Fri Sep 26 18:18:39 2008 +0200
4761 Removing old build file.
4763 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4766 Author: Daniel Baumann <mail@daniel-baumann.ch>
4767 Date: Fri Sep 26 18:19:16 2008 +0200
4769 Removing old GPL license files.
4771 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4774 Author: Daniel Baumann <mail@daniel-baumann.ch>
4775 Date: Fri Sep 26 18:21:57 2008 +0200
4777 Unifying dosfsck and mkdosfs Makefiles in common src/Makefile.
4779 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4782 Author: Daniel Baumann <mail@daniel-baumann.ch>
4783 Date: Fri Sep 26 18:04:02 2008 +0200
4785 Unifying dosfsck and mkdosfs sources in common src directory.
4787 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4790 Author: Daniel Baumann <mail@daniel-baumann.ch>
4791 Date: Fri Sep 26 18:05:27 2008 +0200
4793 Unifying dosfsck and mkdosfs manpages in common man directory.
4795 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4798 Author: Daniel Baumann <mail@daniel-baumann.ch>
4799 Date: Fri Sep 26 18:12:29 2008 +0200
4801 Unifying dosfsck and mkdosfs documents in common doc directory.
4803 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4806 Author: Daniel Baumann <mail@daniel-baumann.ch>
4807 Date: Fri Sep 26 15:39:51 2008 +0200
4809 Applying Gentoos dosfstools-2.11-preen.patch from Roy Marples
4810 <uberlord@gentoo.org> to alias dosfsck -p to -a:
4812 * Map -p to -a for baselayout-2, #177514.
4814 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4817 Author: Daniel Baumann <mail@daniel-baumann.ch>
4818 Date: Fri Sep 26 15:49:43 2008 +0200
4820 Applying Gentoos dosfstools-2.11-build.patch from Mike Frysinger
4821 <vapier@gentoo.org> to improve Makefile:
4823 * Respect user settings #157785/#157786 by Diego Petteno.
4825 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4828 Author: Daniel Baumann <mail@daniel-baumann.ch>
4829 Date: Fri Sep 26 15:37:34 2008 +0200
4831 Applying Gentoos dosfstools-2.11-verify-double-count-fix.patch from
4832 Robin H. Johnson <robbat2@gentoo.org> to fix double count of files
4833 during verification:
4835 * Don't double-count n_files during a verification pass.
4836 Bugzilla: http://bugs.gentoo.org/show_bug.cgi?id=99845
4838 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4841 Author: Daniel Baumann <mail@daniel-baumann.ch>
4842 Date: Fri Sep 26 15:33:36 2008 +0200
4844 Applying Gentoos dosfstools-2.11-fat32size.patch from Mike Frysinger
4845 <vapier@gentoo.org> to fix generation of filesystems on 256meg devices:
4847 * Fix generation of FAT filesystems on devices that are 256meg in size
4848 Patch by Ulrich Mueller and accepted upstream
4849 http://bugs.gentoo.org/112504
4851 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4854 Author: Daniel Baumann <mail@daniel-baumann.ch>
4855 Date: Fri Sep 26 15:22:06 2008 +0200
4857 Applying Suses dosfstools-2.11-unsupported-sector-size.patch from Petr
4858 Gajdos <pgajdos@suse.cz> to add sector size warning:
4860 * added warning for creation msdos on filesystem with sector size
4861 greater than 4096 [fate#303325]
4863 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4866 Author: Daniel Baumann <mail@daniel-baumann.ch>
4867 Date: Fri Sep 26 15:18:35 2008 +0200
4869 Applying Suses dosfstools-2.11-mkdosfs-geo0.diff from Ludwig Nussel
4870 <lnussel@suse.de> to fix handling of zero heads and sectors:
4872 * the HDIO_GETGEO ioctl works on device mapper devices but returns
4873 zero heads and sectors. Therefore let's a) assume dummy values in
4874 that case in mkdosfs and b) don't consider such fat file systems as
4875 invalid in dosfsck. The Linux kernel accepts them anyways.
4877 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4880 Author: Daniel Baumann <mail@daniel-baumann.ch>
4881 Date: Fri Sep 26 15:15:40 2008 +0200
4883 Applying Suses dosfstools-2.11-linuxfs.patch from Ruediger Oertel
4884 <ro@suse.de> to not include linux/fs.h.
4886 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4889 Author: Daniel Baumann <mail@daniel-baumann.ch>
4890 Date: Fri Sep 26 15:11:50 2008 +0200
4892 Applying Fedoras dosfstools-2.11-assumeKernel26.patch from Peter Vrabec
4893 <pvrabec@redhat.com> to remove linux 2.6 conditionals:
4895 * LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) does not work with
4896 glibc-kernheaders-2.4-9.1.94
4898 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4901 Author: Daniel Baumann <mail@daniel-baumann.ch>
4902 Date: Fri Sep 26 15:05:00 2008 +0200
4904 Applying Debians 99-conglomeration.dpatch (no other information
4907 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4910 Author: Daniel Baumann <mail@daniel-baumann.ch>
4911 Date: Fri Sep 26 14:26:41 2008 +0200
4913 Applying Debians 15-manpage-files.dpatch from Daniel Baumann
4914 <daniel@debian.org> to improve dosfsck manpage:
4916 * Lists fsckNNNN.rec files in FILES section (Closes: #444596).
4918 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4921 Author: Daniel Baumann <mail@daniel-baumann.ch>
4922 Date: Fri Sep 26 14:34:42 2008 +0200
4924 Applying Debians 13-getopt.dpatch from Adonikam Virgo
4925 <adonikam@virgonet.org> to fix mkdosfs getopt:
4927 * Fixes backup sector getopt (Closes: #232387, #479794).
4929 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4932 Author: Daniel Baumann <mail@daniel-baumann.ch>
4933 Date: Fri Sep 26 14:34:17 2008 +0200
4935 Applying Debians 12-zero-slot.dpatch by Karl Tomlinson
4936 <karlt@karlt.net> to fix dosfsck zero slot crashes:
4938 * Fixes crashes due to zero slot numbers causing a negative offset in
4939 the call to copy_lfn_part in lfn_add_slot. On amd64 this results in
4940 a SIGSEGV in copy_lfn_part. On x86 the result is heap corruption and
4941 thus sometimes a SIGSEGV or double free abort later. (Closes:
4942 #152550, #353198, #356377, #401798).
4944 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4947 Author: Daniel Baumann <mail@daniel-baumann.ch>
4948 Date: Fri Sep 26 14:33:54 2008 +0200
4950 Applying Debians 11-memory-efficiency.dpatch from Eero Tamminen
4951 <eero.tamminen@nokia.com> to improve dosfsck memory efficiency:
4953 * Improves memory efficiency when checking filesystems.
4955 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4958 Author: Daniel Baumann <mail@daniel-baumann.ch>
4959 Date: Fri Sep 26 14:33:28 2008 +0200
4961 Applying Debians 10-manpage-synopsis.dpatch from Daniel Baumann
4962 <daniel@debian.org> to fix manpage synopsis:
4964 * List alternative binary names in manpage synopsis (Closes: #284983).
4966 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4969 Author: Daniel Baumann <mail@daniel-baumann.ch>
4970 Date: Fri Sep 26 14:32:46 2008 +0200
4972 Applying Debians 09-manpage-fat32.dpatch from Daniel Baumann
4973 <daniel@debian.org> to improve mkdosfs manpage:
4975 * Don't claim that FAT32 is not choosed automatically (Closes:
4978 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4981 Author: Daniel Baumann <mail@daniel-baumann.ch>
4982 Date: Fri Sep 26 14:32:23 2008 +0200
4984 Applying Debians 08-manpage-drop.dpatch from Daniel Baumann
4985 <daniel@debian.org> to improve dosfsck manpage:
4987 * Don't use confusing word 'drop' when 'delete' is meant (Closes:
4990 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4993 Author: Daniel Baumann <mail@daniel-baumann.ch>
4994 Date: Fri Sep 26 14:31:50 2008 +0200
4996 Applying Debians 07-manpage-spelling.dpatch from Justin Pryzby
4997 <justinpryzby@users.sourceforge.net> to fix mkdosfs manpage typos.
4999 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5002 Author: Daniel Baumann <mail@daniel-baumann.ch>
5003 Date: Fri Sep 26 14:30:31 2008 +0200
5005 Applying Suses dosfstools-2.11_determine-sector-size.patch from Petr
5006 Gajdos <pgajdos@suse.cz> to determine mkdosfs sector size automatically:
5008 * determine sector size of device automatically or if -S parameter
5009 present, verify, that it's not under physical sector size
5011 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5014 Author: Daniel Baumann <mail@daniel-baumann.ch>
5015 Date: Fri Sep 26 14:30:03 2008 +0200
5017 Applying Suses dosfstools-2.11-o_excl.patch from Pavol Rusnak
5018 <prusnak@suse.cz> to use O_EXCL in mkdosfs:
5020 * mkdosfs now opens device with O_EXCL [#238687]
5022 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5025 Author: Daniel Baumann <mail@daniel-baumann.ch>
5026 Date: Fri Sep 26 14:29:36 2008 +0200
5028 Applying Debians 04-unaligned-memory.dpatch from Khalid Aziz
5029 <khalid_aziz@hp.com> to fix dosfsck unaligned memory accesses:
5031 * Fix unaligned memory accesses which cause warnings to appear
5032 everytime the elilo bootloader script runs. This has led a number of
5033 users to believe their install has failed (Closes: #258839).
5035 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5038 Author: Daniel Baumann <mail@daniel-baumann.ch>
5039 Date: Fri Sep 26 13:47:40 2008 +0200
5041 Applying Fedoras dosfstools-2.11-label.patch from Jeremy Katz
5042 <katzj@redhat.com> to add dosfslabel (originally by Peter Jones).
5044 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5047 Author: Daniel Baumann <mail@daniel-baumann.ch>
5048 Date: Fri Sep 26 13:41:14 2008 +0200
5050 Applying Fedoras dosfstools-2.11-fortify.patch from Jakub Jelinek
5051 <jakub@redhat.com> to make it build with -D_FORTIFY_SOURCE=2:
5053 * This violates -D_FORTIFY_SOURCE=2 (which is stricter than C
5054 standard), but isn't actually any buffer overflow. But using memcpy
5055 is more efficient anyway.
5057 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5060 Author: Daniel Baumann <mail@daniel-baumann.ch>
5061 Date: Fri Sep 26 13:40:47 2008 +0200
5063 Applying Fedoras dosfstools-2.7-argfix.patch (no other information
5066 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5068 commit ba6774a (tag: v2.11)
5069 Author: Daniel Baumann <mail@daniel-baumann.ch>
5070 Date: Thu Jun 26 12:45:36 2008 +0200
5072 Adding version 2.11.
5074 Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>