]> err.no Git - util-linux/log
util-linux
13 years agolibmount: allows to swap source and target
Karel Zak [Mon, 4 Oct 2010 12:09:55 +0000 (14:09 +0200)]
libmount: allows to swap source and target

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup mount.h
Karel Zak [Mon, 4 Oct 2010 12:09:28 +0000 (14:09 +0200)]
libmount: cleanup mount.h

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: split context.c
Karel Zak [Mon, 4 Oct 2010 11:37:33 +0000 (13:37 +0200)]
libmount: split context.c

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup helpers support
Karel Zak [Mon, 4 Oct 2010 10:18:41 +0000 (12:18 +0200)]
libmount: cleanup helpers support

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: rewrite mountinfo/fstab parsers to use sscanf()
Karel Zak [Fri, 1 Oct 2010 11:05:58 +0000 (13:05 +0200)]
libmount: rewrite mountinfo/fstab parsers to use sscanf()

The old solution (without scanf()) was based on old code from
mount(8). It seems that the modern libc is able to provide all
necessary functionality by sscanf() and %ms directive.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: fix mount helpers call
Karel Zak [Thu, 30 Sep 2010 20:22:24 +0000 (22:22 +0200)]
libmount: fix mount helpers call

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: update mtab after mount(2)
Karel Zak [Thu, 30 Sep 2010 10:08:36 +0000 (12:08 +0200)]
libmount: update mtab after mount(2)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: always store rw/ro flags to mtab
Karel Zak [Thu, 30 Sep 2010 10:07:50 +0000 (12:07 +0200)]
libmount: always store rw/ro flags to mtab

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: update mount.sym
Karel Zak [Thu, 30 Sep 2010 09:02:50 +0000 (11:02 +0200)]
libmount: update mount.sym

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: extend mnt_update_* API
Karel Zak [Thu, 30 Sep 2010 08:42:20 +0000 (10:42 +0200)]
libmount: extend mnt_update_* API

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mount(2) and /sbin/mount.<type> support
Karel Zak [Wed, 29 Sep 2010 21:42:43 +0000 (23:42 +0200)]
libmount: add mount(2) and /sbin/mount.<type> support

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mtab managment to context API
Karel Zak [Wed, 29 Sep 2010 10:23:59 +0000 (12:23 +0200)]
libmount: add mtab managment to context API

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: use attribute __format__ for debug routines
Karel Zak [Wed, 29 Sep 2010 09:19:18 +0000 (11:19 +0200)]
libmount: use attribute __format__ for debug routines

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add FS detection
Karel Zak [Mon, 27 Sep 2010 23:26:31 +0000 (01:26 +0200)]
libmount: add FS detection

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: better permissions and optstr evaliation
Karel Zak [Mon, 27 Sep 2010 14:52:54 +0000 (16:52 +0200)]
libmount: better permissions and optstr evaliation

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add DBG() to optstr.c
Karel Zak [Mon, 27 Sep 2010 14:25:01 +0000 (16:25 +0200)]
libmount: add DBG() to optstr.c

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: minor cleanup in optstr.c
Karel Zak [Mon, 27 Sep 2010 10:16:59 +0000 (12:16 +0200)]
libmount: minor cleanup in optstr.c

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_optstr_fix_user
Karel Zak [Mon, 27 Sep 2010 10:14:41 +0000 (12:14 +0200)]
libmount: add mnt_optstr_fix_user

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: clean up mountflags usage
Karel Zak [Fri, 24 Sep 2010 23:48:38 +0000 (01:48 +0200)]
libmount: clean up mountflags usage

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: improve parsers return codes
Karel Zak [Fri, 24 Sep 2010 21:23:06 +0000 (23:23 +0200)]
libmount: improve parsers return codes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: rewrite optstr translation
Karel Zak [Fri, 24 Sep 2010 11:04:35 +0000 (13:04 +0200)]
libmount: rewrite optstr translation

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: implement mnt_context_subst_optstr()
Karel Zak [Tue, 21 Sep 2010 19:47:54 +0000 (21:47 +0200)]
libmount: implement mnt_context_subst_optstr()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add routines for uid=, git= and context= translation
Karel Zak [Tue, 21 Sep 2010 19:46:49 +0000 (21:46 +0200)]
libmount: add routines for uid=, git= and context= translation

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add utils for work with uid/gid
Karel Zak [Tue, 21 Sep 2010 19:44:19 +0000 (21:44 +0200)]
libmount: add utils for work with uid/gid

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add first part of high-level API
Karel Zak [Tue, 21 Sep 2010 11:11:55 +0000 (13:11 +0200)]
libmount: add first part of high-level API

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup mount.sym
Karel Zak [Wed, 15 Sep 2010 14:57:19 +0000 (16:57 +0200)]
libmount: cleanup mount.sym

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_context
Karel Zak [Wed, 15 Sep 2010 14:56:15 +0000 (16:56 +0200)]
libmount: add mnt_context

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_optstr_get_userspace_mountflags()
Karel Zak [Wed, 15 Sep 2010 14:55:47 +0000 (16:55 +0200)]
libmount: add mnt_optstr_get_userspace_mountflags()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add MNT_FS_SWAP flag
Karel Zak [Wed, 15 Sep 2010 14:31:38 +0000 (16:31 +0200)]
libmount: add MNT_FS_SWAP flag

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup debug flags
Karel Zak [Wed, 15 Sep 2010 14:29:06 +0000 (16:29 +0200)]
libmount: cleanup debug flags

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: improve debugging, fix optstr prepend
Karel Zak [Wed, 15 Sep 2010 14:27:06 +0000 (16:27 +0200)]
libmount: improve debugging, fix optstr prepend

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add new pseudo filesystems
Karel Zak [Wed, 15 Sep 2010 14:23:54 +0000 (16:23 +0200)]
libmount: add new pseudo filesystems

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_fs_prepend_optstr()
Karel Zak [Tue, 14 Sep 2010 08:50:49 +0000 (10:50 +0200)]
libmount: add mnt_fs_prepend_optstr()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_optstr_prepend_option()
Karel Zak [Tue, 14 Sep 2010 08:42:44 +0000 (10:42 +0200)]
libmount: add mnt_optstr_prepend_option()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: fix optstr test
Karel Zak [Mon, 13 Sep 2010 15:17:14 +0000 (17:17 +0200)]
libmount: fix optstr test

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: rewrite DBG() macro
Karel Zak [Mon, 13 Sep 2010 15:06:18 +0000 (17:06 +0200)]
libmount: rewrite DBG() macro

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add new psetudo filesystems
Karel Zak [Fri, 27 Aug 2010 08:14:32 +0000 (10:14 +0200)]
libmount: add new psetudo filesystems

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup return codes (tab_parse.c)
Karel Zak [Fri, 27 Aug 2010 08:11:09 +0000 (10:11 +0200)]
libmount: cleanup return codes (tab_parse.c)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup return codes (tab.c)
Karel Zak [Thu, 26 Aug 2010 12:35:36 +0000 (14:35 +0200)]
libmount: cleanup return codes (tab.c)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup return codes (optstr.c)
Karel Zak [Wed, 25 Aug 2010 10:14:40 +0000 (12:14 +0200)]
libmount: cleanup return codes (optstr.c)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup return codes (optmap.c)
Karel Zak [Wed, 25 Aug 2010 09:26:57 +0000 (11:26 +0200)]
libmount: cleanup return codes (optmap.c)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup return codes (lock.c)
Karel Zak [Wed, 25 Aug 2010 09:20:32 +0000 (11:20 +0200)]
libmount: cleanup return codes (lock.c)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup return codes (iter.c)
Karel Zak [Wed, 25 Aug 2010 08:55:10 +0000 (10:55 +0200)]
libmount: cleanup return codes (iter.c)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup return codes (fs.c)
Karel Zak [Tue, 24 Aug 2010 14:30:39 +0000 (16:30 +0200)]
libmount: cleanup return codes (fs.c)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: cleanup return codes (cache.c)
Karel Zak [Tue, 24 Aug 2010 14:17:16 +0000 (16:17 +0200)]
libmount: cleanup return codes (cache.c)

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: clean up mnt_fs_set_optstr()
Karel Zak [Tue, 24 Aug 2010 14:03:50 +0000 (16:03 +0200)]
libmount: clean up mnt_fs_set_optstr()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: improve an rename API for mtab management
Karel Zak [Tue, 10 Aug 2010 13:27:23 +0000 (15:27 +0200)]
libmount: improve an rename API for mtab management

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: update tests
Karel Zak [Tue, 10 Aug 2010 13:26:59 +0000 (15:26 +0200)]
libmount: update tests

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: update mount.{h,sym}
Karel Zak [Fri, 6 Aug 2010 11:11:52 +0000 (13:11 +0200)]
libmount: update mount.{h,sym}

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: use mnt_fs for mtab API
Karel Zak [Fri, 6 Aug 2010 11:03:34 +0000 (13:03 +0200)]
libmount: use mnt_fs for mtab API

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: fix datatype for mountflags
Karel Zak [Fri, 6 Aug 2010 09:50:39 +0000 (11:50 +0200)]
libmount: fix datatype for mountflags

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: remove unnecessary options container
Karel Zak [Thu, 5 Aug 2010 12:28:19 +0000 (14:28 +0200)]
libmount: remove unnecessary options container

