Add macro make_build in spec file
[platform/upstream/dosfstools.git] / ChangeLog
1 commit eb9111e
2 Author: Pali Rohár <pali.rohar@gmail.com>
3 Date:   Sun Jan 31 13:26:03 2021 +0100
4
5     Add missing files into distribution tarball
6
7 commit 52518ae
8 Author: Pali Rohár <pali.rohar@gmail.com>
9 Date:   Sun Jan 31 03:03:39 2021 +0100
10
11     mkfs.fat: Read geom_start from sysfs
12     
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.
17
18 commit ed2062b
19 Author: Pali Rohár <pali.rohar@gmail.com>
20 Date:   Fri Jan 29 16:40:56 2021 +0100
21
22     Autogenerate release date in manpages
23
24 commit fca589b
25 Author: Pali Rohár <pali.rohar@gmail.com>
26 Date:   Fri Jan 29 16:40:20 2021 +0100
27
28     Update (C) and maintainers
29
30 commit c251412
31 Author: Pali Rohár <pali.rohar@gmail.com>
32 Date:   Fri Jan 29 16:33:41 2021 +0100
33
34     Add TODO comments for checking integer overflow
35
36 commit 73003cd
37 Author: Pali Rohár <pali.rohar@gmail.com>
38 Date:   Sat Jan 19 13:28:45 2019 +0100
39
40     Replace uint64_t type by unsigned long long type
41
42 commit c56ef3d
43 Author: Pali Rohár <pali.rohar@gmail.com>
44 Date:   Sat Jan 19 13:22:05 2019 +0100
45
46     Remove useless casting to uint64_t or long long in check_file()
47     
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.
50
51 commit 2e597d6
52 Author: Pali Rohár <pali.rohar@gmail.com>
53 Date:   Sat Jan 19 13:20:16 2019 +0100
54
55     Check that file size is not larger than maximal possible size
56
57 commit 53d04ff
58 Author: Pali Rohár <pali.rohar@gmail.com>
59 Date:   Sat Jan 19 13:15:25 2019 +0100
60
61     Change fat_size type from off_t to unsigned int
62     
63     Value in fat_size is result of multiplication of two 16bit unsigned values,
64     therefore it fits into unsigned int.
65
66 commit 2f6d8cf
67 Author: Pali Rohár <pali.rohar@gmail.com>
68 Date:   Fri Jan 29 02:10:58 2021 +0100
69
70     testsuite: Add reference images of fsck result tests
71     
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.
75
76 commit 5265c64
77 Author: Pali Rohár <pali.rohar@gmail.com>
78 Date:   Fri Jan 29 02:10:22 2021 +0100
79
80     testsuite: Add fsck tests for fat labels
81
82 commit 2260f80
83 Author: Pali Rohár <pali.rohar@gmail.com>
84 Date:   Sun Jan 3 23:22:42 2021 +0100
85
86     fsck.fat: Check and fix label
87     
88     Checks the volume label from the root directory entry that is valid and
89     matches the label stored in boot sector.
90     
91     Add new command line option -U which consider lowercase volume label as
92     invalid and allows only uppercase labels. By default lowercase volume
93     labels are allowed.
94
95 commit 77c3de9
96 Author: Pali Rohár <pali.rohar@gmail.com>
97 Date:   Tue Jan 14 00:58:21 2020 +0100
98
99     Simplify usage of validate_volume_label() function
100     
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.
104
105 commit f89b42d
106 Author: Pali Rohár <pali.rohar@gmail.com>
107 Date:   Sun Aug 19 18:54:07 2018 +0200
108
109     Update warning message about lowercase labels
110     
111     They are working fine on MS-DOS and Windows systems.
112
113 commit 5bbae89
114 Author: Pali Rohár <pali.rohar@gmail.com>
115 Date:   Wed Aug 15 16:35:48 2018 +0200
116
117     charconv: Add functions for converting DOS strings to locale independent wchar_t strings
118     
119     Use iconv library for it. And as a fallback use internal cp850_table.
120
121 commit 3a3c1d3
122 Author: Pali Rohár <pali.rohar@gmail.com>
123 Date:   Thu Jan 28 10:39:36 2021 +0100
124
125     testsuite: Update mkfs-fat32_2_res_sects.xxd test as it is now not aligned due to -a
126
127 commit 289fa53
128 Author: Pali Rohár <pali.rohar@gmail.com>
129 Date:   Wed Jan 27 02:03:39 2021 +0100
130
131     manpages: End every sentence by a newline
132
133 commit 61390f3
134 Author: Pali Rohár <pali.rohar@gmail.com>
135 Date:   Wed Jan 27 02:01:48 2021 +0100
136
137     mkfs.fat: Do not align number of sectors when -a was specified
138
139 commit 7deb97d
140 Author: Pali Rohár <pali.rohar@gmail.com>
141 Date:   Wed Jan 27 02:00:33 2021 +0100
142
143     mkfs.fat: Document that -r and -R specify minimal number (and not exact)
144
145 commit 4e06c33
146 Author: Pali Rohár <pali.rohar@gmail.com>
147 Date:   Wed Jan 27 01:58:38 2021 +0100
148
149     fsck: Move check_dirty_bits() from boot.c to check.c
150
151 commit 738ee98
152 Author: Pali Rohár <pali.rohar@gmail.com>
153 Date:   Sun Jan 17 16:15:41 2021 +0100
154
155     fatlabel: Print warnings on stderr
156     
157     Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=803391
158
159 commit e62e52c
160 Author: Pali Rohár <pali.rohar@gmail.com>
161 Date:   Sun Jan 17 19:45:26 2021 +0100
162
163     fatlabel: Do not call parts of fsck repair procedure
164     
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.
167     
168     fsck.fat uses Repair mode and fatlabel either Read-only or Read-write
169     (which depends on fatlabel operation).
170     
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.
174     
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.
177     
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.
180
181 commit b8c8531
182 Author: Pali Rohár <pali.rohar@gmail.com>
183 Date:   Sun Jan 17 22:47:18 2021 +0100
184
185     testsuite: Add tests for DOS Clean Shutdown bit
186
187 commit 82c2111
188 Author: Pali Rohár <pali.rohar@gmail.com>
189 Date:   Sun Jan 17 20:20:39 2021 +0100
190
191     testsuite: Add fsck tests with broken first FAT cluster
192     
193     Extend also test-fsck script to read additional arguments from .args file.
194
195 commit 82e9730
196 Author: Pali Rohár <pali.rohar@gmail.com>
197 Date:   Sun Jan 17 19:34:10 2021 +0100
198
199     fsck.fat: Add code for fixing first FAT cluster
200     
201     This patch tries to fix infamous fsck.fat error:
202     
203         Both FATs appear to be corrupt. Giving up.
204     
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
207     tool.
208     
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).
214
215 commit e579a7d
216 Author: Pali Rohár <pali.rohar@gmail.com>
217 Date:   Sat Nov 17 01:12:52 2018 +0100
218
219     mkfs.fat: Allow to specify disk geometry via new -g option
220
221 commit 9443732
222 Author: Pali Rohár <pali.rohar@gmail.com>
223 Date:   Fri Jan 8 11:49:27 2021 +0100
224
225     testsuite: Add mkfs test for 600MB large 4K disk
226
227 commit 3300839
228 Author: Pali Rohár <pali.rohar@gmail.com>
229 Date:   Sun Oct 14 16:19:51 2018 +0200
230
231     mkfs.fat: Do not show verbose messages not relevant to selected FAT size
232
233 commit 43f0c4e
234 Author: Pali Rohár <pali.rohar@gmail.com>
235 Date:   Fri Aug 17 14:26:30 2018 +0200
236
237     mkfs.fat: Fix text of verbose messages
238
239 commit c01f78b
240 Author: Pali Rohár <pali.rohar@gmail.com>
241 Date:   Tue Aug 14 15:48:50 2018 +0200
242
243     mkfs.fat: Fix limits for number of clusters
244     
245     According to Microsoft FAT specification (fatgen103.doc) disk with at least
246     4085 clusters and less then 65525 clusters is FAT16.
247     
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.
252     
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.
256     
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
260     to zero.
261
262 commit 404ead8
263 Author: Pali Rohár <pali.rohar@gmail.com>
264 Date:   Sat Aug 11 20:34:08 2018 +0200
265
266     mkfs.fat: Fix calculation of FAT32 cluster size on non 512 bytes sector disks
267     
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.
271
272 commit e6d2fc7
273 Author: Pali Rohár <pali.rohar@gmail.com>
274 Date:   Wed Aug 15 15:11:30 2018 +0200
275
276     mkfs.fat: Fix printing number of sectors
277     
278     It is unsigned 32bit number therefore use %u format.
279
280 commit b29eb5b
281 Author: Pali Rohár <pali.rohar@gmail.com>
282 Date:   Wed Aug 15 15:15:06 2018 +0200
283
284     mkfs.fat: Align total number of sectors to be multiple of sectors per track
285     
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
288     filesystem.
289
290 commit 8c81232
291 Author: Pali Rohár <pali.rohar@gmail.com>
292 Date:   Sun Jan 10 22:29:48 2021 +0100
293
294     testsuite: Add referenceFAT32mbr test data to dist_check_DATA
295
296 commit 468aad7
297 Author: Pali Rohár <pali.rohar@gmail.com>
298 Date:   Sun Jan 10 22:16:49 2021 +0100
299
300     manpages: Escape dot in fsck.fat manpage at the beginning of the line
301
302 commit 9069ba0
303 Author: felix <felix.von.s@posteo.de>
304 Date:   Mon Apr 2 22:43:46 2018 +0200
305
306     fsck.fat: properly check for valid "." and ".." entries
307     
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.
314     
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.
320     
321     Additionally, subdirs() and check_file() were modified not to check
322     unused directory entries.
323     
324     Additionally-fixed-by: Dave Odell <dmo2118@gmail.com>
325
326 commit 512141a
327 Author: C. Masloch <pushbx@ulukai.org>
328 Date:   Sat Oct 24 13:53:08 2020 +0200
329
330     fsck.fat: preserve info sector reserved fields
331     
332     This allows the FSIBOOT stage of lDOS boot32.asm to remain
333     in the FSINFO sector even when the info entries are reset.
334     
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.
338     
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:
342     
343     > [Name] FSI_Reserved1
344     >
345     > [Offset (byte)] 4
346     >
347     > [Size (bytes)] 480
348     >
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.
352     
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
355     this space.
356     
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.
361     
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
365     the FSINFO entries.
366     
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.
369     
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].
379     
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.
387     
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.
396     
397     [1]:
398     https://github.com/FDOS/kernel/blob/6e42bb6d7c6dd304f738cf0d7a2db719598f1b9e/hdr/device.h#L325
399     [2]:
400     https://github.com/FDOS/kernel/blob/6e42bb6d7c6dd304f738cf0d7a2db719598f1b9e/kernel/fattab.c#L116
401     [3]:
402     https://github.com/torvalds/linux/blob/7cf726a59435301046250c42131554d9ccc566b8/include/uapi/linux/msdos_fs.h#L163
403     [4]:
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
410
411 commit 201665c
412 Author: Pali Rohár <pali.rohar@gmail.com>
413 Date:   Sun Feb 16 12:33:32 2020 +0100
414
415     mkfs.fat: Update --help for -h (hidden sectors)
416
417 commit 25da96e
418 Author: Pali Rohár <pali.rohar@gmail.com>
419 Date:   Sun Feb 16 12:22:04 2020 +0100
420
421     mkfs.fat: Relax -D option (BIOS drive number)
422     
423     Allow to specify also second hard disk (0x81) or second floppy device
424     (0x01) as -D option = BIOS drive number.
425
426 commit bce0940
427 Author: Pali Rohár <pali.rohar@gmail.com>
428 Date:   Sun Feb 17 18:59:54 2019 +0100
429
430     manpages: Update mkfs.fat manpage about FAT32 backup boot sector
431
432 commit da36707
433 Author: Pali Rohár <pali.rohar@gmail.com>
434 Date:   Sun Feb 17 11:48:32 2019 +0100
435
436     mkfs.fat: Write FAT32 backup info sector after FAT32 backup boot sector
437     
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.
440
441 commit 5b61d9f
442 Author: Pali Rohár <pali.rohar@gmail.com>
443 Date:   Sun Feb 17 11:01:15 2019 +0100
444
445     testsuite: Run fsck test step always even if mkfs test step fails
446     
447     fsck test step can show more details about badly created image by mkfs.
448
449 commit 53bfa1f
450 Author: Pali Rohár <pali.rohar@gmail.com>
451 Date:   Sun Feb 17 10:56:06 2019 +0100
452
453     testsuite: Add test for mkfs.fat with two FAT32 sectors in reserved area
454
455 commit 3cca83a
456 Author: Pali Rohár <pali.rohar@gmail.com>
457 Date:   Sun Feb 17 10:36:33 2019 +0100
458
459     mkfs.fat: Fix setting location of FAT32 backup boot sector
460     
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
464     media mandatory.
465     
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.
469     
470     Also allow user to specify zero for -b option which disable creating of
471     FAT32 backup boot sector.
472
473 commit c5e35e7
474 Author: Pali Rohár <pali.rohar@gmail.com>
475 Date:   Sun Feb 17 10:34:24 2019 +0100
476
477     mkfs.fat: Put FAT32 info sector number into variable
478     
479     Also check that it is not same as backup boot sector value.
480
481 commit d276ddb
482 Author: Pali Rohár <pali.rohar@gmail.com>
483 Date:   Sun Feb 17 10:32:08 2019 +0100
484
485     mkfs.fat: Rename info_sector buffer variable to info_sector_buffer
486     
487     Also call free() unconditionally as it does nothing for NULL argument.
488
489 commit 5e936c9
490 Author: Pali Rohár <pali.rohar@gmail.com>
491 Date:   Sat Nov 24 19:45:39 2018 +0100
492
493     mkfs.fat: Remove dependency on systemd/udev
494     
495     There is no need that mkfs.fat depends on systemd. It uses it only for
496     reading additional information about block device.
497     
498     This patch replace systemd/udev dependency code by reading those additional
499     information about block device directly from sysfs.
500     
501     So no functionality of mkfs.fat is lost or removed.
502
503 commit 18a05e7
504 Author: Pali Rohár <pali.rohar@gmail.com>
505 Date:   Sun Jan 5 00:58:41 2020 +0100
506
507     manpages: Fix '. SF' file names
508
509 commit 7e6d7d3
510 Author: Pali Rohár <pali.rohar@gmail.com>
511 Date:   Sat Nov 24 18:18:53 2018 +0100
512
513     manpages: Fix switching to previous font style
514     
515     In troff manpage language previous font style is selected by "\fP"
516     sequence, not by "\fR". "\fR" selects roman font style.
517
518 commit ffa5dfa
519 Author: Pali Rohár <pali.rohar@gmail.com>
520 Date:   Sun Nov 18 21:14:24 2018 +0100
521
522     manpages: Fix formatting of bullets
523     
524     In troff manpage language bullet is written as "\(bu".
525
526 commit bc65dd6
527 Author: Pali Rohár <pali.rohar@gmail.com>
528 Date:   Sun Nov 18 21:10:29 2018 +0100
529
530     manpages: Fix formatting of emphases
531     
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
535     wrong.
536     
537     Also arguments and file names should be formatted in italic.
538
539 commit 0273989
540 Author: Pali Rohár <pali.rohar@gmail.com>
541 Date:   Sun Nov 18 21:01:55 2018 +0100
542
543     manpages: Fix formatting of hyphens, en and em dashes
544     
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".
547
548 commit c85c863
549 Author: Pali Rohár <pali.rohar@gmail.com>
550 Date:   Sun Oct 21 12:58:19 2018 +0200
551
552     manpages: Clarify unit of BLOCK-COUNT
553     
554     BLOCK-COUNT is always in KiB unit independently of the disk sector size,
555     FAT sector size or FAT cluster size.
556
557 commit 69fcfe5
558 Author: Pali Rohár <pali.rohar@gmail.com>
559 Date:   Sun Aug 19 16:35:22 2018 +0200
560
561     fsck.fat: Check for DOS Clean Shutdown bit
562     
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.
566
567 commit 68e8e54
568 Author: Pali Rohár <pali.rohar@gmail.com>
569 Date:   Sat Jan 4 14:53:28 2020 +0100
570
571     mkfs.fat: Calculate CHS geometry according to SD Card Part 2 File System Specification
572     
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.
575     
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.
579
580 commit 5199d68
581 Author: Pali Rohár <pali.rohar@gmail.com>
582 Date:   Sun Aug 19 09:57:41 2018 +0200
583
584     mkfs.fat: Add a new option --mbr which fills MBR table with one partition
585     
586     It is needed only for non-removable disks used on Microsoft Windows systems
587     and only when formatting whole unpartitioned disk.
588     
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.
592     
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).
599     
600     Similar thing is doing mformat (FAT12/16/32 formatting tool) from mtools
601     project or mkudffs (UDF formatting tool) from udftools project.
602
603 commit 9f856b7
604 Author: Pali Rohár <pali.rohar@gmail.com>
605 Date:   Mon Jan 27 22:12:38 2020 +0100
606
607     charconv: Do not use %lc format modifier for wide char which cannot be converted to multibyte string
608
609 commit 032ec02
610 Author: Pali Rohár <pali.rohar@gmail.com>
611 Date:   Tue Jan 14 00:27:31 2020 +0100
612
613     charconv: Fix usage of iconv() for state-dependent encodings
614     
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.
617
618 commit 4428d7d
619 Author: Pali Rohár <pali.rohar@gmail.com>
620 Date:   Mon Jan 13 23:15:22 2020 +0100
621
622     charconv: Fix checks for overlong input strings
623
624 commit 2779d70
625 Author: Pali Rohár <pali.rohar@gmail.com>
626 Date:   Wed Jan 8 01:03:24 2020 +0100
627
628     charconv: Use ICONV_CONST macro to fix compile warnings with GNU libiconv
629     
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.
633
634 commit 565d7a2
635 Author: Pali Rohár <pali.rohar@gmail.com>
636 Date:   Wed Jan 8 01:02:16 2020 +0100
637
638     charconv: Fix check for return value of iconv
639     
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.
643
644 commit e9b42f5
645 Author: Pali Rohár <pali.rohar@gmail.com>
646 Date:   Wed Jan 8 00:44:27 2020 +0100
647
648     charconv: Increase buffer size for output strings in current locale
649     
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.
652
653 commit 1403c53
654 Author: Pali Rohár <pali.rohar@gmail.com>
655 Date:   Wed Jan 8 00:42:35 2020 +0100
656
657     charconv: Fix buffer overflows by specifying output buffer size
658
659 commit 917846b
660 Author: Pali Rohár <pali.rohar@gmail.com>
661 Date:   Tue Jan 7 00:54:15 2020 +0100
662
663     charconv: Fix put_char() function
664     
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.
668
669 commit 6dc68a8
670 Author: Pali Rohár <pali.rohar@gmail.com>
671 Date:   Tue Jan 7 00:52:43 2020 +0100
672
673     charconv: Fix comment for init_conversion() function
674
675 commit 2d6c37d
676 Author: Pali Rohár <pali.rohar@gmail.com>
677 Date:   Tue Jan 7 00:52:25 2020 +0100
678
679     charconv: For internal CP850 conversion add translit table
680     
681     This CP850 translit table was created by iconv ASCII//TRANSLIT as a 7bit ASCII fallback.
682
683 commit 3ccfe29
684 Author: Pali Rohár <pali.rohar@gmail.com>
685 Date:   Tue Jan 7 00:50:09 2020 +0100
686
687     charconv: As a fallback try to use also non-translit iconv conversion
688
689 commit 1b72fdf
690 Author: Pali Rohár <pali.rohar@gmail.com>
691 Date:   Mon Jan 6 18:30:28 2020 +0100
692
693     charconv: Use const for input strings
694
695 commit 102aa76
696 Author: Pali Rohár <pali.rohar@gmail.com>
697 Date:   Mon Jan 6 18:29:30 2020 +0100
698
699     charconv: Rename third argument of local_string_to_dos_string()
700     
701     Correct name is out_size as it is size of output buffer and not length of string.
702
703 commit 49cc12a
704 Author: Lennart Poettering <lennart@poettering.net>
705 Date:   Mon Aug 3 12:17:12 2020 +0200
706
707     mkfs: fsync() the block device before exiting
708     
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.
712     
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
715     do too.)
716
717 commit cc75143
718 Author: Pali Rohár <pali.rohar@gmail.com>
719 Date:   Mon Jan 27 22:22:35 2020 +0100
720
721     mkfs.fat: Mark struct fat32_fsinfo as packed
722
723 commit f8f455b
724 Author: Pali Rohár <pali.rohar@gmail.com>
725 Date:   Mon Jan 27 22:25:20 2020 +0100
726
727     fatlabel: Update documentation about DOS codepage
728
729 commit 3ce32fa
730 Author: Pali Rohár <pali.rohar@gmail.com>
731 Date:   Sat Jan 4 15:27:59 2020 +0100
732
733     mkfs.fat: Clarify licensing of the dummy boot sector
734     
735     Original author H. Peter Anvin allowed to put mkfs.fat boot sector code
736     into the public domain.
737
738 commit 8dc8976
739 Author: Pali Rohár <pali.rohar@gmail.com>
740 Date:   Fri Feb 14 00:00:27 2020 +0100
741
742     manpages: Update documentation about hidden sectors
743     
744     Fixes #29
745
746 commit 17be357
747 Author: David Gumberg <davidzgumberg@gmail.com>
748 Date:   Sun Oct 13 18:21:57 2019 -0600
749
750     Get cross-platform libc6 generically
751
752 commit 5e2529e
753 Author: Pali Rohár <pali.rohar@gmail.com>
754 Date:   Mon Oct 14 12:21:36 2019 +0200
755
756     travis: use if ... fi construction
757     
758     As single test command has side effect in return value for Travis.
759
760 commit 20092b8
761 Author: Pali Rohár <pali.rohar@gmail.com>
762 Date:   Mon Oct 14 12:14:07 2019 +0200
763
764     travis: Check for fatlabel test errors only for non-static builds
765     
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.
769
770 commit a4a0d62
771 Author: Pali Rohár <pali.rohar@gmail.com>
772 Date:   Mon Oct 14 09:48:43 2019 +0200
773
774     tests: Check for stderr errors from fatlabel tests
775
776 commit 84a8d1c
777 Author: Pali Rohár <pali.rohar@gmail.com>
778 Date:   Sun Jun 23 12:01:48 2019 +0200
779
780     charconv: Update Travis configuration
781     
782     Use autogen.sh instead of non-working autoreconf and test also
783     static linked versions and configurations without iconv.
784
785 commit b657ede
786 Author: Pali Rohár <pali.rohar@gmail.com>
787 Date:   Sun Jun 23 10:47:44 2019 +0200
788
789     charconv: Add autogen.sh script
790     
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.
793     
794     See reported bug:
795     https://lists.gnu.org/archive/html/bug-gettext/2011-10/msg00012.html
796
797 commit 0dec6a7
798 Author: Pali Rohár <pali.rohar@gmail.com>
799 Date:   Sat Jun 22 22:14:31 2019 +0200
800
801     charconv: Fix sources for testdevinfo target
802     
803     testdevinfo does not use any of charconv functions, nor any of mkfs
804     functions. So do not link charconv/mkfs into testdevinfo.
805     
806     This fixes linking problems when iconv functions are not present in
807     standard libraries.
808
809 commit 664192e
810 Author: Pali Rohár <pali.rohar@gmail.com>
811 Date:   Sat Jun 22 01:23:54 2019 +0200
812
813     charconv: Check return value of all set_dos_codepage() calls
814
815 commit 6d49a1f
816 Author: Pali Rohár <pali.rohar@gmail.com>
817 Date:   Sat Jun 22 01:16:44 2019 +0200
818
819     charconv: Check presence of iconv
820     
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
823     library.
824     
825     To force compilation of dosfstools without iconv support there is a new
826     configure option --without-iconv.
827
828 commit fa9761f
829 Author: Pali Rohár <pali.rohar@gmail.com>
830 Date:   Sat Jun 22 01:14:37 2019 +0200
831
832     charconv: Fix return value from iconv_init_codepage function
833
834 commit d74c592
835 Author: Pali Rohár <pali.rohar@gmail.com>
836 Date:   Sat Jun 22 01:12:46 2019 +0200
837
838     charconv: Add fallback to internal CP850 table
839     
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.
844
845 commit 91978a2
846 Author: Michael Forney <mforney@mforney.org>
847 Date:   Fri Jun 7 08:48:13 2019 -0700
848
849     Use static inline function instead of statement expression
850
851 commit e06e759
852 Author: Pali Rohár <pali.rohar@gmail.com>
853 Date:   Wed Jun 5 09:25:52 2019 +0200
854
855     Fix Travis CI configuration for powerpc and arm
856
857 commit fc55b63
858 Author: Noé Rubinstein <nrubinstein@aldebaran.com>
859 Date:   Mon Aug 31 15:19:57 2015 +0200
860
861     mkfs: document --offset in the man page
862
863 commit f473459
864 Author: Noé Rubinstein <nrubinstein@aldebaran.com>
865 Date:   Thu Jul 2 15:49:06 2015 +0200
866
867     Allow specifying an offset in the device file in mkfs
868
869 commit 93b4288
870 Author: Tobias Stoeckmann <stoeckmann@users.noreply.github.com>
871 Date:   Sun Feb 24 20:55:15 2019 +0100
872
873     Fix out of boundary read in fsck.fat/fatlabel
874     
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.
876
877 commit af3e50d
878 Author: Pali Rohár <pali.rohar@gmail.com>
879 Date:   Sun Aug 12 12:15:45 2018 +0200
880
881     device_info: Fix parsing partition number
882     
883     Ensures that it is always valid number which does not overflow or
884     underflow.
885
886 commit 086e13c
887 Author: Pali Rohár <pali.rohar@gmail.com>
888 Date:   Sun Aug 12 12:15:21 2018 +0200
889
890     mkfs.fat: Fix parsing of block number
891     
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
894     into type.
895
896 commit a2b97c9
897 Author: Pali Rohár <pali.rohar@gmail.com>
898 Date:   Sun Aug 12 12:13:35 2018 +0200
899
900     mkfs.fat: Fix validation of numeric command line arguments
901     
902     Ensures that argument is always valid number which does not overflow or
903     underflow.
904
905 commit 07e63ac
906 Author: Pali Rohár <pali.rohar@gmail.com>
907 Date:   Sun Aug 12 11:56:32 2018 +0200
908
909     mkfs.fat: Fix validation of volume ID
910     
911     Use same logic as in fatlabel.
912
913 commit 425a415
914 Author: Pali Rohár <pali.rohar@gmail.com>
915 Date:   Sat Aug 11 22:49:37 2018 +0200
916
917     fatlabel: Fix validation of volume ID
918     
919     Standard C function strtoull() does not signal underflow, therefore it
920     cannot be used for conversion of arbitrary string to integer with detection
921     of failure.
922     
923     Instead use function strtoll() and detect underflow (negative value)
924     manually.
925     
926     Note that strto* functions skips and ignores leading whitespace characters,
927     so detects them manually via standard C function isspace().
928
929 commit da07aa4
930 Author: Pali Rohár <pali.rohar@gmail.com>
931 Date:   Sat Jan 19 09:48:25 2019 +0100
932
933     Update Travis configuration
934     
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
940
941 commit a6ec69d
942 Author: Tobias Stoeckmann <tobias@stoeckmann.org>
943 Date:   Mon Jan 14 22:47:40 2019 +0100
944
945     Renamed len to out_size.
946     
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.
950     
951     Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
952
953 commit 6080fe2
954 Author: Tobias Stoeckmann <tobias@stoeckmann.org>
955 Date:   Mon Jan 14 19:36:11 2019 +0100
956
957     Fixed off-by-one in local_string_to_dos_string.
958     
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:
962     
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 ...
969     
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
972     index to store '\0':
973     
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.
976     
977     Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
978
979 commit 332fc29
980 Author: Pali Rohár <pali.rohar@gmail.com>
981 Date:   Sun Nov 18 20:47:29 2018 +0100
982
983     Fix memory leaks in read_fat() function
984     
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.
988     
989     This patch fixes memory leaks in fsck.fat and fatlabel tools.
990     
991     Fixes #13
992
993 commit 4cfd643
994 Author: Pali Rohár <pali.rohar@gmail.com>
995 Date:   Sat Sep 29 10:08:12 2018 +0200
996
997     mkfs.fat: Fix endianity for hidden_sectors
998     
999     Global variable hidden_sectors is in host byte order.
1000
1001 commit a874650
1002 Author: Pali Rohár <pali.rohar@gmail.com>
1003 Date:   Tue Aug 14 21:13:52 2018 +0200
1004
1005     mkfs.fat: Add some workaround for Year 2038 Bug
1006     
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.
1009     
1010     For generating volume id, add fallback code based on rand() function.
1011
1012 commit 607fbed
1013 Author: Pali Rohár <pali.rohar@gmail.com>
1014 Date:   Tue Aug 14 20:57:27 2018 +0200
1015
1016     fsck.fat: Fix Year 2038 Bug
1017     
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.
1021
1022 commit fb0cc0d
1023 Author: Andreas Bombe <aeb@debian.org>
1024 Date:   Tue Aug 14 12:58:58 2018 +0200
1025
1026     Fix gcc sprintf() length warnings
1027     
1028     There are two sprintf() calls that receive warnings from current
1029     versions of gcc for possibly overrunning the temporary buffers they're
1030     writing into.
1031     
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.
1036     
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.
1042
1043 commit ca54953
1044 Author: Pali Rohár <pali.rohar@gmail.com>
1045 Date:   Mon May 7 09:27:16 2018 +0200
1046
1047     mkfs.fat: Add support for --codepage option for label and validate it
1048
1049 commit 40da1b2
1050 Author: Pali Rohár <pali.rohar@gmail.com>
1051 Date:   Mon May 7 09:26:42 2018 +0200
1052
1053     fatlabel: Implement proper checks when setting new label
1054     
1055     According to Microsoft FAT specification "fatgen103.doc" there are
1056     following restrictions for FAT label stored in root directory:
1057     
1058     * DIR_Name[0] may not equal 0x20.
1059     
1060     * Lower case characters are not allowed in DIR_Name (what these characters
1061       are is country specific).
1062     
1063     * The following characters are not legal in any bytes of DIR_Name:
1064     
1065       - Values less than 0x20 except for the special case of 0x05 in
1066         DIR_Name[0]
1067     
1068       - 0x22, 0x2A, 0x2B, 0x2C, 0x2E, 0x2F, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F,
1069         0x5B, 0x5C, 0x5D, and 0x7C
1070     
1071     And another Microsoft "FAT32 Spec (SDA Contribution).pdf" describe:
1072     
1073     * DIR_Name[0] cannot equal 0x20 (in other words, names cannot start with a
1074       space character).
1075
1076 commit 4f953bb
1077 Author: Andreas Bombe <aeb@debian.org>
1078 Date:   Mon Jun 11 14:21:17 2018 +0200
1079
1080     Remove long file name when changing short file name
1081     
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.
1085     
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.
1089     
1090     Change so that existing LFNs are removed for files being renamed.
1091
1092 commit b356cf0
1093 Author: Andreas Bombe <aeb@debian.org>
1094 Date:   Mon Jun 11 14:17:03 2018 +0200
1095
1096     Print error message when auto_rename() is called on FAT32 root directory
1097     
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
1100     ignoring.
1101
1102 commit 8c4122e
1103 Author: felix <felix.von.s@posteo.de>
1104 Date:   Mon Jun 11 04:35:35 2018 +0200
1105
1106     Fix allowing changes in SFNs reporting bogus error on FAT32 root directory
1107     
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.
1113     
1114     Fix by checking for the root directory in bad_name().
1115
1116 commit 96e6efd
1117 Author: Andreas Bombe <aeb@debian.org>
1118 Date:   Sun Jun 10 03:09:14 2018 +0200
1119
1120     fsck: Fix -S option not being recognized
1121     
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.
1124
1125 commit 4d01db7
1126 Author: felix <felix.von.s@posteo.de>
1127 Date:   Mon Apr 2 10:20:10 2018 +0200
1128
1129     fsck.fat: Allow spaces in the middle of SFNs
1130     
1131     Also, introduce an -S option (mostly) restoring previous behaviour.
1132
1133 commit c74ca0c
1134 Author: Pali Rohár <pali.rohar@gmail.com>
1135 Date:   Wed Mar 7 18:00:15 2018 +0100
1136
1137     manpages: Add section DOS CODEPAGES to fatlabel
1138     
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
1141     
1142     And filtered by codepages supported by GNU libiconv.
1143
1144 commit b665a93
1145 Author: Pali Rohár <pali.rohar@gmail.com>
1146 Date:   Wed Mar 7 17:59:50 2018 +0100
1147
1148     fatlabel: Add support for --codepage option
1149     
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.
1154     
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).
1158
1159 commit 76c0362
1160 Author: Pali Rohár <pali.rohar@gmail.com>
1161 Date:   Wed Mar 7 17:58:05 2018 +0100
1162
1163     fsck.fat: Change default DOS codepage to 850
1164     
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.
1169
1170 commit 18ed349
1171 Author: Pali Rohár <pali.rohar@gmail.com>
1172 Date:   Wed Mar 7 17:57:23 2018 +0100
1173
1174     Initialize iconv "from codepage" with //TRANSLIT
1175     
1176     This would allow to show characters from DOS codepage on systems which
1177     current locale does not support it via transliteration.
1178     
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".
1182
1183 commit 08d743c
1184 Author: Pali Rohár <pali.rohar@gmail.com>
1185 Date:   Wed Mar 7 17:57:13 2018 +0100
1186
1187     Initialize only LC_CTYPE locale
1188     
1189     LC_ALL is not needed as locale is used just for CODESET. LC_CTYPE is enough
1190     for using nl_langinfo(CODESET).
1191
1192 commit 2112913
1193 Author: Pali Rohár <pali.rohar@gmail.com>
1194 Date:   Sun Apr 8 11:37:29 2018 +0200
1195
1196     Add tests for FAT32 labels
1197     
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.
1200     
1201     For more information about test result see email:
1202     https://www.spinics.net/lists/kernel/msg2640891.html
1203
1204 commit bfeedfc
1205 Author: Pali Rohár <pali.rohar@gmail.com>
1206 Date:   Thu Nov 9 21:25:05 2017 +0100
1207
1208     mkfs.fat: Correctly process 0xe5 as first character of directory entry
1209     
1210     Same as commit 51da71aa9edc36fabf83323282f14e7ee71aa07b but for mkfs.fat.
1211
1212 commit 1b866f4
1213 Author: Pali Rohár <pali.rohar@gmail.com>
1214 Date:   Thu Nov 9 21:25:01 2017 +0100
1215
1216     fsck.fat: Handle 0xe5 as first character of directory entry
1217     
1218     Same as commit 51da71aa9edc36fabf83323282f14e7ee71aa07b but for fsck.fat.
1219
1220 commit 5b702a7
1221 Author: Pali Rohár <pali.rohar@gmail.com>
1222 Date:   Thu Nov 30 00:07:39 2017 +0100
1223
1224     manpages: Add section COMPATIBILITY and BUGS to fatlabel
1225
1226 commit 900edb6
1227 Author: Pali Rohár <pali.rohar@gmail.com>
1228 Date:   Thu Nov 30 00:07:22 2017 +0100
1229
1230     fatlabel: Optimize size of the binary
1231     
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.
1234     
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.
1237
1238 commit 0901aa8
1239 Author: Pali Rohár <pali.rohar@gmail.com>
1240 Date:   Thu Nov 30 00:07:05 2017 +0100
1241
1242     fatlabel: Clear ATTR_VOLUME from directory entry when removing label
1243     
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.
1247
1248 commit cb8e674
1249 Author: Pali Rohár <pali.rohar@gmail.com>
1250 Date:   Thu Nov 30 00:06:51 2017 +0100
1251
1252     fatlabel: Print label without padding spaces
1253     
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
1256     padding spaces.
1257
1258 commit d822d5b
1259 Author: Pali Rohár <pali.rohar@gmail.com>
1260 Date:   Thu Nov 30 00:06:36 2017 +0100
1261
1262     fatlabel: Show only label stored in root directory
1263     
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.
1271
1272 commit c598354
1273 Author: Ashe David Sterkehus <ashe.goulding@gmail.com>
1274 Date:   Wed Nov 22 00:20:40 2017 +0900
1275
1276     mkfs: Check volume label given with -n is no longer than 11 characters
1277     
1278     Fixes #70
1279
1280 commit 87a8f29
1281 Author: Will Newton <willn@resin.io>
1282 Date:   Thu Aug 31 10:42:13 2017 +0100
1283
1284     src/check.c: Fix up mtools created bad dir entries
1285     
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.
1290     
1291     mtools patch to fix the original issue:
1292     
1293     https://lists.gnu.org/archive/html/info-mtools/2014-08/msg00000.html
1294     
1295     Signed-off-by: Will Newton <willn@resin.io>
1296
1297 commit fe3ada3
1298 Author: Andreas Bombe <aeb@debian.org>
1299 Date:   Sun Oct 15 16:26:01 2017 +0200
1300
1301     manpages: Remove formatting from NAME sections where it doesn't belong
1302     
1303     The .SH NAME sections are supposed to contain just "name \- description"
1304     with no bolding on the name.
1305     
1306     Signed-off-by: Andreas Bombe <aeb@debian.org>
1307
1308 commit 0d2d2b2
1309 Author: Andreas Bombe <aeb@debian.org>
1310 Date:   Sun Oct 1 15:17:13 2017 +0200
1311
1312     manpages: Clarify rules for volume labels as implemented
1313     
1314     Signed-off-by: Andreas Bombe <aeb@debian.org>
1315
1316 commit 86fa0d8
1317 Author: Andreas Bombe <aeb@debian.org>
1318 Date:   Sun Oct 1 15:16:12 2017 +0200
1319
1320     manpages: Make SEE ALSO sections conform to conventions
1321     
1322     Signed-off-by: Andreas Bombe <aeb@debian.org>
1323
1324 commit 5cdad55
1325 Author: Andreas Bombe <aeb@debian.org>
1326 Date:   Sun Oct 1 03:57:59 2017 +0200
1327
1328     Harmonize unknown command line option handling
1329     
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.
1334     
1335     The default action on getopt_long() return values (neither known option
1336     nor '?') is to report an internal error with the unexpected value.
1337     
1338     Signed-off-by: Andreas Bombe <aeb@debian.org>
1339
1340 commit 34fd8eb
1341 Author: Andreas Bombe <aeb@debian.org>
1342 Date:   Sun Oct 1 03:04:00 2017 +0200
1343
1344     fatlabel: Add new -r, --reset option
1345     
1346     This new option removes the label or generates a new serial number if in
1347     volume ID mode.
1348     
1349     Signed-off-by: Andreas Bombe <aeb@debian.org>
1350
1351 commit e4e346f
1352 Author: Andreas Bombe <aeb@debian.org>
1353 Date:   Sun Oct 1 02:43:03 2017 +0200
1354
1355     fatlabel: Don't access element of argv array that may not exist
1356     
1357     Signed-off-by: Andreas Bombe <aeb@debian.org>
1358
1359 commit 17dea47
1360 Author: Andreas Bombe <aeb@debian.org>
1361 Date:   Sun Oct 1 02:27:31 2017 +0200
1362
1363     Move generation of serial number into new function generate_volume_id()
1364     
1365     Signed-off-by: Andreas Bombe <aeb@debian.org>
1366
1367 commit 07f0238
1368 Author: Andreas Bombe <aeb@debian.org>
1369 Date:   Sun Oct 1 02:17:41 2017 +0200
1370
1371     Add remove_label() function
1372     
1373     Signed-off-by: Andreas Bombe <aeb@debian.org>
1374
1375 commit ce7e7f9
1376 Author: Andreas Bombe <aeb@debian.org>
1377 Date:   Sun Oct 1 01:42:55 2017 +0200
1378
1379     fatlabel: Refuse empty strings as labels
1380     
1381     Signed-off-by: Andreas Bombe <aeb@debian.org>
1382
1383 commit 51da71a
1384 Author: Andreas Bombe <aeb@debian.org>
1385 Date:   Sun Oct 1 01:28:32 2017 +0200
1386
1387     Handle 0xe5 as first character of volume label
1388     
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.
1392     
1393     Signed-off-by: Andreas Bombe <aeb@debian.org>
1394
1395 commit 3a1aac1
1396 Author: Andreas Bombe <aeb@debian.org>
1397 Date:   Sun Oct 1 01:11:05 2017 +0200
1398
1399     Remove leftover handling of split directory entry name
1400     
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.
1405     
1406     Signed-off-by: Andreas Bombe <aeb@debian.org>
1407
1408 commit 04aca69
1409 Author: Andreas Bombe <aeb@debian.org>
1410 Date:   Sun Oct 1 00:54:12 2017 +0200
1411
1412     Terminate volume label search at end of directory
1413     
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.
1417     
1418     Signed-off-by: Andreas Bombe <aeb@debian.org>
1419
1420 commit 747c8f9
1421 Author: Andreas Bombe <aeb@debian.org>
1422 Date:   Sun Oct 1 00:46:05 2017 +0200
1423
1424     Avoid returning deleted directory entries as labels
1425     
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
1429     prevent this.
1430     
1431     Signed-off-by: Andreas Bombe <aeb@debian.org>
1432
1433 commit 0a733d8
1434 Author: Pali Rohár <pali.rohar@gmail.com>
1435 Date:   Wed Jul 5 20:44:00 2017 +0200
1436
1437     fatlabel: Fix erasing label
1438     
1439     Empty label needs to be stored as "NO NAME    ". Like in mkfs treat label
1440     which starts with character 0xE5 as empty.
1441
1442 commit e1397b9
1443 Author: Pali Rohár <pali.rohar@gmail.com>
1444 Date:   Wed Jul 5 20:37:17 2017 +0200
1445
1446     mkfs: Handle -n "" correctly
1447     
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.
1452     
1453     Fixes #54
1454
1455 commit 2afb699
1456 Author: Pali Rohár <pali.rohar@gmail.com>
1457 Date:   Thu Sep 28 10:13:56 2017 +0200
1458
1459     fatlabel: Fix parsing volume ID
1460     
1461     * Do not allow specifying empty argument as volume ID
1462     * Check for errno (as general error) after more specific errors
1463     
1464     Fixes #64
1465
1466 commit 7ddcf9b
1467 Author: Andreas Bombe <aeb@debian.org>
1468 Date:   Mon Sep 25 01:21:23 2017 +0200
1469
1470     fatlabel: Implement volume ID mode
1471     
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.
1476     
1477     Fixes #52
1478     
1479     Signed-off-by: Andreas Bombe <aeb@debian.org>
1480
1481 commit 20a3e0f
1482 Author: Andreas Bombe <aeb@debian.org>
1483 Date:   Mon Sep 25 00:36:33 2017 +0200
1484
1485     Add write_serial() function
1486     
1487     write_serial() works like write_boot_label() but sets the volume ID
1488     instead of the volume label in the boot sector.
1489     
1490     Signed-off-by: Andreas Bombe <aeb@debian.org>
1491
1492 commit d7c9ffa
1493 Author: Andreas Bombe <aeb@debian.org>
1494 Date:   Mon Sep 25 00:07:17 2017 +0200
1495
1496     Make fs_open() path argument const char*
1497     
1498     Signed-off-by: Andreas Bombe <aeb@debian.org>
1499
1500 commit 06c2d11
1501 Author: Andreas Bombe <aeb@debian.org>
1502 Date:   Sun Sep 24 22:32:16 2017 +0200
1503
1504     Read volume ID in read_boot()
1505     
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.
1508     
1509     Signed-off-by: Andreas Bombe <aeb@debian.org>
1510
1511 commit e501243
1512 Author: Andreas Bombe <aeb@debian.org>
1513 Date:   Thu Sep 21 15:20:33 2017 +0200
1514
1515     fatlabel: Expand help message by description and options
1516     
1517     Signed-off-by: Andreas Bombe <aeb@debian.org>
1518
1519 commit 944ffe4
1520 Author: Andreas Bombe <aeb@debian.org>
1521 Date:   Thu Sep 21 15:15:54 2017 +0200
1522
1523     fatlabel: Change option parsing to getopt_long()
1524     
1525     Signed-off-by: Andreas Bombe <aeb@debian.org>
1526
1527 commit 33dd224
1528 Author: Andreas Bombe <aeb@debian.org>
1529 Date:   Sat Aug 5 20:02:04 2017 -0400
1530
1531     Warn that -r is useless with FAT32 filesystems
1532     
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.
1536     
1537     Fixes #43
1538     
1539     Signed-off-by: Andreas Bombe <aeb@debian.org>
1540
1541 commit ed9facf
1542 Author: Jakub Wilk <jwilk@jwilk.net>
1543 Date:   Tue Jul 11 01:01:20 2017 +0200
1544
1545     Fix signed integer overflow in FSTART
1546     
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.
1549     
1550     Signed-off-by: Jakub Wilk <jwilk@jwilk.net>
1551     Signed-off-by: Andreas Bombe <aeb@debian.org>
1552
1553 commit 995d814
1554 Author: Emanuel Czirai <xftroxgpx@gmail.com>
1555 Date:   Fri May 5 22:43:54 2017 +0200
1556
1557     add missing \n
1558     
1559     To fix this:
1560     ```
1561     Starting check/repair pass.
1562     FATs differ but appear to be intact.1) Use first FAT
1563     2) Use second FAT
1564     [12?q]?
1565     ```
1566
1567 commit 9d822ba
1568 Author: Andreas Bombe <aeb@debian.org>
1569 Date:   Thu Jun 29 20:56:03 2017 +0200
1570
1571     mkfs: List all options with short descriptions in --help message
1572     
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'.
1577     
1578     Signed-off-by: Andreas Bombe <aeb@debian.org>
1579
1580 commit 32b3bce
1581 Author: Andreas Bombe <aeb@debian.org>
1582 Date:   Wed Jun 28 15:17:33 2017 +0200
1583
1584     mkfs, fsck: Add --variant=TYPE command line option
1585     
1586     TYPE can be 'standard' or 'atari' (case insensitive) to select the
1587     desired mode rather than having to toggle with -A.
1588     
1589     Signed-off-by: Andreas Bombe <aeb@debian.org>
1590
1591 commit 6fc9004
1592 Author: Andreas Bombe <aeb@debian.org>
1593 Date:   Tue May 30 21:26:44 2017 +0200
1594
1595     manpages: Rework the intro of the mkfs man page
1596     
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.
1599     
1600     Signed-off-by: Andreas Bombe <aeb@debian.org>
1601
1602 commit bbbd077
1603 Author: Andreas Bombe <aeb@debian.org>
1604 Date:   Fri Apr 21 20:47:32 2017 +0200
1605
1606     manpages, configure.ac: Correct description of Atari format selection
1607     
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
1610     reflect that.
1611     
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
1614     configure.ac.
1615     
1616     Signed-off-by: Andreas Bombe <aeb@debian.org>
1617
1618 commit 9fa180c
1619 Author: Andreas Bombe <aeb@debian.org>
1620 Date:   Thu Apr 6 20:47:11 2017 +0200
1621
1622     Disable legacy check for 68k Atari by default
1623     
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.
1627     
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.
1631     
1632     Signed-off-by: Andreas Bombe <aeb@debian.org>
1633
1634 commit d0c8900
1635 Author: Andreas Bombe <aeb@debian.org>
1636 Date:   Wed Apr 5 20:40:33 2017 +0200
1637
1638     Move all three check_atari() and atari_format definitions to common.c
1639     
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
1643     
1644     Signed-off-by: Andreas Bombe <aeb@debian.org>
1645
1646 commit a753734
1647 Author: Andreas Bombe <aeb@debian.org>
1648 Date:   Wed Apr 5 20:29:20 2017 +0200
1649
1650     mkfs: Link with common.c and use its die() implementation
1651     
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.
1655     
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.
1659     
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.
1664     
1665     Signed-off-by: Andreas Bombe <aeb@debian.org>
1666
1667 commit b0d524d
1668 Author: Andreas Bombe <aeb@debian.org>
1669 Date:   Tue Apr 4 20:42:02 2017 +0200
1670
1671     fsck.fat.h: Remove extern declarations of interactive and write_immed
1672     
1673     These two declarations were forgotten when the variables moved to
1674     common.c.
1675     
1676     Signed-off-by: Andreas Bombe <aeb@debian.org>
1677
1678 commit 2af848f
1679 Author: Andreas Bombe <aeb@debian.org>
1680 Date:   Mon Apr 3 20:53:14 2017 +0200
1681
1682     fsck: Switch to getopt_long() option parser and add --help option
1683     
1684     Signed-off-by: Andreas Bombe <aeb@debian.org>
1685
1686 commit c0c3141
1687 Author: Andreas Bombe <aeb@debian.org>
1688 Date:   Mon Apr 3 20:45:20 2017 +0200
1689
1690     fsck: Pass the exit value to use to usage()
1691     
1692     Signed-off-by: Andreas Bombe <aeb@debian.org>
1693
1694 commit 112bdc6
1695 Author: Andreas Bombe <aeb@debian.org>
1696 Date:   Mon Apr 3 20:41:31 2017 +0200
1697
1698     fsck: Clean up usage() message a little
1699     
1700     Bring the usage() help message more in line with common conventions.
1701     
1702     Signed-off-by: Andreas Bombe <aeb@debian.org>
1703
1704 commit 4d2273a
1705 Author: Andreas Bombe <aeb@debian.org>
1706 Date:   Fri Mar 31 14:41:42 2017 +0200
1707
1708     mkfs.fat.c: Change misleading comment about FAT32 selection
1709     
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.
1714     
1715     Signed-off-by: Andreas Bombe <aeb@debian.org>
1716
1717 commit 8585962
1718 Author: Andreas Bombe <aeb@debian.org>
1719 Date:   Fri Mar 24 20:40:12 2017 +0100
1720
1721     fsck: Add quit choice to interactive prompts
1722     
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
1725     confirmation.
1726     
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.
1730     
1731     Signed-off-by: Andreas Bombe <aeb@debian.org>
1732
1733 commit c366076
1734 Author: Andreas Bombe <aeb@debian.org>
1735 Date:   Thu Feb 23 21:00:59 2017 +0100
1736
1737     fsck: Make prompts asking for writing changes at end more verbose and clear
1738     
1739     Signed-off-by: Andreas Bombe <aeb@debian.org>
1740
1741 commit 141b009
1742 Author: Andreas Bombe <aeb@debian.org>
1743 Date:   Wed Feb 22 20:07:25 2017 +0100
1744
1745     fsck: Don't ask whether to perform changes in immediate write mode
1746     
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.
1749     
1750     Signed-off-by: Andreas Bombe <aeb@debian.org>
1751
1752 commit b2cfd70
1753 Author: Andreas Bombe <aeb@debian.org>
1754 Date:   Tue Feb 21 21:36:04 2017 +0100
1755
1756     Remove get_key()
1757     
1758     Signed-off-by: Andreas Bombe <aeb@debian.org>
1759
1760 commit 0c1c5fc
1761 Author: Andreas Bombe <aeb@debian.org>
1762 Date:   Tue Feb 21 21:24:14 2017 +0100
1763
1764     Overhaul interactive prompts
1765     
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).
1772     
1773     Signed-off-by: Andreas Bombe <aeb@debian.org>
1774
1775 commit 91b20bd
1776 Author: Andreas Bombe <aeb@debian.org>
1777 Date:   Tue Feb 21 21:14:43 2017 +0100
1778
1779     Add get_choice() function
1780     
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.
1785     
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
1788     fatlabel.c.
1789     
1790     Signed-off-by: Andreas Bombe <aeb@debian.org>
1791
1792 commit fd92fab
1793 Author: Andreas Bombe <aeb@debian.org>
1794 Date:   Tue Feb 21 14:15:12 2017 +0100
1795
1796     Add get_line() function to read user input in canonical mode
1797     
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.
1802     
1803     Signed-off-by: Andreas Bombe <aeb@debian.org>
1804
1805 commit 0155c9c
1806 Author: Andreas Bombe <aeb@debian.org>
1807 Date:   Mon Feb 20 14:09:43 2017 +0100
1808
1809     Add asprintf() wrapper
1810     
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.
1815     
1816     Signed-off-by: Andreas Bombe <aeb@debian.org>
1817
1818 commit 09769e6
1819 Author: Andreas Bombe <aeb@debian.org>
1820 Date:   Fri Feb 10 14:06:40 2017 +0100
1821
1822     Fix printf format specifier for printing label
1823     
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
1826     termination).
1827     
1828     Signed-off-by: Andreas Bombe <aeb@debian.org>
1829
1830 commit 08cf67b
1831 Author: Andreas Bombe <aeb@debian.org>
1832 Date:   Thu Jan 26 21:31:03 2017 +0100
1833
1834     Turn label in struct DOS_FS into char array from pointer
1835     
1836     Signed-off-by: Andreas Bombe <aeb@debian.org>
1837
1838 commit 32eff6f
1839 Author: Andreas Bombe <aeb@debian.org>
1840 Date:   Thu Jan 26 21:27:19 2017 +0100
1841
1842     Append +git to version number
1843     
1844     Signed-off-by: Andreas Bombe <aeb@debian.org>
1845
1846 commit 820c2f9 (tag: v4.1)
1847 Author: Andreas Bombe <aeb@debian.org>
1848 Date:   Tue Jan 24 13:10:23 2017 +0100
1849
1850     Releasing version 4.1
1851     
1852     Signed-off-by: Andreas Bombe <aeb@debian.org>
1853
1854 commit cad2c17
1855 Author: Andreas Bombe <aeb@debian.org>
1856 Date:   Mon Jan 23 03:10:56 2017 +0100
1857
1858     fatlabel: Make sure printf style patterns in label are not expanded
1859     
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.
1865     
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.
1869     
1870     Change alloc_rootdir_entry() to take an additional argument gen_name and
1871     only expand the name if its value is true.
1872     
1873     Signed-off-by: Andreas Bombe <aeb@debian.org>
1874
1875 commit 77371e2
1876 Author: Andreas Bombe <aeb@debian.org>
1877 Date:   Fri Nov 4 13:10:58 2016 +0100
1878
1879     testsuite: Add missing fsck test files to dist_check_DATA
1880     
1881     Signed-off-by: Andreas Bombe <aeb@debian.org>
1882
1883 commit d6df1d4
1884 Author: Andreas Bombe <aeb@debian.org>
1885 Date:   Thu Nov 3 20:03:25 2016 +0100
1886
1887     testsuite: Test for bad characters in file names
1888     
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
1891     the name.
1892     
1893     Signed-off-by: Andreas Bombe <aeb@debian.org>
1894
1895 commit 307966c
1896 Author: Andreas Bombe <aeb@debian.org>
1897 Date:   Sun Sep 18 00:11:43 2016 +0200
1898
1899     fsck: Fix reporting of length to truncate with shared clusters
1900     
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
1905     confusion.
1906     
1907     Signed-off-by: Andreas Bombe <aeb@debian.org>
1908
1909 commit b33424e
1910 Author: Andreas Bombe <aeb@debian.org>
1911 Date:   Sat Sep 17 23:34:07 2016 +0200
1912
1913     testsuite: Test for files sharing clusters
1914     
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.
1917     
1918     Signed-off-by: Andreas Bombe <aeb@debian.org>
1919
1920 commit db5ec04
1921 Author: Andreas Bombe <aeb@debian.org>
1922 Date:   Sat Sep 17 22:41:07 2016 +0200
1923
1924     testsuite: Run fsck in test-mkfs
1925     
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.
1928     
1929     Signed-off-by: Andreas Bombe <aeb@debian.org>
1930
1931 commit 4ac17ae
1932 Author: Andreas Bombe <aeb@debian.org>
1933 Date:   Sat Sep 17 22:25:06 2016 +0200
1934
1935     Fix FAT32 FSInfo signature checking
1936     
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.
1941     
1942     Signed-off-by: Andreas Bombe <aeb@debian.org>
1943
1944 commit e883d07
1945 Author: Nico Roeser <nico@n1c0.de>
1946 Date:   Fri Sep 16 20:05:08 2016 +0200
1947
1948     mkfs: Bring back ability to set sector size.
1949     
1950     This had accidently been broken when the code was overhauled, resulting
1951     in unconditionally setting the sector size when devinfo detected it.
1952     
1953     Signed-off-by: Andreas Bombe <aeb@debian.org>
1954
1955 commit 4ef83db
1956 Author: Andreas Bombe <aeb@debian.org>
1957 Date:   Fri Sep 16 03:32:12 2016 +0200
1958
1959     Request minimum automake version 1.11 and add workaround for <1.13
1960     
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.
1964     
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.
1969     
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.
1972     
1973     Signed-off-by: Andreas Bombe <aeb@debian.org>
1974
1975 commit 6a8c8b7
1976 Author: Andreas Bombe <aeb@debian.org>
1977 Date:   Fri Sep 16 01:45:17 2016 +0200
1978
1979     Add missing autoreconf step to Travis CI configuration
1980     
1981     Signed-off-by: Andreas Bombe <aeb@debian.org>
1982
1983 commit 54f7aef
1984 Author: Andreas Bombe <aeb@debian.org>
1985 Date:   Fri Sep 16 01:39:08 2016 +0200
1986
1987     Add configuration for the Travis CI build service
1988     
1989     Signed-off-by: Andreas Bombe <aeb@debian.org>
1990
1991 commit 5421752
1992 Author: Andreas Bombe <aeb@debian.org>
1993 Date:   Wed Sep 14 20:37:57 2016 +0200
1994
1995     Check and fix printf style arguments to die() and pdie()
1996     
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
1999     correctness.
2000     
2001     Fix all problematic calls detected by this.
2002     
2003     Signed-off-by: Andreas Bombe <aeb@debian.org>
2004
2005 commit 83e5ec5
2006 Author: Andreas Bombe <aeb@debian.org>
2007 Date:   Wed Sep 14 03:38:08 2016 +0200
2008
2009     Make some implicit integer conversions safer
2010     
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
2015     it up anyway.
2016     
2017     Signed-off-by: Andreas Bombe <aeb@debian.org>
2018
2019 commit ff5e718
2020 Author: Andreas Bombe <aeb@debian.org>
2021 Date:   Tue Sep 13 20:25:34 2016 +0200
2022
2023     mkfs: Remove redundant unreachable warning message
2024     
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.
2029     
2030     Found through the dead code detection of Coverity Scan.
2031     
2032     Signed-off-by: Andreas Bombe <aeb@debian.org>
2033
2034 commit e359a33
2035 Author: Andreas Bombe <aeb@debian.org>
2036 Date:   Tue Sep 13 20:12:21 2016 +0200
2037
2038     Fix octal character parsing in file_cvt()
2039     
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.
2043     
2044     This affected the -u and -d options for fsck.
2045     
2046     Found through the dead code detection of Coverity Scan.
2047     
2048     Signed-off-by: Andreas Bombe <aeb@debian.org>
2049
2050 commit ccd0a9d
2051 Author: Andreas Bombe <aeb@debian.org>
2052 Date:   Mon Sep 12 20:21:53 2016 +0200
2053
2054     testsuite: Test for circular cluster chain
2055     
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.
2058     
2059     Signed-off-by: Andreas Bombe <aeb@debian.org>
2060
2061 commit fab40f8
2062 Author: Andreas Bombe <aeb@debian.org>
2063 Date:   Mon Sep 12 19:51:10 2016 +0200
2064
2065     Fix truncation logic in circular chain check
2066     
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.
2070     
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.
2075     
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.
2081     
2082     Fix by updating these variables unconditionally when -t option is not
2083     given.
2084     
2085     Signed-off-by: Andreas Bombe <aeb@debian.org>
2086
2087 commit 8394ceb
2088 Author: Andreas Bombe <aeb@debian.org>
2089 Date:   Mon Sep 12 14:39:11 2016 +0200
2090
2091     testsuite: Test for too long cluster chain
2092     
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
2095     to it in the FAT.
2096     
2097     Signed-off-by: Andreas Bombe <aeb@debian.org>
2098
2099 commit 7444694
2100 Author: Andreas Bombe <aeb@debian.org>
2101 Date:   Wed Sep 7 21:09:41 2016 +0200
2102
2103     Fix definition and initialization of fsinfo sector
2104     
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.
2110     
2111     Fixes #33.
2112     
2113     Signed-off-by: Andreas Bombe <aeb@debian.org>
2114
2115 commit f78cb68
2116 Author: Andreas Bombe <aeb@debian.org>
2117 Date:   Wed Sep 7 20:45:29 2016 +0200
2118
2119     Add fsck testsuite
2120     
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
2123     entries.
2124     
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
2127     an error.
2128     
2129     Signed-off-by: Andreas Bombe <aeb@debian.org>
2130
2131 commit 7667295
2132 Author: Andreas Bombe <aeb@debian.org>
2133 Date:   Tue May 31 03:32:42 2016 +0200
2134
2135     Add testsuite foundations
2136     
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
2139     references images.
2140     
2141     Signed-off-by: Andreas Bombe <aeb@debian.org>
2142
2143 commit f881195
2144 Author: Andreas Bombe <aeb@debian.org>
2145 Date:   Wed Sep 7 03:48:16 2016 +0200
2146
2147     Append +git to version number in configure.ac
2148     
2149     Don't let dosfstools compiled from git with additional commits show the
2150     exact release version number.
2151     
2152     Signed-off-by: Andreas Bombe <aeb@debian.org>
2153
2154 commit 8788615
2155 Author: Álvaro Fernández Rojas <noltari@gmail.com>
2156 Date:   Thu Jun 30 08:43:50 2016 +0200
2157
2158     Add config.guess and config.sub to gitignore
2159     
2160     Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2161     Signed-off-by: Andreas Bombe <aeb@debian.org>
2162
2163 commit 39ab842
2164 Author: Álvaro Fernández Rojas <noltari@gmail.com>
2165 Date:   Thu Jun 30 08:41:51 2016 +0200
2166
2167     Use autoconf to look for OS X endian include.
2168     
2169     Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2170     Signed-off-by: Andreas Bombe <aeb@debian.org>
2171
2172 commit 69ac2b0
2173 Author: Alessio Sergi <al3hex@gmail.com>
2174 Date:   Fri May 6 18:18:18 2016 +0200
2175
2176     src/device_info.c: Fix undefined PATH_MAX under musl
2177     
2178     In musl libc, PATH_MAX is defined in <limits.h>.
2179     
2180     Signed-off-by: Andreas Bombe <aeb@debian.org>
2181
2182 commit 744db84
2183 Author: Lars Wendler <polynomial-c@gentoo.org>
2184 Date:   Tue May 10 09:47:57 2016 +0200
2185
2186     Don't link to udev via LDFLAGS. There's LDADD for such a task.
2187     
2188     See also:
2189     https://www.gnu.org/software/automake/manual/html_node/Linking.html
2190     
2191     Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
2192     Signed-off-by: Andreas Bombe <aeb@debian.org>
2193
2194 commit 1e76e57
2195 Author: Andreas Bombe <aeb@debian.org>
2196 Date:   Wed May 11 03:44:58 2016 +0200
2197
2198     mkfs: Default to 64/32 heads/sectors for targets smaller than 512 MB
2199     
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.
2203     
2204     Signed-off-by: Andreas Bombe <aeb@debian.org>
2205
2206 commit 786e66e (tag: v4.0)
2207 Author: Andreas Bombe <aeb@debian.org>
2208 Date:   Fri May 6 03:19:07 2016 +0200
2209
2210     Releasing version 4.0.
2211     
2212     Signed-off-by: Andreas Bombe <aeb@debian.org>
2213
2214 commit a79ff90
2215 Author: Andreas Bombe <aeb@debian.org>
2216 Date:   Fri May 6 02:34:42 2016 +0200
2217
2218     src/Makefile.am: Fix CPPFLAGS for VPATH builds
2219     
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.
2224     
2225     Signed-off-by: Andreas Bombe <aeb@debian.org>
2226
2227 commit e8eff14
2228 Author: Andreas Bombe <aeb@debian.org>
2229 Date:   Wed Apr 27 21:38:37 2016 +0200
2230
2231     read_boot(): Handle excessive FAT size specifications
2232     
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
2238     was allocated.
2239     
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.
2243     
2244     Fixes #25 and fixes #26.
2245     
2246     Reported-by: Hanno Böck
2247     Signed-off-by: Andreas Bombe <aeb@debian.org>
2248
2249 commit 016800e
2250 Author: Andreas Bombe <aeb@debian.org>
2251 Date:   Wed Apr 27 14:16:53 2016 +0200
2252
2253     Use variable total_fat_entries in read_boot() for readability
2254     
2255     Signed-off-by: Andreas Bombe <aeb@debian.org>
2256
2257 commit a6478d8
2258 Author: Álvaro Fernández Rojas <noltari@gmail.com>
2259 Date:   Fri Apr 8 12:20:46 2016 +0200
2260
2261     Add missing iconv library for OS X
2262     
2263     Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2264     Signed-off-by: Andreas Bombe <aeb@debian.org>
2265
2266 commit ce67dc6
2267 Author: Álvaro Fernández Rojas <noltari@gmail.com>
2268 Date:   Fri Apr 8 12:20:27 2016 +0200
2269
2270     Add endian support for OS X
2271     
2272     Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2273     Signed-off-by: Andreas Bombe <aeb@debian.org>
2274
2275 commit 08f3869
2276 Author: Joel Holdsworth <joel.holdsworth@vcatechnology.com>
2277 Date:   Thu Mar 10 00:53:07 2016 +0000
2278
2279     Configure option to disable building with libudev
2280     
2281     Signed-off-by: Andreas Bombe <aeb@debian.org>
2282
2283 commit ed4e47b
2284 Author: Andreas Bombe <aeb@debian.org>
2285 Date:   Mon Feb 22 03:47:14 2016 +0100
2286
2287     Remove use of PATH_MAX in path_name()
2288     
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.
2292     
2293     As a bonus this will not fail compilation on a system without PATH_MAX.
2294     
2295     Signed-off-by: Andreas Bombe <aeb@debian.org>
2296
2297 commit b1a38ab
2298 Author: Andreas Bombe <aeb@debian.org>
2299 Date:   Wed Feb 17 21:04:35 2016 +0100
2300
2301     Add preliminary entry for release 4.0 to NEWS
2302     
2303     Signed-off-by: Andreas Bombe <aeb@debian.org>
2304
2305 commit 4ad3e9e
2306 Author: Andreas Bombe <aeb@debian.org>
2307 Date:   Wed Feb 17 21:02:06 2016 +0100
2308
2309     Adjust ridiculous source indentation in io.c
2310     
2311     Signed-off-by: Andreas Bombe <aeb@debian.org>
2312
2313 commit b96acb2
2314 Author: Andreas Bombe <aeb@debian.org>
2315 Date:   Wed Feb 17 20:51:53 2016 +0100
2316
2317     Document ./configure --enable-compat-symlinks in README
2318     
2319     Signed-off-by: Andreas Bombe <aeb@debian.org>
2320
2321 commit de39c5c
2322 Author: Andreas Bombe <aeb@debian.org>
2323 Date:   Wed Feb 17 15:16:27 2016 +0100
2324
2325     Add include paths.h in the HAVE_DECL_GETMNTENT case
2326     
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
2331     
2332     Signed-off-by: Andreas Bombe <aeb@debian.org>
2333
2334 commit 86c7acd
2335 Author: Andreas Bombe <aeb@debian.org>
2336 Date:   Wed Feb 17 15:06:56 2016 +0100
2337
2338     man fsck: Document the -c option
2339     
2340     Signed-off-by: Andreas Bombe <aeb@debian.org>
2341
2342 commit ef9a73c
2343 Author: Andreas Bombe <aeb@debian.org>
2344 Date:   Mon Feb 15 02:10:57 2016 +0100
2345
2346     Add NEWS file with changes of the last two releases
2347     
2348     Signed-off-by: Andreas Bombe <aeb@debian.org>
2349
2350 commit bda6551
2351 Author: Andreas Bombe <aeb@debian.org>
2352 Date:   Fri Feb 12 03:56:16 2016 +0100
2353
2354     Make filesystem mounted check portable
2355     
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.
2360     
2361     In case neither function is available, is_device_mounted() defaults to
2362     reporting that the device isn't mounted.
2363     
2364     Signed-off-by: Andreas Bombe <aeb@debian.org>
2365
2366 commit 4b8c9cc
2367 Author: Andreas Bombe <aeb@debian.org>
2368 Date:   Fri Feb 12 01:57:33 2016 +0100
2369
2370     Make use of endian.h portable to BSD
2371     
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
2375     files.
2376     
2377     Signed-off-by: Andreas Bombe <aeb@debian.org>
2378
2379 commit d7665f2
2380 Author: Andreas Bombe <aeb@debian.org>
2381 Date:   Wed Feb 10 21:30:06 2016 +0100
2382
2383     Fix format string in check_file() (%lu → %llu)
2384     
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
2387     string %llu.
2388     
2389     Signed-off-by: Andreas Bombe <aeb@debian.org>
2390
2391 commit 6225e59
2392 Author: Andreas Bombe <aeb@debian.org>
2393 Date:   Fri Feb 5 14:39:00 2016 +0100
2394
2395     blkdev.c: Prevent unused parameter warnings in fallback code
2396     
2397     Signed-off-by: Andreas Bombe <aeb@debian.org>
2398
2399 commit 34cdded
2400 Author: Andreas Bombe <aeb@debian.org>
2401 Date:   Fri Feb 5 14:36:14 2016 +0100
2402
2403     blkdev_get_size(): Remove unused variable ch
2404     
2405     Signed-off-by: Andreas Bombe <aeb@debian.org>
2406
2407 commit 5571d29
2408 Author: Andreas Bombe <aeb@debian.org>
2409 Date:   Wed Feb 10 03:22:19 2016 +0100
2410
2411     Reinstate alignment of FAT32 structures to cluster size
2412     
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.
2417     
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
2421     to enable it.
2422     
2423     Signed-off-by: Andreas Bombe <aeb@debian.org>
2424
2425 commit 2c71ace
2426 Author: Andreas Bombe <aeb@debian.org>
2427 Date:   Wed Feb 3 03:38:33 2016 +0100
2428
2429     Makefile.am: Add historic documentation to distribution
2430     
2431     Signed-off-by: Andreas Bombe <aeb@debian.org>
2432
2433 commit bcbae63
2434 Author: Andreas Bombe <aeb@debian.org>
2435 Date:   Wed Feb 3 02:38:24 2016 +0100
2436
2437     src/Makefile.am: Add forgotten msdos_fs.h to mkfs_fat_SOURCES
2438     
2439     Signed-off-by: Andreas Bombe <aeb@debian.org>
2440
2441 commit 19d1a13
2442 Author: Andreas Bombe <aeb@debian.org>
2443 Date:   Wed Feb 3 02:34:51 2016 +0100
2444
2445     Remove sys/ioctl.h and linux/fd.h include from io.c
2446     
2447     These weren't used anymore and the linux/fd.h include would
2448     gratuitously cause compilation to fail on non-Linux environments.
2449     
2450     Signed-off-by: Andreas Bombe <aeb@debian.org>
2451
2452 commit f691660
2453 Author: Andreas Bombe <aeb@debian.org>
2454 Date:   Wed Feb 3 02:31:00 2016 +0100
2455
2456     Reinstate some #include <sys/types.h>
2457     
2458     These shouldn't have been removed in commit 245d0cce5. Put them back for
2459     correctness even though the definitions were pulled in implicitly.
2460     
2461     Signed-off-by: Andreas Bombe <aeb@debian.org>
2462
2463 commit 51afd41
2464 Author: Andreas Bombe <aeb@debian.org>
2465 Date:   Wed Jan 27 21:38:29 2016 +0100
2466
2467     src/Makefile.am: Put all header files in appropriate _SOURCES variables
2468     
2469     With the headers missing the dist targets of the automake generated
2470     Makefiles would not include them and make the resulting dist
2471     unbuildable.
2472     
2473     Also combine sources collections into common variables for
2474     deduplication.
2475     
2476     Signed-off-by: Andreas Bombe <aeb@debian.org>
2477
2478 commit bf6f142
2479 Author: Andreas Bombe <aeb@debian.org>
2480 Date:   Wed Jan 27 15:28:42 2016 +0100
2481
2482     mkfs man: Note that sector sizes > 4096 are non-standard
2483     
2484     Signed-off-by: Andreas Bombe <aeb@debian.org>
2485
2486 commit ea96c32
2487 Author: Andreas Bombe <aeb@debian.org>
2488 Date:   Mon Jan 25 21:30:23 2016 +0100
2489
2490     mkfs: Improve parsing of bad blocks file
2491     
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.
2495     
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
2498     error messages.
2499     
2500     GitHub: Fixes #17
2501     Signed-off-by: Andreas Bombe <aeb@debian.org>
2502
2503 commit dfb5bea
2504 Author: Andreas Bombe <aeb@debian.org>
2505 Date:   Mon Jan 25 02:47:12 2016 +0100
2506
2507     mkfs: Limit filesystem size on targets that are too large
2508     
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.
2512     
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.
2516     
2517     Signed-off-by: Andreas Bombe <aeb@debian.org>
2518
2519 commit fc0343f
2520 Author: Andreas Bombe <aeb@debian.org>
2521 Date:   Fri Jan 22 21:29:20 2016 +0100
2522
2523     mkfs: Improved bounds checking in mark_FAT_sector()/mark_FAT_cluster()
2524     
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.
2529     
2530     Both functions now check for upper limits and should prevent writing
2531     past the valid end of the FAT.
2532     
2533     Signed-off-by: Andreas Bombe <aeb@debian.org>
2534
2535 commit 9211c8a
2536 Author: Andreas Bombe <aeb@debian.org>
2537 Date:   Fri Jan 15 02:17:16 2016 +0100
2538
2539     mkfs: Fix offset error in FAT12/16 bad cluster marking
2540     
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
2544     area.
2545     
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.
2549     
2550     Signed-off-by: Andreas Bombe <aeb@debian.org>
2551
2552 commit 0627a62
2553 Author: Andreas Bombe <aeb@debian.org>
2554 Date:   Fri Jan 15 01:59:59 2016 +0100
2555
2556     mkfs: Fix off-by-2 error in bad cluster marking
2557     
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
2561     cluster.
2562     
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.
2567     
2568     Signed-off-by: Andreas Bombe <aeb@debian.org>
2569
2570 commit 2dca9aa
2571 Author: Andreas Bombe <aeb@debian.org>
2572 Date:   Thu Jan 14 14:43:00 2016 +0100
2573
2574     .gitignore: Add .dirstamp
2575     
2576     Signed-off-by: Andreas Bombe <aeb@debian.org>
2577
2578 commit 6a966fb
2579 Author: Andreas Bombe <aeb@debian.org>
2580 Date:   Thu Jan 14 14:38:53 2016 +0100
2581
2582     mkfs: Reword non-standard sector size warning
2583     
2584     Signed-off-by: Andreas Bombe <aeb@debian.org>
2585
2586 commit bebc9ac
2587 Author: Andreas Bombe <aeb@debian.org>
2588 Date:   Wed Dec 30 15:10:35 2015 +0100
2589
2590     Clean up includes in mkfs.fat.c
2591     
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.
2595     
2596     Signed-off-by: Andreas Bombe <aeb@debian.org>
2597
2598 commit 12a1d46
2599 Author: Andreas Bombe <aeb@debian.org>
2600 Date:   Sun Nov 29 01:59:10 2015 +0100
2601
2602     Don't use pointer to first member when more of the struct gets copied
2603     
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.
2607     
2608     This does not change how the code works, it is just a clean up.
2609     
2610     Signed-off-by: Andreas Bombe <aeb@debian.org>
2611
2612 commit d38bd2d
2613 Author: Andreas Bombe <aeb@debian.org>
2614 Date:   Sun Nov 29 00:44:48 2015 +0100
2615
2616     Remove name/extension split in directory entry structures
2617     
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].
2621     
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.
2626     
2627     Nevertheless, this is not clean C and the merging of both fields
2628     actually simplified the code in a few places.
2629     
2630     Signed-off-by: Andreas Bombe <aeb@debian.org>
2631
2632 commit 0847e4c
2633 Author: Andreas Bombe <aeb@debian.org>
2634 Date:   Fri Nov 27 21:29:49 2015 +0100
2635
2636     Free allocated strings after use
2637     
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.
2641     
2642     Found by Coverity.
2643     
2644     Signed-off-by: Andreas Bombe <aeb@debian.org>
2645
2646 commit 1b7d91e
2647 Author: Andreas Bombe <aeb@debian.org>
2648 Date:   Fri Nov 27 03:34:51 2015 +0100
2649
2650     Add test for and include linux/hdreg.h in blkdev.c
2651     
2652     Before, blkdev did not include it and depended on its own fallback
2653     definition of the ioctl and struct hd_geometry.
2654     
2655     Signed-off-by: Andreas Bombe <aeb@debian.org>
2656
2657 commit 5024372
2658 Author: Andreas Bombe <aeb@debian.org>
2659 Date:   Fri Nov 27 03:28:14 2015 +0100
2660
2661     Add FDGETPRM attempt to blkdev_get_geometry()
2662     
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.
2665     
2666     Signed-off-by: Andreas Bombe <aeb@debian.org>
2667
2668 commit 4a146d7
2669 Author: Andreas Bombe <aeb@debian.org>
2670 Date:   Fri Nov 27 03:25:55 2015 +0100
2671
2672     Add blkdev_get_start() for getting partition start offset
2673     
2674     Signed-off-by: Andreas Bombe <aeb@debian.org>
2675
2676 commit 254f8ab
2677 Author: Andreas Bombe <aeb@debian.org>
2678 Date:   Thu Nov 26 23:33:02 2015 +0100
2679
2680     Remove use of libblkid again
2681     
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
2685     use of libblkid.
2686     
2687     As a replacement, blkdev.c from util-linux is included, which offers the
2688     required basic functionality in a portable way.
2689     
2690     Signed-off-by: Andreas Bombe <aeb@debian.org>
2691
2692 commit c9fb33c
2693 Author: Andreas Bombe <aeb@debian.org>
2694 Date:   Wed Oct 21 21:32:30 2015 +0200
2695
2696     Use just device size not major number in Atari mode
2697     
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.
2702     
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.
2707     
2708     Signed-off-by: Andreas Bombe <aeb@debian.org>
2709
2710 commit 64486ad
2711 Author: Andreas Bombe <aeb@debian.org>
2712 Date:   Wed Oct 21 00:18:22 2015 +0200
2713
2714     Remove loff_t and llseek()
2715     
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
2720     that happen.
2721     
2722     Given this, convert all uses of loff_t to off_t, remove llseek()
2723     definitions and change llseek() calls to plain lseek().
2724     
2725     Signed-off-by: Andreas Bombe <aeb@debian.org>
2726
2727 commit e03a5f4
2728 Author: Andreas Bombe <aeb@debian.org>
2729 Date:   Fri Oct 16 21:47:04 2015 +0200
2730
2731     Remove DJGPP support
2732     
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.
2737     
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
2740     then.
2741     
2742     Signed-off-by: Andreas Bombe <aeb@debian.org>
2743
2744 commit 5b9a88d
2745 Author: Andreas Bombe <aeb@debian.org>
2746 Date:   Thu Oct 8 16:17:22 2015 +0200
2747
2748     mkfs.fat: Complete overhaul of device probing
2749     
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
2756     device.
2757     
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.
2763     
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
2767     results.
2768     
2769     Signed-off-by: Andreas Bombe <aeb@debian.org>
2770
2771 commit 53eddfc
2772 Author: Andreas Bombe <aeb@debian.org>
2773 Date:   Sat Sep 12 02:54:33 2015 +0200
2774
2775     Die on out of range cluster values in set_fat()/get_fat()
2776     
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
2780     set_fat().
2781     
2782     When an invalid cluster value is detected, these functions now die()
2783     with an "internal error" message.
2784     
2785     Signed-off-by: Andreas Bombe <aeb@debian.org>
2786
2787 commit 456767b
2788 Author: Andreas Bombe <aeb@debian.org>
2789 Date:   Mon Sep 14 00:33:49 2015 +0200
2790
2791     configure.ac: Use AS_HELP_STRING to format option help
2792     
2793     Signed-off-by: Andreas Bombe <aeb@debian.org>
2794
2795 commit 3cfb479
2796 Author: Andreas Bombe <aeb@debian.org>
2797 Date:   Mon Sep 14 00:30:40 2015 +0200
2798
2799     version.h: Use @configure_input@ autoconf variable in boilerplate
2800     
2801     Signed-off-by: Andreas Bombe <aeb@debian.org>
2802
2803 commit 41ef834
2804 Author: Andreas Bombe <aeb@debian.org>
2805 Date:   Mon Sep 14 00:29:27 2015 +0200
2806
2807     .gitignore: Add TAGS in addition to tags
2808     
2809     Signed-off-by: Andreas Bombe <aeb@debian.org>
2810
2811 commit bdc3d2a
2812 Author: Andreas Bombe <aeb@debian.org>
2813 Date:   Fri Sep 11 20:28:12 2015 +0200
2814
2815     Rename clusters field in DOS_FS struct
2816     
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).
2820     
2821     Signed-off-by: Andreas Bombe <aeb@debian.org>
2822
2823 commit 0790812
2824 Author: Andreas Bombe <aeb@debian.org>
2825 Date:   Fri Sep 11 19:47:29 2015 +0200
2826
2827     set_fat(): Fix off-by-2 error leading to corruption in FAT12
2828     
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
2833     not the last one.
2834     
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.
2839     
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.
2844     
2845     Change the test to fs->clusters + 1 to fix.
2846     
2847     Reported-by: Hanno Böck
2848     Signed-off-by: Andreas Bombe <aeb@debian.org>
2849
2850 commit 39ce90f
2851 Author: Andreas Bombe <aeb@debian.org>
2852 Date:   Fri Sep 11 19:34:10 2015 +0200
2853
2854     set_fat(): Move FAT12 next cluster check up
2855     
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
2860     not the last one.
2861     
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
2864     looked up value.
2865     
2866     Move the check up to fix.
2867     
2868     Signed-off-by: Andreas Bombe <aeb@debian.org>
2869
2870 commit 2aad1c8
2871 Author: Andreas Bombe <aeb@debian.org>
2872 Date:   Tue Sep 8 03:58:29 2015 +0200
2873
2874     Prevent out of bound array read in date_dos2unix()
2875     
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.
2880     
2881     Add a check to prevent that and also make the day_n array const on this
2882     occasion.
2883     
2884     Reported-by: Hanno Böck
2885     Signed-off-by: Andreas Bombe <aeb@debian.org>
2886
2887 commit 3b95786
2888 Author: Yann E. MORIN <yann.morin.1998@free.fr>
2889 Date:   Sun Aug 16 15:55:43 2015 +0200
2890
2891     mkfs.fat: fix incorrect int type
2892     
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
2896     readability):
2897     
2898         http://autobuild.buildroot.org/results/a09/a0923d7f6d4dbae02eba4c5024bbdae3a52aa85a/build-end.log
2899     
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); [...]
2906                           ^
2907         src/mkfs.fat.c:1415:18: note: each undeclared identifier is reported only once for each
2908         function it appears in
2909     
2910     Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2911     Signed-off-by: Andreas Bombe <aeb@debian.org>
2912
2913 commit 2b1c4d1
2914 Author: Andreas Bombe <aeb@debian.org>
2915 Date:   Wed Jun 3 03:33:10 2015 +0200
2916
2917     Add README.md, remove Markdown formatting from README
2918     
2919     Signed-off-by: Andreas Bombe <aeb@debian.org>
2920
2921 commit b720acc
2922 Author: Andreas Bombe <aeb@debian.org>
2923 Date:   Wed Jun 3 03:27:24 2015 +0200
2924
2925     Add simple README in Markdown format
2926     
2927     Signed-off-by: Andreas Bombe <aeb@debian.org>
2928
2929 commit 2b255e6
2930 Author: Andreas Bombe <aeb@debian.org>
2931 Date:   Tue Jun 2 18:25:06 2015 +0200
2932
2933     Configure option for legacy names symlinks
2934     
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
2937     given to configure.
2938     
2939     Signed-off-by: Andreas Bombe <aeb@debian.org>
2940
2941 commit 0643db7
2942 Author: Andreas Bombe <aeb@debian.org>
2943 Date:   Sun May 31 02:40:19 2015 +0200
2944
2945     Convert build system to autoconf/automake
2946     
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.
2952     
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.
2958     
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.
2964     
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.
2968     
2969     Signed-off-by: Andreas Bombe <aeb@debian.org>
2970
2971 commit 85022fe (tag: v3.0.28)
2972 Author: Andreas Bombe <aeb@debian.org>
2973 Date:   Sat May 16 02:56:17 2015 +0200
2974
2975     Releasing version 3.0.28.
2976     
2977     Signed-off-by: Andreas Bombe <aeb@debian.org>
2978
2979 commit ad1342e
2980 Author: Andreas Bombe <aeb@debian.org>
2981 Date:   Sat May 16 02:10:18 2015 +0200
2982
2983     manpages: Mark MT and ME tags as untranslated for po4a
2984     
2985     Signed-off-by: Andreas Bombe <aeb@debian.org>
2986
2987 commit 3ed9ec2
2988 Author: Andreas Bombe <aeb@debian.org>
2989 Date:   Sun May 10 19:59:02 2015 +0200
2990
2991     mkfs: Small changes to FAT32 cluster size selection
2992     
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.
2996     
2997     Signed-off-by: Andreas Bombe <aeb@debian.org>
2998
2999 commit 9984552
3000 Author: Andreas Bombe <aeb@debian.org>
3001 Date:   Mon Apr 20 23:41:34 2015 +0200
3002
3003     fsck: Mention -r is default in usage message
3004     
3005     Signed-off-by: Andreas Bombe <aeb@debian.org>
3006
3007 commit 3eaca68
3008 Author: Andreas Bombe <aeb@debian.org>
3009 Date:   Mon Apr 20 23:30:56 2015 +0200
3010
3011     manpages: Remove obsolete information about Linux FAT support
3012     
3013     Signed-off-by: Andreas Bombe <aeb@debian.org>
3014
3015 commit a5e34de
3016 Author: Andreas Bombe <aeb@debian.org>
3017 Date:   Thu Apr 16 23:16:08 2015 +0200
3018
3019     manpages: Convert the rest of argument placeholders to upper case
3020     
3021     Signed-off-by: Andreas Bombe <aeb@debian.org>
3022
3023 commit 2303765
3024 Author: Andreas Bombe <aeb@debian.org>
3025 Date:   Thu Apr 16 22:51:20 2015 +0200
3026
3027     manpages: Fix formatting
3028     
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.
3035     
3036     Signed-off-by: Andreas Bombe <aeb@debian.org>
3037
3038 commit d3969b8
3039 Author: Andreas Bombe <aeb@debian.org>
3040 Date:   Fri Apr 10 20:32:50 2015 +0200
3041
3042     fsck: Verify first cluster of a file is not 1
3043     
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.
3047     
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
3052     unallocated memory.
3053     
3054     Now test_file() will ignore files where the first cluster equals 1 and
3055     an additional check in check_file() will truncate them.
3056     
3057     This bug was reported in http://bugs.debian.org/773885 by Jakub Wilk.
3058     
3059     Signed-off-by: Andreas Bombe <aeb@debian.org>
3060
3061 commit 2a56575
3062 Author: Andreas Bombe <aeb@debian.org>
3063 Date:   Thu Apr 2 23:35:00 2015 +0200
3064
3065     Simplify synopses of man pages
3066     
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.
3069     
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.
3073     
3074     Signed-off-by: Andreas Bombe <aeb@debian.org>
3075
3076 commit 40f1436
3077 Author: Andreas Bombe <aeb@debian.org>
3078 Date:   Wed Apr 1 20:55:58 2015 +0200
3079
3080     Update homepage and maintainer sections of man pages
3081     
3082     Signed-off-by: Andreas Bombe <aeb@debian.org>
3083
3084 commit 0169db8
3085 Author: Andreas Bombe <aeb@debian.org>
3086 Date:   Wed Apr 1 20:05:01 2015 +0200
3087
3088     mkfs: Show a clearer message that file already exists with -C
3089     
3090     Signed-off-by: Andreas Bombe <aeb@debian.org>
3091
3092 commit 2967e27
3093 Author: Andreas Bombe <aeb@debian.org>
3094 Date:   Mon Mar 30 21:12:51 2015 +0200
3095
3096     mkfs: Remove O_TRUNC from file creation call
3097     
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.
3101     
3102     Signed-off-by: Andreas Bombe <aeb@debian.org>
3103
3104 commit 90612df
3105 Author: Andreas Bombe <aeb@debian.org>
3106 Date:   Mon Mar 30 21:09:51 2015 +0200
3107
3108     mkfs: Use ftruncate() for expanding created file
3109     
3110     Signed-off-by: Andreas Bombe <aeb@debian.org>
3111
3112 commit 58e8e09
3113 Author: Andreas Bombe <aeb@debian.org>
3114 Date:   Tue Mar 24 21:32:40 2015 +0100
3115
3116     mkfs: Add --invariant option
3117     
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.
3121     
3122     This is intended for debugging or regression testing of mkfs.fat.
3123     
3124     Signed-off-by: Andreas Bombe <aeb@debian.org>
3125
3126 commit 354feaf
3127 Author: Andreas Bombe <aeb@debian.org>
3128 Date:   Thu Mar 19 21:35:21 2015 +0100
3129
3130     mkfs: Add long option parsing
3131     
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.
3136     
3137     Signed-off-by: Andreas Bombe <aeb@debian.org>
3138
3139 commit b611549
3140 Author: Andreas Bombe <aeb@debian.org>
3141 Date:   Mon Mar 16 21:08:35 2015 +0100
3142
3143     Do not expect EOF as return value of getopt()
3144     
3145     Signed-off-by: Andreas Bombe <aeb@debian.org>
3146
3147 commit a41fc32
3148 Author: Andreas Bombe <aeb@debian.org>
3149 Date:   Wed Mar 11 21:45:04 2015 +0100
3150
3151     fsck.fat: Fix read beyond end of array on FAT12
3152     
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.
3156     
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().
3159     
3160     Signed-off-by: Andreas Bombe <aeb@debian.org>
3161
3162 commit e18d72f
3163 Author: Álvaro Fernández Rojas <noltari@gmail.com>
3164 Date:   Sat Mar 7 13:23:23 2015 +0100
3165
3166     Remove linux/msdos_fs.h includes
3167     
3168     Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3169     Signed-off-by: Andreas Bombe <aeb@debian.org>
3170
3171 commit 245d0cc
3172 Author: Álvaro Fernández Rojas <noltari@gmail.com>
3173 Date:   Thu Feb 26 19:22:54 2015 +0100
3174
3175     Remove non standard int types
3176     
3177     Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3178     Signed-off-by: Andreas Bombe <aeb@debian.org>
3179
3180 commit 628b3ec
3181 Author: Álvaro Fernández Rojas <noltari@gmail.com>
3182 Date:   Thu Feb 26 19:41:19 2015 +0100
3183
3184     Improve .gitignore
3185     
3186     Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3187     Signed-off-by: Andreas Bombe <aeb@debian.org>
3188
3189 commit 02b5a6d
3190 Author: Álvaro Fernández Rojas <noltari@gmail.com>
3191 Date:   Thu Feb 26 12:51:23 2015 +0100
3192
3193     Makefile: avoid using install -D
3194     
3195     OS X and FreeBSD are not compatible with this option
3196     
3197     Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3198     Signed-off-by: Andreas Bombe <aeb@debian.org>
3199
3200 commit fb6aea6
3201 Author: Álvaro Fernández Rojas <noltari@gmail.com>
3202 Date:   Thu Feb 26 12:50:57 2015 +0100
3203
3204     Makefile: fix typo in uninstall-man
3205     
3206     Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
3207     Signed-off-by: Andreas Bombe <aeb@debian.org>
3208
3209 commit 357ab07
3210 Author: Andreas Bombe <aeb@debian.org>
3211 Date:   Thu Feb 19 21:22:54 2015 +0100
3212
3213     fsck.fat: Make -r option default
3214     
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
3218     changes.
3219     
3220     The -r option continues to be recognized by fsck.fat.
3221     
3222     Signed-off-by: Andreas Bombe <aeb@debian.org>
3223
3224 commit 266a5fc
3225 Author: Andreas Bombe <aeb@debian.org>
3226 Date:   Fri Feb 20 03:19:28 2015 +0100
3227
3228     mkfs.fat: Allow 0xF0 to be specified as media byte
3229     
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.
3232     
3233     Also split the error reporting for -M between badly formatted and
3234     invalid numbers.
3235     
3236     Signed-off-by: Andreas Bombe <aeb@debian.org>
3237
3238 commit 16e97e9
3239 Author: Andreas Bombe <aeb@debian.org>
3240 Date:   Wed Jan 28 15:07:18 2015 +0100
3241
3242     Make all char* that may take literals const
3243     
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.
3247     
3248     Signed-off-by: Andreas Bombe <aeb@debian.org>
3249
3250 commit 8b8948c
3251 Author: Andreas Bombe <aeb@debian.org>
3252 Date:   Mon Dec 29 18:24:54 2014 +0100
3253
3254     mkfs.fat.c: Use unsigned char for binary data
3255     
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.
3259     
3260     Signed-off-by: Andreas Bombe <aeb@debian.org>
3261
3262 commit 45aeed0
3263 Author: Andreas Bombe <aeb@debian.org>
3264 Date:   Sun Nov 16 19:49:22 2014 +0100
3265
3266     Fix indentation of "fix power loss damage" commit
3267     
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
3271     world.
3272     
3273     Signed-off-by: Andreas Bombe <aeb@debian.org>
3274
3275 commit 75c5446
3276 Author: Andreas Bombe <aeb@debian.org>
3277 Date:   Sat Nov 15 16:48:48 2014 +0100
3278
3279     Add tags and editor backup files to .gitignore
3280     
3281     Signed-off-by: Andreas Bombe <aeb@debian.org>
3282
3283 commit cb98ae2 (tag: v3.0.27)
3284 Author: Andreas Bombe <aeb@debian.org>
3285 Date:   Wed Nov 12 01:10:23 2014 +0100
3286
3287     Releasing version 3.0.27.
3288     
3289     Signed-off-by: Andreas Bombe <aeb@debian.org>
3290
3291 commit e2c8f06
3292 Author: Andreas Bombe <aeb@debian.org>
3293 Date:   Wed Nov 12 00:22:17 2014 +0100
3294
3295     fsck.fat: Don't print version string every time -v is encountered
3296     
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.
3300     
3301     Signed-off-by: Andreas Bombe <aeb@debian.org>
3302
3303 commit 82076b6
3304 Author: Andreas Bombe <aeb@debian.org>
3305 Date:   Tue Nov 11 23:25:30 2014 +0100
3306
3307     Fix attempt to rename root dir in fsck due to uninitialized fields
3308     
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
3312     values.
3313     
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).
3318     Example run:
3319     
3320         $ /sbin/fsck.fat -y bad.img
3321         fsck.fat 3.0.26 (2014-03-07)
3322         /
3323           Bad short file name ().
3324           Auto-renaming it.
3325           Renamed to
3326         bad.img: 14 files, 19388/403266 clusters
3327     
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 .
3331     
3332     Signed-off-by: Andreas Bombe <aeb@debian.org>
3333
3334 commit c24ecb6
3335 Author: Andreas Bombe <aeb@debian.org>
3336 Date:   Tue Nov 11 22:49:50 2014 +0100
3337
3338     Support long file names in volume labeling code
3339     
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"
3343     bit.
3344     
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.
3350     
3351     Change so that the set of attributes equal that of LFN entries will no
3352     langer match as a volume label.
3353     
3354     Signed-off-by: Andreas Bombe <aeb@debian.org>
3355
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
3359
3360     Releasing version 3.0.26.
3361     
3362     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3363
3364 commit 6893c45
3365 Author: Dir Lotter <dirk.lotter@siemens.com>
3366 Date:   Fri Mar 7 18:25:39 2014 +0100
3367
3368     Fix "odd" files created by frequent power-loss.
3369     
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:
3372     
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
3376         failed
3377       * file was not accessible and could not be deleted
3378     
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
3382     filenames.
3383     
3384     Our patch of check.c includes:
3385     
3386       * returns 1 from function bad_name() in case no short and no long filename
3387         exist
3388       * auto_rename() and rename_file() got a special handling for the case no short
3389         file name exist:
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
3394     
3395     This solved our problem pretty well.
3396     
3397     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3398
3399 commit 621e11f
3400 Author: Natanael Copa <ncopa@alpinelinux.org>
3401 Date:   Sat Feb 8 18:53:30 2014 +0100
3402
3403     Build fixes for musl libc.
3404     
3405     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3406
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
3410
3411     Releasing version 3.0.25.
3412     
3413     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3414
3415 commit acf64ae
3416 Author: Daniel Baumann <mail@daniel-baumann.ch>
3417 Date:   Fri Jan 17 07:09:54 2014 +0100
3418
3419     Updating copyright headers for 2014.
3420     
3421     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3422
3423 commit 21fe921
3424 Author: Andrew Tridgell <tridge@samba.org>
3425 Date:   Tue Jan 14 09:37:51 2014 +1100
3426
3427     Fixed remaining 64 bit build warnings.
3428     
3429     Some of these may be real bugs.
3430     
3431     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3432
3433 commit 9e3a2b1
3434 Author: Andrew Tridgell <tridge@samba.org>
3435 Date:   Tue Jan 14 09:25:28 2014 +1100
3436
3437     Prevent corruption of FAT during fsck on 64 bit platforms.
3438     
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
3441     another file.
3442     
3443     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3444
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
3448
3449     Releasing version 3.0.24.
3450     
3451     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3452
3453 commit 55bd7b7
3454 Author: Jaroslav Skarvada <jskarvad@redhat.com>
3455 Date:   Sat Nov 23 10:34:48 2013 +0100
3456
3457     Fixed dosfsck on big endian platforms (Resolves: rhbz#1029695).
3458     
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).
3463     
3464     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3465
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
3469
3470     Releasing version 3.0.23.
3471     
3472     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3473
3474 commit 07d85ff
3475 Author: Daniel Baumann <mail@daniel-baumann.ch>
3476 Date:   Tue Oct 15 08:04:11 2013 +0200
3477
3478     Reformating mkfs.fat manpage.
3479     
3480     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3481
3482 commit 137552f
3483 Author: Michael Shigorin <mike@altlinux.org>
3484 Date:   Tue Oct 15 01:29:33 2013 +0400
3485
3486     Fixing "Fixing default sectors per cluster for FAT32" for UEFI.
3487     
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.
3491     
3492     This commit amends that one by reverting its effects for these
3493     small sizes by restoring 512b cluster size for <= 260Mb FAT32.
3494     
3495     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3496
3497 commit 2000696
3498 Author: Daniel Baumann <mail@daniel-baumann.ch>
3499 Date:   Fri Aug 9 09:38:13 2013 +0200
3500
3501     Also allowing lowercase labels in mkfs (with warning message) consistent with the recent fsck change, thanks to Michael Baum <mbaum@devonit.com>.
3502     
3503     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3504
3505 commit 9b04807
3506 Author: Tim Harder <radhermit@gentoo.org>
3507 Date:   Fri Jul 19 18:15:21 2013 +0200
3508
3509     Add install-man dependency to install-symlinks Makefile target.
3510     
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.
3513     
3514     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3515
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
3519
3520     Releasing version 3.0.22.
3521     
3522     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3523
3524 commit 3dc5560
3525 Author: Daniel Baumann <mail@daniel-baumann.ch>
3526 Date:   Fri Jul 19 06:55:24 2013 +0200
3527
3528     Addding install-symlinks target to phony targets in Makefile.
3529     
3530     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3531
3532 commit c6c0581
3533 Author: Daniel Baumann <mail@daniel-baumann.ch>
3534 Date:   Fri Jul 19 06:55:00 2013 +0200
3535
3536     Adding uninstall-symlinks target in Makefile.
3537     
3538     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3539
3540 commit 465dd8c
3541 Author: Daniel Baumann <mail@daniel-baumann.ch>
3542 Date:   Fri Jul 19 06:45:40 2013 +0200
3543
3544     Allowing fatlabel to write labels in all lowercase but give a warning about DOS/Windows (Closes: #714971).
3545     
3546     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3547
3548 commit 3621b30
3549 Author: John S Gruber <JohnSGruber@gmail.com>
3550 Date:   Fri Jul 19 06:40:21 2013 +0200
3551
3552     Add options and make dos boot sector more compatible with reference system (Closes: #552673).
3553     
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
3556     partition.
3557     
3558     Initialize DOS boot sector drive_number according to FAT media type
3559     Addresses LP: #398241 and Debian #552673
3560     
3561     Adds options to override the DOS boot sector device_number and
3562     the FAT media type.
3563     
3564     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3565
3566 commit be1eed5
3567 Author: Daniel Baumann <mail@daniel-baumann.ch>
3568 Date:   Wed Jul 17 12:52:20 2013 +0200
3569
3570     Correcting wrong check preventing installation of fatlabel legacy manpage symlink.
3571     
3572     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3573
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
3577
3578     Releasing version 3.0.21.
3579     
3580     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3581
3582 commit a74c12c
3583 Author: Jaroslav Skarvada <jskarvad@redhat.com>
3584 Date:   Tue Jun 25 14:53:14 2013 +0200
3585
3586     Adding the missing -p option to the fsck manpage (to be consistent with the output of the tool).
3587     
3588     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3589
3590 commit 25e03c9
3591 Author: Patrick J. Volkerding <volkerdi@slackware.com>
3592 Date:   Mon Jun 24 14:23:00 2013 +0200
3593
3594     Using $MANDIR instead of hardcoded ${PREFIX}/share/man in the Makefile.
3595     
3596     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3597
3598 commit 7fd9cf7
3599 Author: Daniel Baumann <mail@daniel-baumann.ch>
3600 Date:   Fri Jun 14 18:50:31 2013 +0200
3601
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>.
3603     
3604     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3605
3606 commit a76bbcd
3607 Author: Daniel Baumann <mail@daniel-baumann.ch>
3608 Date:   Wed Jun 12 13:00:10 2013 +0200
3609
3610     Using US digit date format in version date, rather than name abbrev.
3611     
3612     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3613
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
3617
3618     Releasing version 3.0.20.
3619     
3620     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3621
3622 commit 1a5d99f
3623 Author: Daniel Baumann <mail@daniel-baumann.ch>
3624 Date:   Wed Jun 12 12:07:58 2013 +0200
3625
3626     Softening message about different boot sectors a bit (Closes: #704198).
3627     
3628     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3629
3630 commit 4727286
3631 Author: Daniel Baumann <mail@daniel-baumann.ch>
3632 Date:   Wed Jun 12 11:42:52 2013 +0200
3633
3634     Harmonizing program name output.
3635     
3636     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3637
3638 commit 17c956c
3639 Author: Martin Wilck <mwilck@arcor.de>
3640 Date:   Wed Jun 12 11:38:00 2013 +0200
3641
3642     Don't align FAT to cluster size.
3643     
3644     See previous patch for explanation.
3645     
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.
3650     
3651     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3652
3653 commit d63e0d6
3654 Author: Martin Wilck <mwilck@arcor.de>
3655 Date:   Wed Jun 12 11:36:08 2013 +0200
3656
3657     Don't align FAT32 reserved sectors to cluster size.
3658     
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.
3663     
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
3668     doesn't do this).
3669     
3670     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3671
3672 commit e048a8d
3673 Author: Martin Wilck <mwilck@arcor.de>
3674 Date:   Wed Jun 12 11:33:33 2013 +0200
3675
3676     Fixing default sectors per cluster for FAT32 (Closes: #690062).
3677     
3678     The default sectors per cluster calculated by mkdosfs are outdated,
3679     see http://technet.microsoft.com/en-us/library/cc938438.aspx.
3680     
3681     The deviations may cause some 3rd party devices (e.g. TechniSat DVB
3682     receivers) to hang when reading mkdosfs generated file systems.
3683     
3684     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3685
3686 commit 86509aa
3687 Author: Daniel Baumann <mail@daniel-baumann.ch>
3688 Date:   Tue Jun 11 20:19:09 2013 +0200
3689
3690     Splitting out legacy symlink creation in toplevel Makefile to own target.
3691     
3692     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3693
3694 commit da37dd1
3695 Author: Daniel Baumann <mail@daniel-baumann.ch>
3696 Date:   Wed Jun 12 11:29:12 2013 +0200
3697
3698     Correcting wrong toolname in fsck.fat.
3699     
3700     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3701
3702 commit b29a722
3703 Author: Daniel Baumann <mail@daniel-baumann.ch>
3704 Date:   Tue Jun 11 19:51:47 2013 +0200
3705
3706     Consistently spelling filesystem as filesystem, and not file system.
3707     
3708     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3709
3710 commit 977d7aa
3711 Author: Daniel Baumann <mail@daniel-baumann.ch>
3712 Date:   Tue Jun 11 19:30:19 2013 +0200
3713
3714     Removing Debian reference in GPL license headers.
3715     
3716     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3717
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
3721
3722     Releasing version 3.0.19.
3723     
3724     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3725
3726 commit 2c88f35
3727 Author: Daniel Baumann <mail@daniel-baumann.ch>
3728 Date:   Tue Jun 11 18:44:50 2013 +0200
3729
3730     Running indent on source files.
3731     
3732     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3733
3734 commit d495d43
3735 Author: Daniel Baumann <mail@daniel-baumann.ch>
3736 Date:   Tue Jun 11 18:41:41 2013 +0200
3737
3738     Using memcpy instead of strcpy to fix segfault with fortify, thanks to Dave Reisner <falconindy@jabber.org>.
3739     
3740     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3741
3742 commit 9fb4ffc
3743 Author: Daniel Baumann <mail@daniel-baumann.ch>
3744 Date:   Sun Jun 9 13:17:16 2013 +0200
3745
3746     Correcting fsck.fat spelling error in manpages, thanks to E.J.M. Hartman <E.J.M.Hartman@tudelft.nl>.
3747     
3748     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3749
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
3753
3754     Releasing version 3.0.18.
3755     
3756     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3757
3758 commit d4e1180
3759 Author: Daniel Baumann <mail@daniel-baumann.ch>
3760 Date:   Thu Jun 6 09:38:45 2013 +0200
3761
3762     Adding initial i18n support for manpages with po4a.
3763     
3764     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3765
3766 commit ea8f712
3767 Author: Daniel Baumann <mail@daniel-baumann.ch>
3768 Date:   Thu Jun 6 09:17:13 2013 +0200
3769
3770     Renaming tools to sane namespace and keeping legacy symlinks in place.
3771     
3772     dosfslabel becomes fatlabel,
3773     dosfsck becomes fsck.fat,
3774     and mkdosfs becomes mkfs.fat.
3775     
3776     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3777
3778 commit a42b127
3779 Author: Daniel Baumann <mail@daniel-baumann.ch>
3780 Date:   Wed Jun 5 07:12:03 2013 +0200
3781
3782     Correcting wrong spelling of Debian in mkdosfs manpage.
3783     
3784     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3785
3786 commit 2749084
3787 Author: Daniel Baumann <mail@daniel-baumann.ch>
3788 Date:   Wed Jun 5 07:10:50 2013 +0200
3789
3790     Correcting spelling typo in boot.c.
3791     
3792     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3793
3794 commit 6461c83
3795 Author: Martin Pitt <martinpitt@gnome.org>
3796 Date:   Fri May 24 09:35:44 2013 +0200
3797
3798     dosfslabel: Do not read beyond string length (Closes: #709587).
3799     
3800     When checking whether the label contains any lower-case characters, do not read
3801     beyond the end of the string.
3802     
3803     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3804
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
3808
3809     Releasing version 3.0.17.
3810     
3811     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3812
3813 commit 3aa88ed
3814 Author: Daniel Baumann <mail@daniel-baumann.ch>
3815 Date:   Wed May 29 09:48:24 2013 +0200
3816
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).
3818     
3819     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3820
3821 commit 0916f8a
3822 Author: Jaroslav Skarvada <jskarvad@redhat.com>
3823 Date:   Wed May 29 09:56:08 2013 +0200
3824
3825     Fixing segfault in dosfslabel.
3826     
3827     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3828
3829 commit 4a265c6
3830 Author: James Byrne <jbyrne@aminocom.com>
3831 Date:   Mon Apr 22 12:29:51 2013 +0100
3832
3833     Allow operation on SH4 CPUs and remove compiler warnings.
3834     
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.
3839     
3840     Enable extra warnings, but disable signed comparison and missing field
3841     initializer warnings as these are not helpful.
3842     
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.
3846     
3847     Make date_dos2unix(), usage() and cdiv() static functions as they are only used
3848     in the files in which they are declared.
3849     
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.
3853     
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.
3858     
3859     Alter the setup_tables() function so that it does not cause an "array subscript
3860     is below array bounds" warning.
3861     
3862     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3863
3864 commit eb68a14
3865 Author: James Byrne <jbyrne@aminocom.com>
3866 Date:   Mon Apr 22 13:32:01 2013 +0100
3867
3868     Add a .gitignore file.
3869     
3870     Add a .gitignore file so that the results of compilation do not appear as
3871     changes.
3872     
3873     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3874
3875 commit 336e8f1
3876 Author: James Byrne <jbyrne@aminocom.com>
3877 Date:   Mon Apr 22 12:38:52 2013 +0100
3878
3879     Finish cleanup of byteswap code.
3880     
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
3883     converted was zero.
3884     
3885     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3886
3887 commit 64b6227
3888 Author: Daniel Baumann <mail@daniel-baumann.ch>
3889 Date:   Thu Apr 4 08:08:00 2013 +0200
3890
3891     Shortening links to upstream homepage.
3892     
3893     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3894
3895 commit 76304be
3896 Author: Cristian Rodríguez <crrodriguez@opensuse.org>
3897 Date:   Fri Mar 1 08:23:34 2013 +0100
3898
3899     Fix offsetof definition.
3900     
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.
3904     
3905     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3906
3907 commit 9ba8992
3908 Author: Cristian Rodríguez <crrodriguez@opensuse.org>
3909 Date:   Fri Mar 1 08:58:36 2013 +0100
3910
3911     Cleanup byteswap code.
3912     
3913     Remove all duplicate macro definitions for byteswapping routines
3914     and replace them for proper usage of userspace endian(3).
3915     
3916     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3917
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
3921
3922     Releasing version 3.0.16.
3923     
3924     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3925
3926 commit a9fa87e
3927 Author: Petr Gajdos <pgajdos@suse.cz>
3928 Date:   Fri Mar 1 08:34:12 2013 +0100
3929
3930     Create rootdir entry volume label with mkdosfs, create it when
3931     it doesn't exist with dosfslabel.
3932     
3933     See https://bugzilla.novell.com/show_bug.cgi?id=657011#c4
3934     for more information.
3935     
3936     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3937
3938 commit 92057f1
3939 Author: Petr Gajdos <pgajdos@suse.cz>
3940 Date:   Fri Mar 1 08:33:18 2013 +0100
3941
3942     Forbid lowercase letters in label.
3943     
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.
3946     
3947     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3948
3949 commit 5e265c4
3950 Author: Petr Gajdos <pgajdos@suse.cz>
3951 Date:   Fri Mar 1 08:32:02 2013 +0100
3952
3953     Read label also from rootdir entry.
3954     
3955     See https://bugzilla.novell.com/show_bug.cgi?id=657011#c4
3956     for more information.
3957     
3958     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3959
3960 commit 5cec53c
3961 Author: Petr Gajdos <pgajdos@suse.cz>
3962 Date:   Fri Mar 1 08:30:21 2013 +0100
3963
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.
3966     
3967     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3968
3969 commit 63938f0
3970 Author: Petr Gajdos <pgajdos@suse.cz>
3971 Date:   Fri Mar 1 08:29:00 2013 +0100
3972
3973     Instead of eleven blanks, fill in "NO NAME    " as specification tells.
3974     
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.
3977     
3978     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3979
3980 commit 10c1c41
3981 Author: Petr Gajdos <pgajdos@suse.cz>
3982 Date:   Fri Mar 1 08:58:15 2013 +0100
3983
3984     Write uppercase letters in label.
3985     
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.
3988     
3989     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3990
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
3994
3995     Releasing version 3.0.15.
3996     
3997     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
3998
3999 commit c8f84fd
4000 Author: Alexander Korolkov <alexander.korolkov@gmail.com>
4001 Date:   Mon Feb 4 00:22:34 2013 +0400
4002
4003     Using wcstombs() to convert LFN unicode characters to printable text.
4004     
4005     This closes Debian bug #596336.
4006     
4007     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4008
4009 commit 1546545
4010 Author: Alexander Korolkov <alexander.korolkov@gmail.com>
4011 Date:   Sun Sep 5 18:59:47 2010 +0400
4012
4013     Recode short filenames from DOS codepage (default 437).
4014     
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.
4018     
4019     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4020
4021 commit ad76cae
4022 Author: Jaroslav Skarvada <jskarvad@redhat.com>
4023 Date:   Thu Feb 21 14:40:52 2013 +0100
4024
4025     Fixing root directory allocation.
4026     
4027     See https://bugzilla.redhat.com/show_bug.cgi?id=674095 for more information.
4028     
4029     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4030
4031 commit b8201b3
4032 Author: Jaroslav Skarvada <jskarvad@redhat.com>
4033 Date:   Thu Feb 21 14:40:25 2013 +0100
4034
4035     Fixing device detection.
4036     
4037     See https://bugzilla.redhat.com/show_bug.cgi?id=710480 for more information.
4038     
4039     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4040
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
4044
4045     Releasing version 3.0.14.
4046     
4047     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4048
4049 commit 5bdd7ef
4050 Author: Daniel Baumann <mail@daniel-baumann.ch>
4051 Date:   Wed Jan 23 13:16:20 2013 +0100
4052
4053     Documenting dosfsck -b in its manpage.
4054     
4055     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4056
4057 commit a307be2
4058 Author: Oleksij Rempel <bug-track@fisher-privat.net>
4059 Date:   Wed Jan 23 12:36:56 2013 +0100
4060
4061     Adding option for bootsector read-only check.
4062     
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.
4066     
4067     Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
4068     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4069
4070 commit ce2f8dc
4071 Author: Oleksij Rempel <bug-track@fisher-privat.net>
4072 Date:   Wed Jan 23 12:35:13 2013 +0100
4073
4074     Checking boot sector for dirty bit.
4075     
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/...
4079     
4080     Signed-off-by: Oleksij Rempel <bug-track@fisher-privat.net>
4081     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4082
4083 commit f33ee8c
4084 Author: Daniel Baumann <mail@daniel-baumann.ch>
4085 Date:   Wed Jan 23 12:25:59 2013 +0100
4086
4087     Completing and updating all copyright headers for 2013.
4088     
4089     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4090
4091 commit bfe6d25
4092 Author: Daniel Baumann <mail@daniel-baumann.ch>
4093 Date:   Wed Jan 23 12:17:20 2013 +0100
4094
4095     Updating my email address.
4096     
4097     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4098
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
4102
4103     Releasing version 3.0.13.
4104     
4105     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4106
4107 commit d039482
4108 Author: Jaroslav Škarvada <jskarvad@redhat.com>
4109 Date:   Sat Jun 30 19:09:11 2012 +0200
4110
4111     Fix 'dosfslabel throws "Seek to 114116076544:Invalid argument" error when labeling'.
4112     
4113     See https://bugzilla.redhat.com/show_bug.cgi?id=693662 for more information.
4114     
4115     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4116
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
4120
4121     Releasing version 3.0.12.
4122     
4123     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4124
4125 commit 025b4f0
4126 Author: Michael Casadevall <mcasadevall@ubuntu.com>
4127 Date:   Tue Jun 7 19:19:30 2011 +0200
4128
4129     Correcting miscalculation of sector number in some cases.
4130     
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
4135     fail to boot.
4136     
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.
4140     
4141     See https://bugs.launchpad.net/ubuntu/+source/dosfstools/+bug/794043
4142     for more information.
4143     
4144     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4145
4146 commit 91a1fb9
4147 Author: Daniel Baumann <mail@daniel-baumann.ch>
4148 Date:   Sat Jan 8 23:38:59 2011 +0100
4149
4150     Re-running Nindent.
4151     
4152     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4153
4154 commit 0390c4c
4155 Author: Sergey Gusarov <laborer2008@gmail.com>
4156 Date:   Sat Jan 8 23:36:11 2011 +0100
4157
4158     Fixing compiler warnings related to the mismatch of types "char *" / "unsigned
4159     char *".
4160     
4161     These warnings appear when you compile the project with the option "-Wall", what
4162     is done with the current default Makefile.
4163     
4164     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4165
4166 commit 4a8f8a6
4167 Author: Jaroslav Skarvada <jskarvad@redhat.com>
4168 Date:   Thu Jan 6 22:35:00 2011 +0100
4169
4170     Fixing overflow bug in reclaim_file function, see
4171     https://bugzilla.redhat.com/show_bug.cgi?id=660154 for more information.
4172     
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
4176     and hangs.
4177     
4178     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4179
4180 commit e0366da
4181 Author: Sergey Gusarov <laborer2008@gmail.com>
4182 Date:   Thu Jan 6 22:31:39 2011 +0100
4183
4184     Fixing conversion specifiers in accordance with the type of expressions.
4185     
4186     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4187
4188 commit 2d8be9c
4189 Author: Daniel Baumann <mail@daniel-baumann.ch>
4190 Date:   Sun Jan 2 15:41:44 2011 +0100
4191
4192     Indenting source files.
4193     
4194     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4195
4196 commit 697af85
4197 Author: Daniel Baumann <mail@daniel-baumann.ch>
4198 Date:   Sun Jan 2 15:39:03 2011 +0100
4199
4200     Adding Nindent script from syslinux.
4201     
4202     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4203
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
4207
4208     Releasing version 3.0.11.
4209     
4210     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4211
4212 commit d579802
4213 Author: Michael Stapelberg <michael@stapelberg.de>
4214 Date:   Fri Nov 19 14:09:36 2010 +0100
4215
4216     Add better error message when the device cannot be opened.
4217     
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.
4221     
4222     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4223
4224 commit bb6000f
4225 Author: Jaroslav Skarvada <jskarvad@redhat.com>
4226 Date:   Fri Oct 8 13:38:16 2010 +0200
4227
4228     Unalign on s390x, see http://bugzilla.redhat.com/show_bug.cgi?id=624596 for
4229     more information.
4230     
4231     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4232
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
4236
4237     Releasing version 3.0.10.
4238     
4239     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4240
4241 commit ea41797
4242 Author: Alexander Korolkov <alexander.korolkov@gmail.com>
4243 Date:   Sun Sep 12 09:29:12 2010 +0200
4244
4245     Modify LFN direntries when file is renamed or deleted, see
4246     Debian bug #596329.
4247     
4248     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4249
4250 commit e56ff72
4251 Author: Alexander Korolkov <alexander.korolkov@gmail.com>
4252 Date:   Sun Sep 12 09:27:07 2010 +0200
4253
4254     If the test of short filename fails, dosfsck could complain about
4255     bad long filename, see Debian bug #596327.
4256     
4257     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4258
4259 commit f0a42d0
4260 Author: Alexander Korolkov <alexander.korolkov@gmail.com>
4261 Date:   Sun Sep 12 09:24:47 2010 +0200
4262
4263     dosfsck: don't complain about bad filenames when short filename
4264     contains 7 or more characters with codes 128-255, see Debian
4265     bug #596327.
4266     
4267     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4268
4269 commit 0113c5b
4270 Author: Mitch Rybczynski <mrybczynski@miovision.com>
4271 Date:   Mon Jul 5 14:45:54 2010 +0200
4272
4273     Adding __arm__ define check for some crosscompile toolchains.
4274     
4275     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4276
4277 commit 88cb84f
4278 Author: Daniel Baumann <mail@daniel-baumann.ch>
4279 Date:   Sun Mar 14 16:42:32 2010 +0100
4280
4281     Modernizing dosfslabel manpage.
4282     
4283     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4284
4285 commit 5aa7ec4
4286 Author: Daniel Baumann <mail@daniel-baumann.ch>
4287 Date:   Sun Mar 14 16:33:47 2010 +0100
4288
4289     Modernizing dosfsck manpage.
4290     
4291     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4292
4293 commit 807ed80
4294 Author: Daniel Baumann <mail@daniel-baumann.ch>
4295 Date:   Sun Mar 14 16:05:32 2010 +0100
4296
4297     Fixing spelling error in boot.c.
4298     
4299     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4300
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
4304
4305     Releasing version 3.0.9.
4306     
4307     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4308
4309 commit 33bca7d
4310 Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
4311 Date:   Sun Jan 31 00:11:41 2010 -0500
4312
4313     Be sure to store the updated reserved_sector count in the boot sector,
4314     see Debian bug #567337.
4315     
4316     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4317
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
4321
4322     Releasing version 3.0.8.
4323     
4324     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4325
4326 commit 726c02d
4327 Author: Daniel Baumann <mail@daniel-baumann.ch>
4328 Date:   Sat Jan 23 10:15:01 2010 +0100
4329
4330     Removing some cruft in end-comments.
4331     
4332     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4333
4334 commit a5961d7
4335 Author: Steven J. Magnani <steve@digidescorp.com>
4336 Date:   Thu Jan 21 16:58:11 2010 +0100
4337
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)
4340     partitions:
4341     
4342       Seek to -2118967808:Invalid argument
4343     
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.
4347     
4348     This appears to be due to compilation with a 32-bit off_t and lseek() library
4349     function.
4350     
4351     Use lseek64 for positioning, and change some suspect uses of off_t to loff_t.
4352     
4353     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4354
4355 commit bbb25bf
4356 Author: Steven J. Magnani <steve@digidescorp.com>
4357 Date:   Thu Jan 21 16:56:26 2010 +0100
4358
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.
4361     
4362     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4363
4364 commit 1cae726
4365 Author: Steven J. Magnani <steve@digidescorp.com>
4366 Date:   Thu Jan 21 16:55:30 2010 +0100
4367
4368     On x86_64, dosfsck incorrectly claims that a free_cluster summary of
4369     0xFFFFFFFF, defined by Microsoft to be "uninitialized," is wrong.
4370     
4371     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4372
4373 commit 62f806a
4374 Author: H. Peter Anvin <hpa@zytor.com>
4375 Date:   Fri Jan 8 09:16:38 2010 +0100
4376
4377     mkdosfs: correct alignment of the root directory.
4378     
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.
4385     
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.)
4390     
4391     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4392
4393 commit 8825bda
4394 Author: H. Peter Anvin <hpa@zytor.com>
4395 Date:   Wed Jan 6 20:55:36 2010 +0100
4396
4397     mkdosfs: improve wording in the man page for the -a option.
4398     
4399     Improve the English language used in the man page for the -a (no
4400     align) option to mkdosfs.
4401     
4402     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4403
4404 commit 21d3f81
4405 Author: Daniel Baumann <mail@daniel-baumann.ch>
4406 Date:   Wed Jan 6 11:27:25 2010 +0100
4407
4408     Adding reference to dosfslable in mkdosfs manpage.
4409     
4410     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4411
4412 commit 247ba06
4413 Author: H. Peter Anvin <hpa@zytor.com>
4414 Date:   Wed Jan 6 11:18:55 2010 +0100
4415
4416     mkdosfs: by default align all structures to cluster boundaries
4417     
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
4423     hard disks.
4424     
4425     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4426
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
4430
4431     Releasing version 3.0.7.
4432     
4433     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4434
4435 commit 28708fc
4436 Author: Ben Hutchings <ben@decadent.org.uk>
4437 Date:   Thu Dec 24 09:55:52 2009 +0100
4438
4439     Fixing dosfslabel to set volume label in the right place,
4440     see Debian bug #559985.
4441     
4442     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4443
4444 commit 2c405dd
4445 Author: Lubomir Rintel <lkundrak@v3.sk>
4446 Date:   Thu Dec 24 09:39:39 2009 +0100
4447
4448     Fixing out-of bound writes.
4449     
4450     Firstly, packed attribute is added to the structure so that extension
4451     is guarranteed to immediately follow name for the cross-name-extension
4452     reads to succeed.
4453     
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
4457     sprintf().
4458     
4459     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4460
4461 commit b8f3efe
4462 Author: San Mehat <san@google.com>
4463 Date:   Thu Dec 24 09:31:41 2009 +0100
4464
4465     Adding custom exit code in dosfsck for the case where the FS is read only.
4466     
4467     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4468
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
4472
4473     Releasing version 3.0.6.
4474     
4475     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4476
4477 commit bc84254
4478 Author: Steven J. Magnani <steve@digidescorp.com>
4479 Date:   Sun Oct 4 10:58:43 2009 +0200
4480
4481     Attempt to improve clarity of the orphan cluster reclaim code.
4482     Minor optimization - remove some unnecessary checking.
4483     
4484     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4485
4486 commit 8054b4a
4487 Author: Steven J. Magnani <steve@digidescorp.com>
4488 Date:   Sun Oct 4 08:37:19 2009 +0200
4489
4490     Close hole that permitted clusters to link to (invalid) cluster 1.
4491     
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.
4494     
4495     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4496
4497 commit e51af88
4498 Author: Steven J. Magnani <steve@digidescorp.com>
4499 Date:   Sun Oct 4 08:32:30 2009 +0200
4500
4501     Fix erroneous report of huge number of clusters in use on big-endian
4502     systems when the FSINFO free cluster count is reset.
4503     
4504     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4505
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
4509
4510     Releasing version 3.0.5.
4511     
4512     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4513
4514 commit 28ff9d9
4515 Author: Piotr Kaczuba <pepe@attika.ath.cx>
4516 Date:   Sun Jul 26 22:21:25 2009 +0200
4517
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.
4520     
4521     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4522
4523 commit d42a273
4524 Author: Andrew Tridgell <tridge@samba.org>
4525 Date:   Sun Jul 26 22:12:06 2009 +0200
4526
4527     Update to new kernel patches that add FAT_NO_83NAME flag.
4528     
4529     See http://lkml.org/lkml/2009/7/20/425 and
4530     http://lkml.org/lkml/2009/7/20/424 for more information.
4531     
4532     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4533
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
4537
4538     Releasing version 3.0.4.
4539     
4540     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4541
4542 commit b9f37a6
4543 Author: Andrew Tridgell <tridge@samba.org>
4544 Date:   Tue Jul 21 07:59:22 2009 +0200
4545
4546     Modify dosfstools to support the dummy 8.3 short filename values
4547     used by Linux systems with the VFAT_FS_DUALNAMES option disabled.
4548     
4549     See http://lkml.org/lkml/2009/6/26/313 and
4550     http://lkml.org/lkml/2009/6/26/314 for more information.
4551     
4552     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4553
4554 commit ecd15e8
4555 Author: Paul Rupe <prupe@nc.rr.com>
4556 Date:   Tue May 19 10:37:52 2009 +0200
4557
4558     Fixing "Too many files need repair" error during fsck.
4559     
4560     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4561
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
4565
4566     Releasing version 3.0.3.
4567     
4568     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4569
4570 commit b396dcf
4571 Author: Daniel Baumann <mail@daniel-baumann.ch>
4572 Date:   Mon May 18 15:10:55 2009 +0200
4573
4574     Also declaring arm as an unaligned architecture, see Debian bug #502961.
4575     
4576     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4577
4578 commit ff1b24e
4579 Author: Steven J. Magnani <steve@digidescorp.com>
4580 Date:   Mon May 18 15:01:49 2009 +0200
4581
4582     Adding support for limited-memory embedded systems.
4583     
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.
4587     
4588     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4589
4590 commit 89f0b72
4591 Author: Mike Frysinger <vapier@gentoo.org>
4592 Date:   Thu Mar 5 07:03:36 2009 +0100
4593
4594     Declaring Blackfin as an unaligned architecture.
4595     
4596     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4597
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
4601
4602     Releasing version 3.0.2.
4603     
4604     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4605
4606 commit 9500529
4607 Author: Hiroaki Ishizawa <hiroaki.ishizawa@gmail.com>
4608 Date:   Fri Feb 13 10:00:46 2009 +0100
4609
4610     dosfsck corrupts root directory when fs->nfats is 1.
4611     
4612     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4613
4614 commit 043f8a8
4615 Author: Stepan Kasal <skasal@redhat.com>
4616 Date:   Fri Jan 30 14:56:33 2009 +0100
4617
4618     src/dosfslabel.c (main): After writing the label, exit code should be 0.
4619     
4620     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4621
4622 commit 017da27
4623 Author: Daniel Baumann <mail@daniel-baumann.ch>
4624 Date:   Fri Jan 30 14:06:01 2009 +0100
4625
4626     Also installing ChangeLog in install-doc target of Makefile.
4627     
4628     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4629
4630 commit 1c76f0f
4631 Author: Stepan Kasal <skasal@redhat.com>
4632 Date:   Fri Jan 30 14:05:12 2009 +0100
4633
4634     Makefile: Do not clobber time stamps of doc files.
4635     
4636     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4637
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
4641
4642     Releasing version 3.0.1.
4643     
4644     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4645
4646 commit 17b269b
4647 Author: Daniel Baumann <mail@daniel-baumann.ch>
4648 Date:   Sun Nov 23 18:41:01 2008 +0100
4649
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.
4653     
4654     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4655
4656 commit e597caf
4657 Author: Ulrich Mueller <ulm@gentoo.org>
4658 Date:   Tue Oct 7 07:55:37 2008 +0200
4659
4660     Patch to check for bad number of clusters in dosfsck:
4661     
4662       * FAT16 filesystems with 65525 clusters or more will be rejected
4663         (Before, this was not tested for. Up to 65535 clusters were accepted
4664         as good).
4665     
4666       * For FAT32 filesystems with less than 65525 a warning message will be
4667         output.
4668     
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.
4672     
4673     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4674
4675 commit 90102bc
4676 Author: Dann Frazier <dannf@hp.com>
4677 Date:   Tue Sep 30 07:25:19 2008 +0200
4678
4679     Changing some wording to make the indended meaning of "full-disk device"
4680     more obvious.
4681     
4682     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4683
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
4687
4688     Releasing version 3.0.0.
4689     
4690     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4691
4692 commit eaf145d
4693 Author: Daniel Baumann <mail@daniel-baumann.ch>
4694 Date:   Sun Sep 28 11:29:01 2008 +0200
4695
4696     Adding GPL headers to all files.
4697     
4698     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4699
4700 commit 0826117
4701 Author: Daniel Baumann <mail@daniel-baumann.ch>
4702 Date:   Sun Sep 28 10:51:55 2008 +0200
4703
4704     Adding new GPL license file.
4705     
4706     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4707
4708 commit f8d6127
4709 Author: Daniel Baumann <mail@daniel-baumann.ch>
4710 Date:   Fri Sep 26 23:31:12 2008 +0200
4711
4712     Redoing Makefile from scratch.
4713     
4714     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4715
4716 commit b4feb73
4717 Author: Daniel Baumann <mail@daniel-baumann.ch>
4718 Date:   Sat Sep 27 00:17:38 2008 +0200
4719
4720     Removing whitespaces in all files at EOL and EOF.
4721     
4722     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4723
4724 commit 1410138
4725 Author: Daniel Baumann <mail@daniel-baumann.ch>
4726 Date:   Fri Sep 26 23:48:56 2008 +0200
4727
4728     Adding Debians dosfslabel.8 manpage from Francois Wendling
4729     <frwendling@free.fr>.
4730     
4731     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4732
4733 commit f62e7f2
4734 Author: Daniel Baumann <mail@daniel-baumann.ch>
4735 Date:   Fri Sep 26 18:36:04 2008 +0200
4736
4737     Updating version.h includes to new location of version.h file.
4738     
4739     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4740
4741 commit 32e5952
4742 Author: Daniel Baumann <mail@daniel-baumann.ch>
4743 Date:   Fri Sep 26 18:19:36 2008 +0200
4744
4745     Removing old lsm file.
4746     
4747     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4748
4749 commit 25a433b
4750 Author: Daniel Baumann <mail@daniel-baumann.ch>
4751 Date:   Fri Sep 26 18:07:47 2008 +0200
4752
4753     Removing old cvsignore files.
4754     
4755     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4756
4757 commit acac13f
4758 Author: Daniel Baumann <mail@daniel-baumann.ch>
4759 Date:   Fri Sep 26 18:18:39 2008 +0200
4760
4761     Removing old build file.
4762     
4763     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4764
4765 commit 3ecdd21
4766 Author: Daniel Baumann <mail@daniel-baumann.ch>
4767 Date:   Fri Sep 26 18:19:16 2008 +0200
4768
4769     Removing old GPL license files.
4770     
4771     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4772
4773 commit f183d0e
4774 Author: Daniel Baumann <mail@daniel-baumann.ch>
4775 Date:   Fri Sep 26 18:21:57 2008 +0200
4776
4777     Unifying dosfsck and mkdosfs Makefiles in common src/Makefile.
4778     
4779     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4780
4781 commit 61e7466
4782 Author: Daniel Baumann <mail@daniel-baumann.ch>
4783 Date:   Fri Sep 26 18:04:02 2008 +0200
4784
4785     Unifying dosfsck and mkdosfs sources in common src directory.
4786     
4787     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4788
4789 commit 7552d57
4790 Author: Daniel Baumann <mail@daniel-baumann.ch>
4791 Date:   Fri Sep 26 18:05:27 2008 +0200
4792
4793     Unifying dosfsck and mkdosfs manpages in common man directory.
4794     
4795     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4796
4797 commit 124598b
4798 Author: Daniel Baumann <mail@daniel-baumann.ch>
4799 Date:   Fri Sep 26 18:12:29 2008 +0200
4800
4801     Unifying dosfsck and mkdosfs documents in common doc directory.
4802     
4803     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4804
4805 commit fb9c46b
4806 Author: Daniel Baumann <mail@daniel-baumann.ch>
4807 Date:   Fri Sep 26 15:39:51 2008 +0200
4808
4809     Applying Gentoos dosfstools-2.11-preen.patch from Roy Marples
4810     <uberlord@gentoo.org> to alias dosfsck -p to -a:
4811     
4812       * Map -p to -a for baselayout-2, #177514.
4813     
4814     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4815
4816 commit aaa40a9
4817 Author: Daniel Baumann <mail@daniel-baumann.ch>
4818 Date:   Fri Sep 26 15:49:43 2008 +0200
4819
4820     Applying Gentoos dosfstools-2.11-build.patch from Mike Frysinger
4821     <vapier@gentoo.org> to improve Makefile:
4822     
4823       * Respect user settings #157785/#157786 by Diego Petteno.
4824     
4825     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4826
4827 commit 251626d
4828 Author: Daniel Baumann <mail@daniel-baumann.ch>
4829 Date:   Fri Sep 26 15:37:34 2008 +0200
4830
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:
4834     
4835       * Don't double-count n_files during a verification pass.
4836         Bugzilla: http://bugs.gentoo.org/show_bug.cgi?id=99845
4837     
4838     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4839
4840 commit e670ea8
4841 Author: Daniel Baumann <mail@daniel-baumann.ch>
4842 Date:   Fri Sep 26 15:33:36 2008 +0200
4843
4844     Applying Gentoos dosfstools-2.11-fat32size.patch from Mike Frysinger
4845     <vapier@gentoo.org> to fix generation of filesystems on 256meg devices:
4846     
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
4850     
4851     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4852
4853 commit a6dc6a4
4854 Author: Daniel Baumann <mail@daniel-baumann.ch>
4855 Date:   Fri Sep 26 15:22:06 2008 +0200
4856
4857     Applying Suses dosfstools-2.11-unsupported-sector-size.patch from Petr
4858     Gajdos <pgajdos@suse.cz> to add sector size warning:
4859     
4860       * added warning for creation msdos on filesystem with sector size
4861         greater than 4096 [fate#303325]
4862     
4863     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4864
4865 commit f746956
4866 Author: Daniel Baumann <mail@daniel-baumann.ch>
4867 Date:   Fri Sep 26 15:18:35 2008 +0200
4868
4869     Applying Suses dosfstools-2.11-mkdosfs-geo0.diff from Ludwig Nussel
4870     <lnussel@suse.de> to fix handling of zero heads and sectors:
4871     
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.
4876     
4877     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4878
4879 commit cf243e4
4880 Author: Daniel Baumann <mail@daniel-baumann.ch>
4881 Date:   Fri Sep 26 15:15:40 2008 +0200
4882
4883     Applying Suses dosfstools-2.11-linuxfs.patch from Ruediger Oertel
4884     <ro@suse.de> to not include linux/fs.h.
4885     
4886     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4887
4888 commit 2d4f184
4889 Author: Daniel Baumann <mail@daniel-baumann.ch>
4890 Date:   Fri Sep 26 15:11:50 2008 +0200
4891
4892     Applying Fedoras dosfstools-2.11-assumeKernel26.patch from Peter Vrabec
4893     <pvrabec@redhat.com> to remove linux 2.6 conditionals:
4894     
4895       * LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) does not work with
4896         glibc-kernheaders-2.4-9.1.94
4897     
4898     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4899
4900 commit 739a6fb
4901 Author: Daniel Baumann <mail@daniel-baumann.ch>
4902 Date:   Fri Sep 26 15:05:00 2008 +0200
4903
4904     Applying Debians 99-conglomeration.dpatch (no other information
4905     available).
4906     
4907     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4908
4909 commit 3b5ed8a
4910 Author: Daniel Baumann <mail@daniel-baumann.ch>
4911 Date:   Fri Sep 26 14:26:41 2008 +0200
4912
4913     Applying Debians 15-manpage-files.dpatch from Daniel Baumann
4914     <daniel@debian.org> to improve dosfsck manpage:
4915     
4916       * Lists fsckNNNN.rec files in FILES section (Closes: #444596).
4917     
4918     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4919
4920 commit 3b6a863
4921 Author: Daniel Baumann <mail@daniel-baumann.ch>
4922 Date:   Fri Sep 26 14:34:42 2008 +0200
4923
4924     Applying Debians 13-getopt.dpatch from Adonikam Virgo
4925     <adonikam@virgonet.org> to fix mkdosfs getopt:
4926     
4927       * Fixes backup sector getopt (Closes: #232387, #479794).
4928     
4929     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4930
4931 commit 1b2c8ca
4932 Author: Daniel Baumann <mail@daniel-baumann.ch>
4933 Date:   Fri Sep 26 14:34:17 2008 +0200
4934
4935     Applying Debians 12-zero-slot.dpatch by Karl Tomlinson
4936     <karlt@karlt.net> to fix dosfsck zero slot crashes:
4937     
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).
4943     
4944     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4945
4946 commit eec8585
4947 Author: Daniel Baumann <mail@daniel-baumann.ch>
4948 Date:   Fri Sep 26 14:33:54 2008 +0200
4949
4950     Applying Debians 11-memory-efficiency.dpatch from Eero Tamminen
4951     <eero.tamminen@nokia.com> to improve dosfsck memory efficiency:
4952     
4953       * Improves memory efficiency when checking filesystems.
4954     
4955     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4956
4957 commit 06bd669
4958 Author: Daniel Baumann <mail@daniel-baumann.ch>
4959 Date:   Fri Sep 26 14:33:28 2008 +0200
4960
4961     Applying Debians 10-manpage-synopsis.dpatch from Daniel Baumann
4962     <daniel@debian.org> to fix manpage synopsis:
4963     
4964       * List alternative binary names in manpage synopsis (Closes: #284983).
4965     
4966     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4967
4968 commit 42d340d
4969 Author: Daniel Baumann <mail@daniel-baumann.ch>
4970 Date:   Fri Sep 26 14:32:46 2008 +0200
4971
4972     Applying Debians 09-manpage-fat32.dpatch from Daniel Baumann
4973     <daniel@debian.org> to improve mkdosfs manpage:
4974     
4975       * Don't claim that FAT32 is not choosed automatically (Closes:
4976         #414183).
4977     
4978     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4979
4980 commit 0f5ce0d
4981 Author: Daniel Baumann <mail@daniel-baumann.ch>
4982 Date:   Fri Sep 26 14:32:23 2008 +0200
4983
4984     Applying Debians 08-manpage-drop.dpatch from Daniel Baumann
4985     <daniel@debian.org> to improve dosfsck manpage:
4986     
4987       * Don't use confusing word 'drop' when 'delete' is meant (Closes:
4988         #134100).
4989     
4990     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
4991
4992 commit 8ec54dd
4993 Author: Daniel Baumann <mail@daniel-baumann.ch>
4994 Date:   Fri Sep 26 14:31:50 2008 +0200
4995
4996     Applying Debians 07-manpage-spelling.dpatch from Justin Pryzby
4997     <justinpryzby@users.sourceforge.net> to fix mkdosfs manpage typos.
4998     
4999     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5000
5001 commit 4371588
5002 Author: Daniel Baumann <mail@daniel-baumann.ch>
5003 Date:   Fri Sep 26 14:30:31 2008 +0200
5004
5005     Applying Suses dosfstools-2.11_determine-sector-size.patch from Petr
5006     Gajdos <pgajdos@suse.cz> to determine mkdosfs sector size automatically:
5007     
5008       * determine sector size of device automatically or if -S parameter
5009         present, verify, that it's not under physical sector size
5010     
5011     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5012
5013 commit fc92e19
5014 Author: Daniel Baumann <mail@daniel-baumann.ch>
5015 Date:   Fri Sep 26 14:30:03 2008 +0200
5016
5017     Applying Suses dosfstools-2.11-o_excl.patch from Pavol Rusnak
5018     <prusnak@suse.cz> to use O_EXCL in mkdosfs:
5019     
5020       * mkdosfs now opens device with O_EXCL [#238687]
5021     
5022     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5023
5024 commit 3084697
5025 Author: Daniel Baumann <mail@daniel-baumann.ch>
5026 Date:   Fri Sep 26 14:29:36 2008 +0200
5027
5028     Applying Debians 04-unaligned-memory.dpatch from Khalid Aziz
5029     <khalid_aziz@hp.com> to fix dosfsck unaligned memory accesses:
5030     
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).
5034     
5035     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5036
5037 commit 6d5c091
5038 Author: Daniel Baumann <mail@daniel-baumann.ch>
5039 Date:   Fri Sep 26 13:47:40 2008 +0200
5040
5041     Applying Fedoras dosfstools-2.11-label.patch from Jeremy Katz
5042     <katzj@redhat.com> to add dosfslabel (originally by Peter Jones).
5043     
5044     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5045
5046 commit 07ef487
5047 Author: Daniel Baumann <mail@daniel-baumann.ch>
5048 Date:   Fri Sep 26 13:41:14 2008 +0200
5049
5050     Applying Fedoras dosfstools-2.11-fortify.patch from Jakub Jelinek
5051     <jakub@redhat.com> to make it build with -D_FORTIFY_SOURCE=2:
5052     
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.
5056     
5057     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5058
5059 commit 78f9dca
5060 Author: Daniel Baumann <mail@daniel-baumann.ch>
5061 Date:   Fri Sep 26 13:40:47 2008 +0200
5062
5063     Applying Fedoras dosfstools-2.7-argfix.patch (no other information
5064     available).
5065     
5066     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
5067
5068 commit ba6774a (tag: v2.11)
5069 Author: Daniel Baumann <mail@daniel-baumann.ch>
5070 Date:   Thu Jun 26 12:45:36 2008 +0200
5071
5072     Adding version 2.11.
5073     
5074     Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>