72 Commits

Author SHA1 Message Date
Maxim Suhanov
289a48b9cb manpages: Include the security considerations section to the fsck.fat
documentation

Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
2023-10-10 00:34:43 +03:00
Samanta Navarro
fc83a0ba31 Fix typos
Typos found with codespell.

Signed-off-by: Samanta Navarro <ferivoz@riseup.net>
2023-01-16 12:06:00 +00:00
Pali Rohár
6bff769631 manpages: Update mkfs.fat documentation for -s SECTOR-SIZE option
Clarify filesystem sector size.
2022-08-13 12:14:35 +02:00
Florian Warzecha
6319921da6
DOC(fatlabel.8.in): minor spelling typos
Spelling issues were reported by the manpage-l10n project.
2022-02-28 18:45:23 +01:00
Pali Rohár
ed2062b169 Autogenerate release date in manpages 2021-01-29 16:40:56 +01:00
Pali Rohár
fca589beab Update (C) and maintainers 2021-01-29 16:40:20 +01:00
Pali Rohár
2260f801d3 fsck.fat: Check and fix label
Checks the volume label from the root directory entry that is valid and
matches the label stored in boot sector.

Add new command line option -U which consider lowercase volume label as
invalid and allows only uppercase labels. By default lowercase volume
labels are allowed.
2021-01-28 10:40:29 +01:00
Pali Rohár
289fa53b9e manpages: End every sentence by a newline 2021-01-27 02:03:39 +01:00
Pali Rohár
7deb97d719 mkfs.fat: Document that -r and -R specify minimal number (and not exact) 2021-01-27 02:00:33 +01:00
Pali Rohár
82e9730d85 fsck.fat: Add code for fixing first FAT cluster
This patch tries to fix infamous fsck.fat error:

    Both FATs appear to be corrupt. Giving up.

It just fill again FAT media type and sets other bits to one as it is
required by FAT specification. Similar thing is doing also Windows chkdsk
tool.

In the most cases corrupted first FAT cluster is fatal error which
indicates totally corrupted filesystem impossible to repair. So fixing
first FAT cluster is not done by fsck.fat automatically and needs to be
enabled by a new -F option, which forces usage of specified FAT table
(either clean or corrupted).
2021-01-17 19:34:10 +01:00
Pali Rohár
e579a7df89 mkfs.fat: Allow to specify disk geometry via new -g option 2021-01-15 01:06:13 +01:00
Pali Rohár
468aad7545 manpages: Escape dot in fsck.fat manpage at the beginning of the line 2021-01-10 22:16:49 +01:00
felix
9069ba088c fsck.fat: properly check for valid "." and ".." entries
This change makes fsck.fat check whether "." and ".." entries exist in
all non-root directories as the two very first. If those entries are
occupied by some other file, fsck.fat will offer to move them to some
later slot. "." and ".." entries found in any other slots are treated
as ordinary bad-shortname entries. The test case for this situation has
been enabled and verified to perform as expected.

The function drop_file() was also modified so that it does not mark
dropped file clusters as free. This was necessary because otherwise
dropping too-late "." and ".." entries would delete their containing
directory. If deleted entries' clusters are truly no longer used, they
shall be picked up by a later reclamation stage.

Additionally, subdirs() and check_file() were modified not to check
unused directory entries.

Additionally-fixed-by: Dave Odell <dmo2118@gmail.com>
2021-01-10 21:49:30 +01:00
Pali Rohár
25da96e613 mkfs.fat: Relax -D option (BIOS drive number)
Allow to specify also second hard disk (0x81) or second floppy device
(0x01) as -D option = BIOS drive number.
2021-01-03 23:05:01 +01:00
Pali Rohár
bce09401fa manpages: Update mkfs.fat manpage about FAT32 backup boot sector 2021-01-03 22:49:30 +01:00
Pali Rohár
18a05e7ee4 manpages: Fix '. SF' file names 2021-01-03 21:48:14 +01:00
Pali Rohár
7e6d7d336c manpages: Fix switching to previous font style
In troff manpage language previous font style is selected by "\fP"
sequence, not by "\fR". "\fR" selects roman font style.
2021-01-03 21:48:14 +01:00
Pali Rohár
ffa5dfadb5 manpages: Fix formatting of bullets
In troff manpage language bullet is written as "\(bu".
2021-01-03 21:44:20 +01:00
Pali Rohár
bc65dd68a2 manpages: Fix formatting of emphases
To emphasize use italic font style instead of putting word into two
apostrophes. Ascii apostrophe in troff manpage language means "right single
quotation mark", therefore putting word into two apostrophes is fully
wrong.