It seems that we are able to be happy with option strings only. The
mnt_optls stuff was over-engineering.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add support for mtab managment
Karel Zak [Thu, 5 Aug 2010 11:47:37 +0000 (13:47 +0200)]
libmount: add support for mtab managment

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib: fix mange() and unmangle() to handle NULL
Karel Zak [Thu, 5 Aug 2010 11:14:58 +0000 (13:14 +0200)]
lib: fix mange() and unmangle() to handle NULL

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: correctly use "none" values
Karel Zak [Thu, 5 Aug 2010 10:35:54 +0000 (12:35 +0200)]
libmount: correctly use "none" values

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofindmnt: add support for fs-root (subvolumes and bind mounts)
Karel Zak [Thu, 5 Aug 2010 10:26:00 +0000 (12:26 +0200)]
findmnt: add support for fs-root (subvolumes and bind mounts)

This patch modifies the default output for SOURCE column. All btrfs
subvolume mountpoints and all bind-mount (where source is not root of
FS) will be printed as:

   SOURCE               TARGET
   /dev/sda1[/aaa]      /mnt/test

where /aaa is subvolume name or fs root for bind mounts, it means:

   # mount -t btrfs /dev/sda1 /mnt/test -o subvol=aaa

or:

   # mount --bind /aaa /mnt/test

