]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: add support for UBI superblock
authorRafał Miłecki <rafal@milecki.pl>
Wed, 2 Aug 2017 12:14:18 +0000 (14:14 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 3 Aug 2017 12:11:21 +0000 (14:11 +0200)
commita6b1ec864a3eb1d27a8781fe99d65e4e6ac05e5b
tree941624a9a450b729ddf8ad4265dd50cabf6d78bc
parent87c26ce5b689abe1b52181f98ef3c9eb1b1a5165
libblkid: add support for UBI superblock

UBI is a volume management system that can be used on a raw flash
partition for providing multiple logical volumes. 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.

In other words: UBI can be used on MTD partition (e.g. /dev/mtdblock0)
while ubifs can be used on UBI volume (e.g. /dev/ubi0_0).

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>
libblkid/src/Makemodule.am
libblkid/src/superblocks/superblocks.c
libblkid/src/superblocks/superblocks.h
libblkid/src/superblocks/ubi.c [new file with mode: 0644]
tests/expected/blkid/low-probe-ubi [new file with mode: 0644]
tests/ts/blkid/images-fs/ubi.img.xz [new file with mode: 0644]