8 Commits

Author SHA1 Message Date
Pali Rohár
5e936c95ff mkfs.fat: Remove dependency on systemd/udev
There is no need that mkfs.fat depends on systemd. It uses it only for
reading additional information about block device.

This patch replace systemd/udev dependency code by reading those additional
information about block device directly from sysfs.

So no functionality of mkfs.fat is lost or removed.
2021-01-03 22:18:21 +01:00
Pali Rohár
b657ede4ab charconv: Add autogen.sh script
AM_ICONV macro depends on gettext installation. Unfortunately autoreconf is
not able to install config.rpath file so do it manually in autogen.sh.

See reported bug:
https://lists.gnu.org/archive/html/bug-gettext/2011-10/msg00012.html
2019-06-23 10:47:44 +02:00
Andreas Bombe
76672953a0 Add testsuite foundations
Add testsuite on the basis of the automake framework. As a start, three
tests for basic mkfs functionality compare mkfs generated images against
references images.

Signed-off-by: Andreas Bombe <aeb@debian.org>
2016-09-07 03:52:13 +02:00
Andreas Bombe
b96acb2213 Document ./configure --enable-compat-symlinks in README
Signed-off-by: Andreas Bombe <aeb@debian.org>
2016-02-17 20:51:53 +01:00
Andreas Bombe
254f8abb28 Remove use of libblkid again
It appears libblkid is not as widely available as presumed, since some
platforms only have the original libblkid included in e2fsprogs which
lacks the needed functionality. This commit removes the requirement and
use of libblkid.

As a replacement, blkdev.c from util-linux is included, which offers the
required basic functionality in a portable way.

Signed-off-by: Andreas Bombe <aeb@debian.org>
2015-11-26 23:33:02 +01:00
Andreas Bombe
5b9a88dfb5 mkfs.fat: Complete overhaul of device probing
The device probing in mkfs.fat is used to get device parameters where
needed and also to decide whether to refuse overwriting a device due to
possible user error. This code has suffered severe bitrot and is highly
Linux specific. Highlights include using hardcoded major/minor device
numbers to classify a device, and using 8 bits major/minor numbers that
have become obsolete a long time ago and thus often misidentifying a
device.

The overhauled implementation is now in src/device_info.c and makes use
of libudev (optional, recommended) and libblkid (required) to probe the
device and where Linux ioctls are required it provides fallbacks and
does not attempt to call these on non-Linux systems. The FAT parameter
selection has been unified and simplified in the process.

A new executable testdevinfo has been added that gets built but not
automatically installed. It takes one file name, uses the same probing
as mkfs.fat would with verbose messages enabled and displays the
results.

Signed-off-by: Andreas Bombe <aeb@debian.org>
2015-11-05 21:31:49 +01:00
Andreas Bombe
2b1c4d1025 Add README.md, remove Markdown formatting from README
Signed-off-by: Andreas Bombe <aeb@debian.org>
2015-06-03 03:33:58 +02:00
Andreas Bombe
b720acc4b6 Add simple README in Markdown format
Signed-off-by: Andreas Bombe <aeb@debian.org>
2015-06-03 03:30:20 +02:00