The info about fs-root is 4th column in /proc/self/mountinfo.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_optstr_get_mountflags()
Karel Zak [Thu, 5 Aug 2010 10:24:59 +0000 (12:24 +0200)]
libmount: add mnt_optstr_get_mountflags()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: improve mnt_get_fs_root() and mnt_get_mountpoint()
Karel Zak [Wed, 28 Jul 2010 13:16:49 +0000 (15:16 +0200)]
libmount: improve mnt_get_fs_root() and mnt_get_mountpoint()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add uhelper=, improve mnt_split_optstr()
Karel Zak [Wed, 28 Jul 2010 13:14:41 +0000 (15:14 +0200)]
libmount: add uhelper=, improve mnt_split_optstr()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add unit test for mnt_copy_fs()
Karel Zak [Mon, 26 Jul 2010 14:27:45 +0000 (16:27 +0200)]
libmount: add unit test for mnt_copy_fs()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add utils to get FS root/mountpoint
Karel Zak [Mon, 26 Jul 2010 14:26:27 +0000 (16:26 +0200)]
libmount: add utils to get FS root/mountpoint

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_copy_fs() and mnt_fs_set_root()
Karel Zak [Mon, 26 Jul 2010 14:24:29 +0000 (16:24 +0200)]
libmount: add mnt_copy_fs() and mnt_fs_set_root()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add unmangle/mangle() functions to API
Karel Zak [Wed, 21 Jul 2010 12:18:02 +0000 (14:18 +0200)]
libmount: add unmangle/mangle() functions to API

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: remove fs and tab printf functions
Karel Zak [Wed, 21 Jul 2010 12:01:56 +0000 (14:01 +0200)]
libmount: remove fs and tab printf functions

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add {start,end}swith() functions
Karel Zak [Thu, 15 Jul 2010 14:00:42 +0000 (16:00 +0200)]
libmount: add {start,end}swith() functions

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_get_writable_mtab_path()
Karel Zak [Thu, 15 Jul 2010 13:24:11 +0000 (15:24 +0200)]
libmount: add mnt_get_writable_mtab_path()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: clean up lock.c
Karel Zak [Thu, 15 Jul 2010 13:22:34 +0000 (15:22 +0200)]
libmount: clean up lock.c

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_tab_parse_mtab()
Karel Zak [Wed, 14 Jul 2010 13:05:14 +0000 (15:05 +0200)]
libmount: add mnt_tab_parse_mtab()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_split_optstr()
Karel Zak [Fri, 9 Jul 2010 14:39:50 +0000 (16:39 +0200)]
libmount: add mnt_split_optstr()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: don't return old data from optls iterator
Karel Zak [Fri, 9 Jul 2010 11:50:51 +0000 (13:50 +0200)]
libmount: don't return old data from optls iterator

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: clean up mount.sym file
Karel Zak [Fri, 9 Jul 2010 10:15:16 +0000 (12:15 +0200)]
libmount: clean up mount.sym file

