]> err.no Git - util-linux/log
util-linux
15 years agobuild-sys: detect if volatile is available
Guillem Jover [Thu, 8 Oct 2009 11:40:07 +0000 (13:40 +0200)]
build-sys: detect if volatile is available

Do not defined volatile away on non-Linux systems, detect its presence
using AC_C_VOLATILE instead.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
15 years agobuild-sys: detect if const is available
Guillem Jover [Thu, 8 Oct 2009 11:40:06 +0000 (13:40 +0200)]
build-sys: detect if const is available

Some systems define __STDC__ and do not have a working const, some do
not define the macro but do have a working const. Use AC_C_CONST to
check for its presence.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
15 years agolibblkid: fix warning message in mkfs sample
Karel Zak [Wed, 7 Oct 2009 22:40:34 +0000 (00:40 +0200)]
libblkid: fix warning message in mkfs sample

15 years agonamei: gater information about / (root)
Karel Zak [Tue, 6 Oct 2009 23:37:57 +0000 (01:37 +0200)]
namei: gater information about / (root)

$ ll -d /foo
drwxr-xr-x 2 kzak kzak 4096 2009-10-07 01:23 /foo

old version:

$ namei -l /foo
f: /foo
Segmentation fault

new version:

$ namei -l /foo
f: /foo
drwxr-xr-x root root /
drwxr-xr-x kzak kzak foo

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agonamei: fix alone symlink evaluation
Karel Zak [Tue, 6 Oct 2009 23:34:36 +0000 (01:34 +0200)]
namei: fix alone symlink evaluation

$ mkdir aaa
$ ln -s aaa mylink

old version:

$ namei mylink
namei: could not stat 'mylink/aaa': No such file or directory

new version:

        $ namei mylink
f: mylink
 l mylink -> aaa
   d aaa

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agowipefs: fix coding style
Karel Zak [Tue, 6 Oct 2009 22:04:08 +0000 (00:04 +0200)]
wipefs: fix coding style

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofallocate: check for ERANGE errors
Karel Zak [Tue, 6 Oct 2009 21:49:56 +0000 (23:49 +0200)]
fallocate: check for ERANGE errors

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agowipefs: new command
Karel Zak [Mon, 5 Oct 2009 11:14:07 +0000 (13:14 +0200)]
wipefs: new command

 # ./wipefs /dev/sda4
 offset               type
 ----------------------------------------------------------------
 0xff6                swap   [other]
                      UUID:  da6c54ea-77d9-470a-82f1-e793fd5d9131

 0x36                 vfat   [filesystem]
                      UUID:  497F-3013

 # ./wipefs --offset 0x36 /dev/sda4
 8 bytes [46 41 54 31 32 20 20 20] erased at offset 0x36 (vfat)

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: add BFS libblkid regression test
Karel Zak [Tue, 6 Oct 2009 20:22:39 +0000 (22:22 +0200)]
tests: add BFS libblkid regression test

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add a probe for bfs
Christoph Hellwig [Tue, 6 Oct 2009 18:10:31 +0000 (14:10 -0400)]
libblkid: add a probe for bfs

blkid is currently missing a probe for the bfs filesystem, leading
to a blkid-enable xfsprogs failing xfsqa testcase 032. This patch adds
a trivial probe for the magic.

Signed-off-by: Christoph Hellwig <hch@lst.de>
15 years agobuild-sys: fix BUILD_PIVOT_ROOT condition
Karel Zak [Tue, 6 Oct 2009 19:57:48 +0000 (21:57 +0200)]
build-sys: fix BUILD_PIVOT_ROOT condition

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: cleanup --disable-{fallocate,pivot_root,unshare}
Karel Zak [Tue, 6 Oct 2009 10:43:22 +0000 (12:43 +0200)]
build-sys: cleanup --disable-{fallocate,pivot_root,unshare}

 * add --disable-fallocate
 * add --disable-pivot_root
 * cleanup --disable-unshare

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agounshare: new command
Mikhail Gusarov [Sat, 3 Oct 2009 19:42:08 +0000 (02:42 +0700)]
unshare: new command