Also arguments and file names should be formatted in italic.
2021-01-03 21:44:20 +01:00
Pali Rohár
02739897e7 manpages: Fix formatting of hyphens, en and em dashes
In troff manpage language ascii minus is written as "\-", mathematical
minus as "\(mi", hyphen as "-", en-dash as "\(en" and em-dash as "\(em".
2021-01-03 21:44:20 +01:00
Pali Rohár
c85c863128 manpages: Clarify unit of BLOCK-COUNT
BLOCK-COUNT is always in KiB unit independently of the disk sector size,
FAT sector size or FAT cluster size.
2021-01-03 21:30:06 +01:00
Pali Rohár
5199d6847a mkfs.fat: Add a new option --mbr which fills MBR table with one partition
It is needed only for non-removable disks used on Microsoft Windows systems
and only when formatting whole unpartitioned disk.

Also some removable USB flash disks accessed via USB Mass Storage declares
themselves as non-removable and Microsoft Windows systems do not recognize
them without MBR partition table and MBR disk signature.

Because MBR sector and first FAT sector are very similar (starts with
boot code, ends with boot sign 0xAA55) they can live together at one
sector. Moreover location of the MBR partition table overlaps only with the
end of FAT boot code where is just place for the error message, it is
possible to fill (fake) MBR partition table with one partition which refers
to whole disk itself (starts at sector 0 and spans whole disk).

Similar thing is doing mformat (FAT12/16/32 formatting tool) from mtools
project or mkudffs (UDF formatting tool) from udftools project.
2021-01-03 20:12:09 +01:00
Pali Rohár
f8f455b99c fatlabel: Update documentation about DOS codepage 2020-02-14 00:13:17 +01:00
Pali Rohár
8dc8976485 manpages: Update documentation about hidden sectors
Fixes #29
2020-02-14 00:00:27 +01:00
Noé Rubinstein
fc55b63b2c mkfs: document --offset in the man page 2019-02-25 17:51:11 +01:00
Pali Rohár
ca54953476 mkfs.fat: Add support for --codepage option for label and validate it 2018-08-14 14:16:13 +02:00
Pali Rohár
40da1b2c01 fatlabel: Implement proper checks when setting new label
According to Microsoft FAT specification "fatgen103.doc" there are
following restrictions for FAT label stored in root directory:

* DIR_Name[0] may not equal 0x20.

* Lower case characters are not allowed in DIR_Name (what these characters
  are is country specific).

* The following characters are not legal in any bytes of DIR_Name:

  - Values less than 0x20 except for the special case of 0x05 in
    DIR_Name[0]

  - 0x22, 0x2A, 0x2B, 0x2C, 0x2E, 0x2F, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F,
    0x5B, 0x5C, 0x5D, and 0x7C

And another Microsoft "FAT32 Spec (SDA Contribution).pdf" describe:

* DIR_Name[0] cannot equal 0x20 (in other words, names cannot start with a
  space character).
2018-08-14 14:16:13 +02:00
felix
4d01db7c6e fsck.fat: Allow spaces in the middle of SFNs
Also, introduce an -S option (mostly) restoring previous behaviour.
2018-05-18 02:54:44 +02:00
Pali Rohár
c74ca0c04b manpages: Add section DOS CODEPAGES to fatlabel
Table was extracted from the National Language Support (NLS) API Reference:
https://www.microsoft.com/resources/msdn/goglobal/default.mspx?OS=Windows+7

And filtered by codepages supported by GNU libiconv.
2018-05-07 04:52:27 +02:00
Pali Rohár
b665a93d3a fatlabel: Add support for --codepage option
FAT label in both boot sector and root directory is stored according to
current OEM code page. Microsoft Windows system treat FAT label really in
this way. In most cases OEM code page is just 8bit extension of the
printable ASCII, therefore for ASCII-only labels there is no change.

By default OEM code page 850 is used which contains most of the characters
that are also available in ISO-8859-1. Same default which is used by
fsck.fat and mlabel (from mtools project).
2018-05-07 04:52:27 +02:00
Pali Rohár
76c0362458 fsck.fat: Change default DOS codepage to 850
The reason for change is that 850 is more common on Windowes and used by
more regions as 437. Also it contains most of the characters that are also
available in ISO-8859-1. And 850 is also default DOS code page used by
mtools, which is used on Linux.
2018-05-07 04:52:27 +02:00
Pali Rohár
5b702a787c manpages: Add section COMPATIBILITY and BUGS to fatlabel 2018-03-07 04:47:01 +01:00
Andreas Bombe
fe3ada3162 manpages: Remove formatting from NAME sections where it doesn't belong
The .SH NAME sections are supposed to contain just "name \- description"
with no bolding on the name.

Signed-off-by: Andreas Bombe <aeb@debian.org>
2017-10-15 16:26:01 +02:00
Andreas Bombe
0d2d2b28f8 manpages: Clarify rules for volume labels as implemented
Signed-off-by: Andreas Bombe <aeb@debian.org>
2017-10-01 15:18:59 +02:00
Andreas Bombe
86fa0d8b03 manpages: Make SEE ALSO sections conform to conventions
Signed-off-by: Andreas Bombe <aeb@debian.org>
2017-10-01 15:16:12 +02:00
Andreas Bombe
34fd8eb5d5 fatlabel: Add new -r, --reset option
This new option removes the label or generates a new serial number if in
volume ID mode.