The API is not stable yet, so it's possible to increment the current
API version rather than create a new version.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_fs_get_root()
Karel Zak [Fri, 9 Jul 2010 09:15:08 +0000 (11:15 +0200)]
libmount: add mnt_fs_get_root()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofindmnt: add /etc/fstab.d support
Karel Zak [Wed, 23 Jun 2010 08:22:02 +0000 (10:22 +0200)]
findmnt: add /etc/fstab.d support

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add /etc/fstab.d support
Karel Zak [Wed, 23 Jun 2010 08:18:43 +0000 (10:18 +0200)]
libmount: add /etc/fstab.d support

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib: add wrappers for "at" functions
Karel Zak [Tue, 22 Jun 2010 11:27:59 +0000 (13:27 +0200)]
lib: add wrappers for "at" functions

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_tab_parse_stream()
Karel Zak [Tue, 22 Jun 2010 09:52:36 +0000 (11:52 +0200)]
libmount: add mnt_tab_parse_stream()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: don't store filename to mnt_tab
Karel Zak [Tue, 22 Jun 2010 06:53:56 +0000 (08:53 +0200)]
libmount: don't store filename to mnt_tab

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: improve parser return codes
Karel Zak [Mon, 21 Jun 2010 21:15:54 +0000 (23:15 +0200)]
libmount: improve parser return codes

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: remove mnt_tab_strerr()
Karel Zak [Mon, 21 Jun 2010 20:47:48 +0000 (22:47 +0200)]
libmount: remove mnt_tab_strerr()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibmount: add mnt_tab_set_parser_errcb()
Karel Zak [Mon, 21 Jun 2010 16:08:53 +0000 (18:08 +0200)]
libmount: add mnt_tab_set_parser_errcb()

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolibblkid: use PRId64 in PT parser
Karel Zak [Sat, 1 Jan 2011 22:14:46 +0000 (23:14 +0100)]
libblkid: use PRId64 in PT parser

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agohwclock: allow setting of RTC when it contains invalid data
Peter Tyser [Wed, 29 Dec 2010 22:25:43 +0000 (16:25 -0600)]
hwclock: allow setting of RTC when it contains invalid data