New utility allows to run process with separate mount, UTC, IPC or
network namespaces.

[kzak@redhat.com: - some cosmetic changes in usage() and err() usage
                  - move "if BUILD_UNSHARE" to separate place in Makefile.am
                  - add unshare to .gitignore]

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdformat: fix memory leak in verify_disk()
Cristian Rodríguez [Sun, 4 Oct 2009 20:08:49 +0000 (16:08 -0400)]
fdformat: fix memory leak in verify_disk()

Signed-off-by: Cristian Rodríguez <crrodriguez@opensuse.org>
15 years agolibblkid: fix buffer usage in FAT prober
Karel Zak [Tue, 6 Oct 2009 07:17:06 +0000 (09:17 +0200)]
libblkid: fix buffer usage in FAT prober

The blkid_probe_get_buffer() function returns buffer that could be
overwritten in the next blkid_probe_get_buffer() call. It means that
we have to save FAT super block to the temporary buffer if we want to
call blkid_probe_get_buffer() for directory entries or fsinfo.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: fix FAT super block definition
Lawrence Rust [Mon, 5 Oct 2009 13:42:13 +0000 (15:42 +0200)]
libblkid: fix FAT super block definition

Signed-off-by: Lawrence Rust <lawrence@softsystem.co.uk>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofindfs: fix typo in findfs.8
Karel Zak [Mon, 5 Oct 2009 10:31:03 +0000 (12:31 +0200)]
findfs: fix typo in findfs.8

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoMerge branch 'for_upstream' of git://git.kernel.org/pub/scm/utils/util-linux-ng/tytso...
Karel Zak [Mon, 5 Oct 2009 13:23:12 +0000 (15:23 +0200)]
Merge branch 'for_upstream' of git://git.kernel.org/pub/scm/utils/util-linux-ng/tytso/util-linux-ng

15 years agolib: fix file descriptor leak in is_mounted()
Theodore Ts'o [Sat, 3 Oct 2009 16:50:06 +0000 (12:50 -0400)]
lib: fix file descriptor leak in is_mounted()

Remove an extraneous fopen() that leaks memory and a file descriptor.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
15 years agolibblkid: fix blkid_do_probe() to work properly with chains
Karel Zak [Thu, 1 Oct 2009 22:49:07 +0000 (00:49 +0200)]
libblkid: fix blkid_do_probe() to work properly with chains

The blkid_do_probe() always switched to the new chain -- that's bad, we
have to try all probing methods in the chain.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add blkit_[un]ref() to TODO
Karel Zak [Thu, 1 Oct 2009 21:47:49 +0000 (23:47 +0200)]
libblkid: add blkit_[un]ref() to TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: fix segfault in blkid_do_probe()
Karel Zak [Thu, 1 Oct 2009 20:49:44 +0000 (22:49 +0200)]
libblkid: fix segfault in blkid_do_probe()

This:
pr->cur_chain += sizeof(struct blkid_chain);

is nonsense of course, there should be a cast to (char *) or so.

It seems that the most robust solution is to avoid this game with
pointers and use chain->driver-id which is useful as array index.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: fix non-magic FAT detection
Karel Zak [Thu, 1 Oct 2009 13:14:48 +0000 (15:14 +0200)]
libblkid: fix non-magic FAT detection

On Wed, Sep 30, 2009 at 03:15:41PM +0200, Lawrence Rust wrote:
> The problem is with shlibs/blkid/src/probers/vfat.c.  At the end of
> this file  the struct blkid_idinfo is declared with some magic
> search strings.   In particular, 2 patterns are defined to match the
> single byte jmp/jxx opcodes at the start of a DOS boot sector.
> Because the partition was once formatted as a bootable DOS
> partition it matches these patterns and consequently the function
> probe_vfat is called.  For these simple pattern matches the function
> probe_fat_nomagic is called to filter out false positives.
>
> In normal circumstances only MSDOS 2 and earlier floppies should be
> detected by this function.  A very important feature of these disks
> is the boot signature - bytes 0x55, 0xaa at the end of the 1st
> sector which indicate to the BIOS that  the disk is bootable.  All
> MSDOS floppies have these bytes but the function probe_fat_nomagic
> doesn't check for them.

