| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
exFAT became very popular over last years and also well supported with
Linux kernel driver and macOS support. It's commonly used for USB
drivers. Port a simple support for it from util-linux / libblkid.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
| |
Improve error handling and fix a resource leak inside an error path.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
| |
open() returns -1 on error, not 0 (stdin).
Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Copying device name into a fixed-length buffer is problematic as
the name can be longer than the buffer, resulting in subsequent fields
getting corrupted and potentially even worse things.
Drop strcpy of device name and use of the copied value as it is known
anyway.
Before this fix:
/dev/mapper/owrt--volumes--e093cc66-rw_test: UUID="c66-rw_test" LABEL="test" VERSION="1.14" TYPE="f2fs"
After this fix:
/dev/mapper/owrt--volumes--e093cc66-rw_test: UUID="5eda3e52-3427-493a-a6d6-ffdb5a5836fd" LABEL="test" VERSION="1.14" TYPE="f2fs"
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
|
|
|
|
|
| |
This stub will allow porting more upstream code without commenting out
calls and them unused variables. This will simplify maintenance.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows reading multiple chunks of block device data and operating
on them simultaneously. Previous implementation was using a single
buffer (except for reading more data than allocated size) and subsequent
reads were corrupting memory of previously returned buffers.
This fixes e.g. problem with reading NTFS UUID and validating VFAT
signature.
Implementation is based on original libblkid code which handles it
similarly. Buffers are put on probe internal list and freed when
releasing a probe struct.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
| |
Currently set_utf8label support is missing. Adds a stripped down version of encode.c file from original libblkid and adds the function to libblkid-tiny.c.
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Its copied from the util-linux project and its libblkid. Call to the
blkid_probe_set_utf8label was commented out due to libblkid-tiny not
supporting it yet.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: John Crispin <john@phrozen.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Detecting UBI superblock may be useful for tools wanting to simplify or
automate attaching UBI. Please note it's not directly related to the
ubifs support which is just a filesystem working on top of UBI volume.
This patch adds simple code reading UBI version and unique number and
setting it in the blkid_probe.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
|
|
|
|
|
|
|
|
|
|
|
| |
When blkid_probe_set_uuid_as() is invoked with a non-NULL name parameter
then the name parameter denotes the kind of UUID (like "EXT_JOURNAL") not
the name of the file system.
Only copy the UUID value to the probe uuid member if the given name is
either NULL or "UUID".
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
|
|
|
| |
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
|
|
|
|
|
| |
This updates the relevant source files to util-linux changeset
4419ffb9eff5801fdbd385a4a6199b3877f802ad.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This only adds the magic for btrfs to show btrfs volumes in
block detect.
In order to properly support btrfs with more than one device and avoid
trying to mount the same device group once for each instance we have to
make sure that only one device per group will be mounted (btrfs then
automatically detects all other devices of the group).
For unmounting, the opposite should be applied: umount if called for
any of the devices in a mounted device group, unmount the filesystem.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
|
|
|
|
|
|
| |
We already had ubifs idinfo, so only /dev/ubiN_M support was missing.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
|
|
|
|
| |
Signed-off-by: John Crispin <blogic@openwrt.org>
|
|
Signed-off-by: John Crispin <blogic@openwrt.org>
|