In some cases the date/time stored in an RTC can be corrupted, eg due to
loss of power, before its been initially set, etc.  When this occurs
the RTC_RD_TIME ioctl can fail since the Linux kernel determines that
the RTC contains invalid data.  Currently, when setting an RTC using
hwclock, hwclock performs a number of RTC_RD_TIME ioctls before setting
the RTC.  When one of these ioctls fails, hwclock bombs out and the
corrupted RTC data can't be overwritten.  Thus once an RTC is corrupted,
it can't be fixed via hwclock*.

To work around the above issue we can make hwclock not exit when a
RTC_RD_TIME failure occurs during the process of setting the RTC.  This
allows the RTC to be set even when it contains an invalid value,
although it is not synchronized to a clock tick before it is set.

* 'hwclock --utc --noadjfile --set --date="11/23/10 17:19:00' currently
works to fix a corrupted RTC, but a user couldn't determine this without
digging through the source code.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
13 years agolscpu: avoid len = 0 as a consequence of maxcpus = 0
Gerrit Renker [Tue, 28 Dec 2010 09:53:03 +0000 (10:53 +0100)]
lscpu: avoid len = 0 as a consequence of maxcpus = 0

This problem was observed on an x86_64 Mobile AMD Sempron 3700+ where kernel_max
returned "0" as the index of the highest CPU.

As a consequence, several variables in lscpu, which relied on maxcpus >= 1 (in
particular the 'len' value) were set to 0, resulting in the following errors:

host>./lscpu
lscpu: failed to read: /sys/devices/system/cpu/online: No such file or directory
host> cat /sys/devices/system/cpu/kernel_max
0

The fix used by this patch is to interpret kernel_max as an index and maxcpus as
a count >= 1, tested to work.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agopartx: fix authors section in man page
Davidlohr Bueso [Thu, 23 Dec 2010 14:55:23 +0000 (11:55 -0300)]
partx: fix authors section in man page

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
13 years agocfdisk: close the program when terminal isn't present
Francesco Cosoleto [Sat, 18 Dec 2010 18:24:03 +0000 (19:24 +0100)]
cfdisk: close the program when terminal isn't present

cfdisk was getting characters without checking ERR return code, causing an
endless while loop in do_curses_fdisk() or in other functions when the terminal
is lost.

[kzak@redhat.com: - fix coding style, remove CR macro]

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agowipefs: fail if more device arguments specified
Milan Broz [Fri, 17 Dec 2010 22:36:55 +0000 (23:36 +0100)]
wipefs: fail if more device arguments specified

Currently wipefs process only first device argument and silently ignores
remaining.  Print error instead because it can be quite confusing.

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agohexdump: remove od functionality in favor to GNU coreutils od
Sami Kerola [Sun, 12 Dec 2010 22:43:57 +0000 (23:43 +0100)]
hexdump: remove od functionality in favor to GNU coreutils od

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
13 years agolibblkid: fix endian conversion bug in NILFS
Karel Zak [Thu, 30 Dec 2010 19:37:22 +0000 (20:37 +0100)]
libblkid: fix endian conversion bug in NILFS

Reported-by: Andrew Nayenko <resver@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: remove unnecessary header
Karel Zak [Wed, 29 Dec 2010 19:58:10 +0000 (20:58 +0100)]
build-sys: remove unnecessary header

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agobuild-sys: remove generated po/POTFILES.in
Karel Zak [Wed, 29 Dec 2010 19:51:58 +0000 (20:51 +0100)]
build-sys: remove generated po/POTFILES.in

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofsck: returns proper code on exec() error
Karel Zak [Mon, 27 Dec 2010 21:30:24 +0000 (22:30 +0100)]
fsck: returns proper code on exec() error