Note that the msdos/vfat superblock comments has been suggested by
Lawrence.

Reported-by: Lawrence Rust <lawrence@softsystem.co.uk>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: more verbose "mount: only root can do that" message
Karel Zak [Wed, 30 Sep 2009 14:54:17 +0000 (16:54 +0200)]
mount: more verbose "mount: only root can do that" message

> [chroot-i486] root:/$ whoami
> root
> [chroot-i486] root:/$ mkdir -p /dev1
> [chroot-i486] root:/$ mount --move /dev /dev1
> mount: only root can do that

Reported-by: Gilles Espinasse <g.esp@free.fr>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: add --disable-makeinstall-setuid
Karel Zak [Wed, 30 Sep 2009 14:51:20 +0000 (16:51 +0200)]
build-sys: add --disable-makeinstall-setuid

.. to disable "chmod 4755" for mount and umount.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolib: fix lib/Makefile.am (remove pttype.c)
Karel Zak [Tue, 29 Sep 2009 23:14:26 +0000 (01:14 +0200)]
lib: fix lib/Makefile.am (remove pttype.c)

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: use blkid_new_probe_from_filename() in docs
Karel Zak [Tue, 29 Sep 2009 19:58:52 +0000 (21:58 +0200)]
libblkid: use blkid_new_probe_from_filename() in docs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add blkid_new_probe_from_filename()
Karel Zak [Tue, 29 Sep 2009 19:46:30 +0000 (21:46 +0200)]
libblkid: add blkid_new_probe_from_filename()

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add support for SBMAGIC and SBMAGIC_OFFSET
Karel Zak [Tue, 29 Sep 2009 13:59:34 +0000 (15:59 +0200)]
libblkid: add support for SBMAGIC and SBMAGIC_OFFSET

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomkfs.cramfs: fix gcc warning (incompatible pointer type)
Karel Zak [Tue, 29 Sep 2009 11:54:58 +0000 (13:54 +0200)]
mkfs.cramfs: fix gcc warning (incompatible pointer type)

mkfs.cramfs.c: In function ‘parse_directory’:
mkfs.cramfs.c:310: warning: passing argument 4 of ‘scandir’ from incompatible pointer type

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: fix gcc warning (warn_unused_result)
Karel Zak [Tue, 29 Sep 2009 11:48:16 +0000 (13:48 +0200)]
libblkid: fix gcc warning (warn_unused_result)

save.c: In function ‘blkid_flush_cache’:
save.c:146: warning: ignoring return value of ‘link’, declared with
attribute warn_unused_result

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolib: remove pttype.c
Karel Zak [Tue, 29 Sep 2009 11:28:12 +0000 (13:28 +0200)]
lib: remove pttype.c

The libblkid library supports partition tables detection now.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: fix the default cache file path
Karel Zak [Tue, 29 Sep 2009 09:08:32 +0000 (11:08 +0200)]
libblkid: fix the default cache file path

The blkid_get_cache_filename() can returns BLKID_CONFIG_FILE instead
BLKID_CACHE_FILE. Yeah, pretty stupid typo.