Signed-off-by: Andreas Bombe <aeb@debian.org>
2017-10-01 03:04:00 +02:00
Andreas Bombe
7ddcf9bc9d fatlabel: Implement volume ID mode
When given the new -i or --volume-id option, fatlabel will display or
change the volume ID (serial number) instead of the volume label. The ID
is displayed as an 8 digit hexadecimal number, when changing it must
also be given as a hexadecimal number that fits within 32 bits.

Fixes #52

Signed-off-by: Andreas Bombe <aeb@debian.org>
2017-09-25 01:21:23 +02:00
Andreas Bombe
32b3bcea5a mkfs, fsck: Add --variant=TYPE command line option
TYPE can be 'standard' or 'atari' (case insensitive) to select the
desired mode rather than having to toggle with -A.

Signed-off-by: Andreas Bombe <aeb@debian.org>
2017-06-28 15:17:33 +02:00
Andreas Bombe
6fc9004658 manpages: Rework the intro of the mkfs man page
Acknowledge that image files can be used in place of device files.
Remove mentions of "under Linux" since it has been portable for a while.

Signed-off-by: Andreas Bombe <aeb@debian.org>
2017-05-30 21:26:44 +02:00
Andreas Bombe
bbbd0771cd manpages, configure.ac: Correct description of Atari format selection
The -A option doesn't turn on (or turn off) Atari format selection, it
toggles it with every occurrence. Change wording in the man pages to
reflect that.

Also mention that automatic selection can happen only on 68k Atari Linux
in the man pages and the --enable-atari-check option help in
configure.ac.

Signed-off-by: Andreas Bombe <aeb@debian.org>
2017-04-21 20:47:32 +02:00
Andreas Bombe
2af848fad2 fsck: Switch to getopt_long() option parser and add --help option
Signed-off-by: Andreas Bombe <aeb@debian.org>
2017-04-03 20:56:43 +02:00
Andreas Bombe
86c7acd970 man fsck: Document the -c option
Signed-off-by: Andreas Bombe <aeb@debian.org>
2016-02-17 15:06:56 +01:00
Andreas Bombe
bf6f1426d1 mkfs man: Note that sector sizes > 4096 are non-standard
Signed-off-by: Andreas Bombe <aeb@debian.org>
2016-01-27 15:34:18 +01:00
Andreas Bombe
2b255e6e29 Configure option for legacy names symlinks
The symlinks from the old names (mkdosfs, dosfsck, etc.) are now only
created on "make install" when the --enable-compat-symlinks option was
given to configure.

Signed-off-by: Andreas Bombe <aeb@debian.org>
2015-06-03 02:53:05 +02:00
Andreas Bombe
0643db77d8 Convert build system to autoconf/automake
In preparation for fixing the horribly outdated and broken device
checking - which will likely involve using additional libraries like
libblkid - as well as making this package portable to other operating
systems, the build system is now the tried and true autoconf/automake
combination which should make both goals a little more straightforward.

The release version number and date are now in configure.ac and
substituted by configure where they are needed. Now it is no longer
necessary to change the number in multiple places for a release and the
man pages get the number substituted directly into them, making the
update-version.sh script and the VERSION file obsolete.

The English man pages are moved back up one directory to mark their
status as the master copy for all translations. At the moment the po4a
translation infrastructure is defunct since it isn't integrated into
the automake environment yet. So far it hasn't been used, so that is
not an actual regression.

The date in the man pages is not automatically updated anymore. This is
as it should be, since the date is supposed to signify the time of the
last nontrivial change and not the release date of the software.

Signed-off-by: Andreas Bombe <aeb@debian.org>
2015-06-03 02:52:11 +02:00
Andreas Bombe
85022fe3d5 Releasing version 3.0.28.
Signed-off-by: Andreas Bombe <aeb@debian.org>
2015-05-16 02:56:17 +02:00
Andreas Bombe
ad1342eedf manpages: Mark MT and ME tags as untranslated for po4a
Signed-off-by: Andreas Bombe <aeb@debian.org>
2015-05-16 02:11:11 +02:00
Andreas Bombe
3eaca681f9 manpages: Remove obsolete information about Linux FAT support
Signed-off-by: Andreas Bombe <aeb@debian.org>
2015-04-20 23:34:23 +02:00
Andreas Bombe
a5e34def23 manpages: Convert the rest of argument placeholders to upper case
Signed-off-by: Andreas Bombe <aeb@debian.org>
2015-04-20 23:34:08 +02:00
Andreas Bombe
2303765736 manpages: Fix formatting
Make the manpages conform to the rules for groff sources. First,
eliminate empty lines because these create vertical spaces where it
isn't desired. Man page sources should not contain empty lines. Second,
put a line break between sentences in a paragraph. A period is
recognized and formatted as a full stop period only when a line break
comes right after it.

Signed-off-by: Andreas Bombe <aeb@debian.org>
2015-04-16 22:51:20 +02:00