# fsck -t foo /dev/sda1; echo $?
fsck: fsck.foo: not found
/sbin/fsck: Error 2 while executing fsck.foo for /dev/sda1
0

new version:

# fsck -t foo /dev/sda1; echo $?
fsck: fsck.foo: not found
fsck: Error 2 while executing fsck.foo for /dev/sda1
8

Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=619139
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: rename "RA" column to "RE"
Karel Zak [Sun, 26 Dec 2010 22:53:21 +0000 (23:53 +0100)]
lsblk: rename "RA" column to "RE"

The RA abbreviation is usually used for readahead, the column in
lsblk(8) means removable.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agofdisk: use canonicalized names for -l (and sfdisk -d)
Karel Zak [Fri, 17 Dec 2010 00:28:59 +0000 (01:28 +0100)]
fdisk: use canonicalized names for -l (and sfdisk -d)

.. no more /dev/dm-X in "fdisk -l" and "sfdisk -d" output, always use
/dev/mapper/<name>.

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoswpaon: use canonicalized devnames on -s output
Karel Zak [Fri, 17 Dec 2010 00:10:36 +0000 (01:10 +0100)]
swpaon: use canonicalized devnames on -s output

Old version
   Filename                                Type            Size    Used Priority
   /dev/sda3                               partition       2353516 76  -1
   /dev/dm-1                               partition       409596  0   -2

New version:
   Filename                                Type            Size    Used Priority
   /dev/sda3                               partition       2353516 76   -1
   /dev/mapper/VUL-lvol0                   partition       409596  0    -2

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agoswapon: Canonicalize swap device
Alexey Gladkov [Tue, 14 Dec 2010 23:14:18 +0000 (02:14 +0300)]
swapon: Canonicalize swap device

Swapon checks whether a swap device is active by searching for the
device name in /proc/swaps. /proc/swaps always specifies the path
to real device file, even if the path to real device file, even
if symlink was passed to the swapon() system call.

This differs from /proc/mounts semantics where each string contains
exactly the same device name as it was passed to the mount*() system call.

If a swap partition resides on lvm, libblkid returns a name in
form /dev/mapper/*, but now there are symlinks pointing to device
files /dev/dm-*, resulting to /proc/swaps containing /dev/dm-*,
but swapon still looks for /dev/mapper/* and tries to activate
the swap partition again.

[kzak@redhat.com: - remove unnecessary changes from
                    is_in_proc_swaps()]

Signed-off-by: Alexey Gladkov <gladkov.alexey@gmail.com>
Tested-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolsblk: add --nodeps
Karel Zak [Thu, 16 Dec 2010 11:47:30 +0000 (12:47 +0100)]
lsblk: add --nodeps

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agolib: [tt] fix alignment of the last tree child
Karel Zak [Thu, 16 Dec 2010 11:12:43 +0000 (12:12 +0100)]
lib: [tt] fix alignment of the last tree child

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agomesg: change error exit code from 1 to >1
Francesco Cosoleto [Fri, 10 Dec 2010 16:40:11 +0000 (17:40 +0100)]
mesg: change error exit code from 1 to >1

According to POSIX and mesg(1) error exit code should be >1.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
13 years agodocs: update DEPRECATED file
Karel Zak [Fri, 10 Dec 2010 16:32:57 +0000 (17:32 +0100)]
docs: update DEPRECATED file

Signed-off-by: Karel Zak <kzak@redhat.com>
13 years agosimpleinit: move old init stuff to separate directory
Karel Zak [Fri, 10 Dec 2010 16:28:32 +0000 (17:28 +0100)]
simpleinit: move old init stuff to separate directory

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