Fortunately, this brown-paper-bag bug is invisible in almost all cases,
because the default path is returned by blkid_read_config().  The bug
can be visible only when blkid_read_config() returns NULL -- it means
on parses or malloc error.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomkswap: use libblkid to detect PT
Karel Zak [Fri, 25 Sep 2009 14:27:27 +0000 (16:27 +0200)]
mkswap: use libblkid to detect PT

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agodocs: update TODO
Karel Zak [Fri, 25 Sep 2009 13:41:53 +0000 (15:41 +0200)]
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: don't scan private /dev/.udev directory
Karel Zak [Fri, 25 Sep 2009 13:33:07 +0000 (15:33 +0200)]
libblkid: don't scan private /dev/.udev directory

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: use fstatat(), improve readdir() usage
Karel Zak [Fri, 25 Sep 2009 12:40:23 +0000 (14:40 +0200)]
libblkid: use fstatat(), improve readdir() usage

 * fix possible memory leak in ubi_probe_all()

 * use dirent->d_type if available (this is tricky, because d_type
   is not supported on all systems and some filesystems returns
   DT_UNKNOWN). The dirent->d_type allows to avoid unnecessary stat()
   calls.

 * use fstatat() if available -- allows to avoid malloc() and
   sprintf("%s/%s", dirname, dirent->d_name)

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: cleanup blkid_probe_set_device()
Karel Zak [Thu, 24 Sep 2009 13:48:13 +0000 (15:48 +0200)]
libblkid: cleanup blkid_probe_set_device()

It does not make sense to use libblkid for anything other than block
devices, char devices (UBI only) and regular files.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: add UBIFS test image to blkid test suite
Corentin Chary [Mon, 24 Aug 2009 11:11:56 +0000 (13:11 +0200)]
tests: add UBIFS test image to blkid test suite

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add UBIFS support
Corentin Chary [Mon, 24 Aug 2009 11:11:55 +0000 (13:11 +0200)]
libblkid: add UBIFS support

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add UBI volume support
Corentin Chary [Mon, 24 Aug 2009 11:11:54 +0000 (13:11 +0200)]
libblkid: add UBI volume support

Probe UBI volume under /dev (or /devfs, /devices).
ubi_ctrl skip is hardcoded, maybe we should find a
cleaner way to do that. Also change probe.c to handle
char devices.

[kzak@redhat.com: - rebase the patch to the current HEAD]

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoblkid: allow to use -s <TAG> for low-level probing (-p mode)
Karel Zak [Thu, 24 Sep 2009 12:44:47 +0000 (14:44 +0200)]
blkid: allow to use -s <TAG> for low-level probing (-p mode)

 # blkid -p -s TYPE /dev/sda3
 /dev/sda3: TYPE="swap"

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: add blkid regression tests for ISO9660
Karel Zak [Thu, 24 Sep 2009 08:46:25 +0000 (10:46 +0200)]
tests: add blkid regression tests for ISO9660

Note that Rock-Ridge detection is not supported yet.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add LVM topology support (for old kernels)
Karel Zak [Wed, 23 Sep 2009 19:27:01 +0000 (21:27 +0200)]
libblkid: add LVM topology support (for old kernels)

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: minor changes to dm topology code
Karel Zak [Wed, 23 Sep 2009 19:23:21 +0000 (21:23 +0200)]
libblkid: minor changes to dm topology code

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: cleanup topology fallback
Karel Zak [Wed, 23 Sep 2009 09:28:28 +0000 (11:28 +0200)]
libblkid: cleanup topology fallback

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: announce Joliet extension
Maxim Levitsky [Wed, 23 Sep 2009 07:47:49 +0000 (09:47 +0200)]
libblkid: announce Joliet extension

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofallocate: new command
Karel Zak [Tue, 18 Aug 2009 11:33:27 +0000 (13:33 +0200)]
fallocate: new command

The fallocate(1) utility is used to preallocate blocks to a file.

This can be useful for virtual images, database files, testing, etc.
Normally we'd hope that various tools will start using preallocation
internally, but until then such a utility may be useful, and could be
scripted as well.

The original Eric's version is available at:
http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/2490

This version:
 - checks for fallocate glibc function and kernel syscall
 - does not provide a fallback and does not call posix_fallocate()
 - adds long options
 - uses err.h for errro messages
 - adds NLS support
 - cleanups man page

Co-Author: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: document changed semantics of tmpfs size option in mount.8
kevin.granade@gmail.com [Mon, 7 Sep 2009 23:16:55 +0000 (18:16 -0500)]
mount: document changed semantics of tmpfs size option in mount.8

Linux kernel commit 818db35992c249dc32c1d86daf7d533fb0952f5d fixed a
problem where invoking mount -t tmpfs with a size argument smaler than the
size of one page caused the limits on the size of a tmpfs to not operate.
The commit also caused the number supplied by the size option to be
rounded up to the  nearest page size instead of down.  This alters the man
page to match the behavior of the kernel in this instance.

Signed-off-by: Kevin Granade <kevin.granade@gmail.com>
15 years agolibblkid: prefer ISO9660 PVD Label to Joliet Label
Karel Zak [Tue, 22 Sep 2009 12:58:34 +0000 (14:58 +0200)]
libblkid: prefer ISO9660 PVD Label to Joliet Label

The old good libvolume_id had the same behavior.

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: trim tailing whitespace from unicode LABELs
Karel Zak [Tue, 22 Sep 2009 10:32:34 +0000 (12:32 +0200)]
libblkid: trim tailing whitespace from unicode LABELs

old version:
$ ./blkid -o udev -p iso-joliet.img
ID_FS_LABEL=ThisIsLabel
ID_FS_LABEL_ENC=ThisIsLabel\x20\x20\x20\x20\x20
ID_FS_VERSION=Joliet\x20Extension
ID_FS_TYPE=iso9660
ID_FS_USAGE=filesystem

new version:
$ ./blkid -o udev -p iso-joliet.img
ID_FS_LABEL=ThisIsLabel
ID_FS_LABEL_ENC=ThisIsLabel
ID_FS_VERSION=Joliet\x20Extension
ID_FS_TYPE=iso9660
ID_FS_USAGE=filesystem

Reported-by: Maxim Levitsky <maximlevitsky@gmail.com>
Addresses-Ubuntu-Bug: #432215
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: fix blkid_probe_set_utf8label() call for Joliet
Karel Zak [Tue, 22 Sep 2009 09:53:07 +0000 (11:53 +0200)]
libblkid: fix blkid_probe_set_utf8label() call for Joliet

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: minor changes to samples
Karel Zak [Mon, 21 Sep 2009 13:39:00 +0000 (15:39 +0200)]
libblkid: minor changes to samples

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add EVMS topology support (for old kernels)
Karel Zak [Mon, 21 Sep 2009 13:32:09 +0000 (15:32 +0200)]
libblkid: add EVMS topology support (for old kernels)

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add DM topology support (for old kernels)
Karel Zak [Mon, 21 Sep 2009 11:41:10 +0000 (13:41 +0200)]
libblkid: add DM topology support (for old kernels)

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add MD topology support (for old kernels)
Karel Zak [Mon, 21 Sep 2009 09:52:26 +0000 (11:52 +0200)]
libblkid: add MD topology support (for old kernels)

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: cosmetic change in topology sample
Karel Zak [Fri, 18 Sep 2009 11:21:19 +0000 (13:21 +0200)]
libblkid: cosmetic change in topology sample

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: fix probing for binary interface
Karel Zak [Fri, 18 Sep 2009 11:18:31 +0000 (13:18 +0200)]
libblkid: fix probing for binary interface

The probing for binary interface has to always start from scratch.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add private blkid_topology_set_*() functions
Karel Zak [Fri, 18 Sep 2009 11:07:52 +0000 (13:07 +0200)]
libblkid: add private blkid_topology_set_*() functions

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add blkid_driver_has_major()
Karel Zak [Fri, 18 Sep 2009 11:07:05 +0000 (13:07 +0200)]
libblkid: add blkid_driver_has_major()

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: fix blkid_devno_to_wholedisk()
Karel Zak [Fri, 18 Sep 2009 08:48:32 +0000 (10:48 +0200)]
libblkid: fix blkid_devno_to_wholedisk()

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: allows more probing methods for topology chain
Karel Zak [Fri, 18 Sep 2009 08:19:59 +0000 (10:19 +0200)]
libblkid: allows more probing methods for topology chain

This patch moves the current topology code to the separate sysfs.c
file.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: minor fix in topology sample
Karel Zak [Thu, 17 Sep 2009 22:06:17 +0000 (00:06 +0200)]
libblkid: minor fix in topology sample

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: fix topology information values
Eric Sandeen [Thu, 17 Sep 2009 21:56:00 +0000 (16:56 -0500)]
libblkid: fix topology information values

Looks like the topology values returned are being
inflated by x 512, but the kernel reports them in bytes;
no need for the multiplication, just return the value as-is.

With the patch it all matches:

# mdadm -D /dev/md0  | grep Chunk
     Chunk Size : 64K
# cat /sys/devices/virtual/block/md0/queue/minimum_io_size
65536
# blkid/samples/topology /dev/md0
----- NAME=value interface (values: 0):
MINIMUM_IO_SIZE = 65536
OPTIMAL_IO_SIZE = 131072
----- binary interface:
alignment offset : 0
minimum io size  : 65536
optimal io size  : 131072

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
15 years agomount: fix mount.8, xfs attr2 is enabled by default
Karel Zak [Thu, 17 Sep 2009 15:29:40 +0000 (17:29 +0200)]
mount: fix mount.8, xfs attr2 is enabled by default

Address-Red-Hat-Bug: #510845
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add blkid_partition_get_type_string()
Karel Zak [Thu, 17 Sep 2009 15:01:19 +0000 (17:01 +0200)]
libblkid: add blkid_partition_get_type_string()

.. because for example Mac and GPT don't use numbers, but strings or
UUIDs as partition type identifier.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: fix reference to samba-client in mount.8
Karel Zak [Thu, 17 Sep 2009 09:13:07 +0000 (11:13 +0200)]
mount: fix reference to samba-client in mount.8

Address-Red-Hat-Bug: #521367
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agopo: update POTFILES.in
Karel Zak [Wed, 16 Sep 2009 19:58:56 +0000 (21:58 +0200)]
po: update POTFILES.in

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: add partitions probing test
Karel Zak [Fri, 11 Sep 2009 11:15:18 +0000 (13:15 +0200)]
tests: add partitions probing test

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: rename blkid/images to blkid/images-fs
Karel Zak [Fri, 11 Sep 2009 10:20:28 +0000 (12:20 +0200)]
tests: rename blkid/images to blkid/images-fs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: gtkdocize (API docs generated by gtk-docs)
Karel Zak [Wed, 16 Sep 2009 19:25:38 +0000 (21:25 +0200)]
libblkid: gtkdocize (API docs generated by gtk-docs)

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add missing comments
Karel Zak [Wed, 16 Sep 2009 14:42:12 +0000 (16:42 +0200)]
libblkid: add missing comments

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add mkfs sample
Karel Zak [Wed, 16 Sep 2009 14:27:32 +0000 (16:27 +0200)]
libblkid: add mkfs sample

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add partitions sample
Karel Zak [Wed, 16 Sep 2009 14:24:14 +0000 (16:24 +0200)]
libblkid: add partitions sample

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add EFI GPT partitions support
Karel Zak [Wed, 16 Sep 2009 14:21:17 +0000 (16:21 +0200)]
libblkid: add EFI GPT partitions support

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolib: add a generic crc32()
Karel Zak [Wed, 16 Sep 2009 14:17:41 +0000 (16:17 +0200)]
lib: add a generic crc32()

This is public domain implementation, based on static crc32_table[].
This implementation is used on may places (libparted, FreeBSD kernel,
PostgreSQL, ...). The Linux kernel uses on-the-fly generated and
allocated tables. That's useless in shared libraries.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add MINIX partitions support
Karel Zak [Wed, 16 Sep 2009 14:12:29 +0000 (16:12 +0200)]
libblkid: add MINIX partitions support

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add MS-DOS partitions support
Karel Zak [Wed, 16 Sep 2009 14:10:43 +0000 (16:10 +0200)]
libblkid: add MS-DOS partitions support

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add MAC partitions support
Karel Zak [Wed, 16 Sep 2009 14:08:37 +0000 (16:08 +0200)]
libblkid: add MAC partitions support

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add SGI partitions support
Karel Zak [Wed, 16 Sep 2009 14:07:16 +0000 (16:07 +0200)]
libblkid: add SGI partitions support

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add SUN partitions support
Karel Zak [Wed, 16 Sep 2009 14:06:07 +0000 (16:06 +0200)]
libblkid: add SUN partitions support

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add SOLARIS-X86 partitions support
Karel Zak [Wed, 16 Sep 2009 14:04:38 +0000 (16:04 +0200)]
libblkid: add SOLARIS-X86 partitions support

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add UNIXWARE partitions support
Karel Zak [Wed, 16 Sep 2009 14:02:28 +0000 (16:02 +0200)]
libblkid: add UNIXWARE partitions support

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add BSD partitions support
Karel Zak [Wed, 16 Sep 2009 13:57:45 +0000 (15:57 +0200)]
libblkid: add BSD partitions support

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add AIX partitions support
Karel Zak [Wed, 16 Sep 2009 13:55:58 +0000 (15:55 +0200)]
libblkid: add AIX partitions support

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add partitions filter routines
Karel Zak [Wed, 16 Sep 2009 13:49:44 +0000 (15:49 +0200)]
libblkid: add partitions filter routines

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add partitions parsing support
Karel Zak [Wed, 16 Sep 2009 13:39:14 +0000 (15:39 +0200)]
libblkid: add partitions parsing support

This patch is large, but not invasive. There is a new code only.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add samples/topology.c
Karel Zak [Thu, 30 Jul 2009 08:44:08 +0000 (10:44 +0200)]
libblkid: add samples/topology.c

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add topology support
Karel Zak [Wed, 16 Sep 2009 12:40:41 +0000 (14:40 +0200)]
libblkid: add topology support

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add blkid_devno_to_wholedisk()
Karel Zak [Wed, 16 Sep 2009 09:37:08 +0000 (11:37 +0200)]
libblkid: add blkid_devno_to_wholedisk()

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: use the new API in whole u-l-ng
Karel Zak [Mon, 14 Sep 2009 21:33:01 +0000 (23:33 +0200)]
libblkid: use the new API in whole u-l-ng

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: refresh blkid.{h,sym}
Karel Zak [Tue, 15 Sep 2009 21:14:50 +0000 (23:14 +0200)]
libblkid: refresh blkid.{h,sym}

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add generic function for binary data
Karel Zak [Tue, 15 Sep 2009 21:00:12 +0000 (23:00 +0200)]
libblkid: add generic function for binary data

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: allow to read in sectors
Karel Zak [Tue, 15 Sep 2009 20:55:05 +0000 (22:55 +0200)]
libblkid: allow to read in sectors

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: allow to change dimension of probing area
Karel Zak [Tue, 15 Sep 2009 20:53:25 +0000 (22:53 +0200)]
libblkid: allow to change dimension of probing area

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add blkid_probe_get_{size,sectorsize,devno}
Karel Zak [Tue, 15 Sep 2009 20:50:11 +0000 (22:50 +0200)]
libblkid: add blkid_probe_get_{size,sectorsize,devno}

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add missing comments to probe.c
Karel Zak [Tue, 15 Sep 2009 20:43:58 +0000 (22:43 +0200)]
libblkid: add missing comments to probe.c

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: use chains in blkid_do_{safe,full,}_probe()
Karel Zak [Tue, 15 Sep 2009 20:37:33 +0000 (22:37 +0200)]
libblkid: use chains in blkid_do_{safe,full,}_probe()

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: use chains in prober (de)initialization
Karel Zak [Tue, 15 Sep 2009 20:33:34 +0000 (22:33 +0200)]
libblkid: use chains in prober (de)initialization

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: use private {lookup,get}_value functions
Karel Zak [Tue, 15 Sep 2009 20:22:16 +0000 (22:22 +0200)]
libblkid: use private {lookup,get}_value functions

Signed-off-by: Karel Zak <kzak@redhat.com>