]> err.no Git - util-linux/log
util-linux
14 years agofindmnt: rewrite to use lib/tt.c
Karel Zak [Tue, 6 Apr 2010 14:16:27 +0000 (16:16 +0200)]
findmnt: rewrite to use lib/tt.c

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: add tt.c (Tree and Table output)
Karel Zak [Tue, 6 Apr 2010 14:15:15 +0000 (16:15 +0200)]
lib: add tt.c (Tree and Table output)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoinclude: move shlibs/.../list.h to the include/ directory
Karel Zak [Tue, 6 Apr 2010 12:50:47 +0000 (14:50 +0200)]
include: move shlibs/.../list.h to the include/ directory

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agofindmnt: add tree support
Karel Zak [Fri, 12 Mar 2010 22:45:45 +0000 (23:45 +0100)]
findmnt: add tree support

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add mnt_cache_find_tag_value()
Karel Zak [Fri, 12 Mar 2010 22:42:56 +0000 (23:42 +0100)]
libmount: add mnt_cache_find_tag_value()

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add support for userdata and work with VFS tree
Karel Zak [Tue, 9 Mar 2010 14:48:11 +0000 (15:48 +0100)]
libmount: add support for userdata and work with VFS tree

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: add mnt_iter_get_direction()
Karel Zak [Fri, 5 Mar 2010 09:52:59 +0000 (10:52 +0100)]
libblkid: add mnt_iter_get_direction()

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: read devno, ID and parent ID from /proc/self/mountinfo
Karel Zak [Tue, 2 Mar 2010 21:34:56 +0000 (22:34 +0100)]
libmount: read devno, ID and parent ID from /proc/self/mountinfo

The patch also removes obsolete test program from tab_parse.c.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agofindmnt: add new command
Karel Zak [Mon, 1 Mar 2010 21:44:53 +0000 (22:44 +0100)]
findmnt: add new command

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: update symbols table
Karel Zak [Mon, 1 Mar 2010 21:31:51 +0000 (22:31 +0100)]
libmount: update symbols table

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add fstab/mtab/mountinfo lookup routines
Karel Zak [Mon, 1 Mar 2010 21:29:38 +0000 (22:29 +0100)]
libmount: add fstab/mtab/mountinfo lookup routines

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add mnt_match_{fstype,options} functions
Karel Zak [Tue, 23 Feb 2010 14:04:52 +0000 (15:04 +0100)]
libmount: add mnt_match_{fstype,options} functions

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add fstab/mtab/mountinfo parsing routines
Karel Zak [Wed, 13 Jan 2010 21:08:16 +0000 (22:08 +0100)]
libmount: add fstab/mtab/mountinfo parsing routines

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: rename mnt_optls_iterate_options()
Karel Zak [Wed, 13 Jan 2010 15:52:14 +0000 (16:52 +0100)]
libmount: rename mnt_optls_iterate_options()

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add mnt_entry
Karel Zak [Tue, 12 Jan 2010 12:43:07 +0000 (13:43 +0100)]
libmount: add mnt_entry

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add mtab locking code
Karel Zak [Mon, 11 Jan 2010 14:12:02 +0000 (15:12 +0100)]
libmount: add mtab locking code

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: proper tests definition in Makefile.am
Karel Zak [Mon, 11 Jan 2010 12:42:45 +0000 (13:42 +0100)]
libmount: proper tests definition in Makefile.am

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add optls (options container)
Karel Zak [Mon, 11 Jan 2010 12:33:06 +0000 (13:33 +0100)]
libmount: add optls (options container)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add list routines and generic iterator
Karel Zak [Tue, 5 Jan 2010 13:58:16 +0000 (14:58 +0100)]
libmount: add list routines and generic iterator

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add mnt_optstr_* functions
Karel Zak [Mon, 4 Jan 2010 22:03:47 +0000 (23:03 +0100)]
libmount: add mnt_optstr_* functions

This set of functions allows to set/get/remove/append option in
unparsed options string.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: add paths and tags cache
Karel Zak [Fri, 27 Nov 2009 13:35:03 +0000 (14:35 +0100)]
libblkid: add paths and tags cache

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add test_version
Karel Zak [Fri, 27 Nov 2009 00:13:01 +0000 (01:13 +0100)]
libmount: add test_version

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add debug support
Karel Zak [Thu, 26 Nov 2009 23:33:37 +0000 (00:33 +0100)]
libmount: add debug support

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add basic utils
Karel Zak [Thu, 26 Nov 2009 16:45:01 +0000 (17:45 +0100)]
libmount: add basic utils

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add version.c
Karel Zak [Thu, 26 Nov 2009 16:27:13 +0000 (17:27 +0100)]
libmount: add version.c

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibmount: add basic dirs
Karel Zak [Thu, 26 Nov 2009 16:11:12 +0000 (17:11 +0100)]
libmount: add basic dirs

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkid: remove _ENC from ID_PART_ENTRY_{NAME,TYPE} variables
Karel Zak [Wed, 2 Jun 2010 14:11:52 +0000 (16:11 +0200)]
blkid: remove _ENC from ID_PART_ENTRY_{NAME,TYPE} variables

The *_ENC variables are deprecated. All stuff for udev should be
encoded.

Reported-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: add exFAT file system detection support
Andrew Nayenko [Fri, 28 May 2010 19:22:00 +0000 (23:22 +0400)]
libblkid: add exFAT file system detection support

Add exFAT file system <http://en.wikipedia.org/wiki/ExFAT> detection support.

Signed-off-by: Andrew Nayenko <resver@gmail.com>
14 years agoipcs: reorganize help and usage texts
Francesco Cosoleto [Mon, 17 May 2010 23:07:50 +0000 (01:07 +0200)]
ipcs: reorganize help and usage texts

Help text old version:

ipcs provides information on ipc facilities for which you have read access.
Resource Specification:
-m : shared_mem
-q : messages
-s : semaphores
-a : all (default)
Output Format:
-t : time
-p : pid
-c : creator
-l : limits
-u : summary
-i id [-s -q -m] : details on resource identified by id
usage : ipcs -asmq -tclup
ipcs [-s -m -q] -i id
ipcs -h for help.

New version:
Usage: ipcs [resource]... [output-format]
       ipcs [resource] -i id

Provide information on IPC facilities for which you have read access.

    -h      display this help
    -i id   print details on resource identified by id

Resource options:
    -m      shared memory segments
    -q      message queues
    -s      semaphores
    -a      all (default)

Output format:
    -t      time
    -p      pid
    -c      creator
    -l      limits
    -u      summary

Usage text old version:
usage : ipcs -asmq -tclup
ipcs [-s -m -q] -i id
ipcs -h for help.

New version:
Usage: ipcs [-asmq] [-t|-c|-l|-u|-p]
       ipcs [-s|-m|-q] -i id
       ipcs -h for help

[kzak@redhat.com: - use program_invocation_short_name
                  - minor cleanups]

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: update ipcs/headers test
Francesco Cosoleto [Mon, 17 May 2010 23:07:49 +0000 (01:07 +0200)]
tests: update ipcs/headers test

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
14 years agoipcs: add missing "PIDs" to related shared memory header text
Francesco Cosoleto [Mon, 17 May 2010 23:07:48 +0000 (01:07 +0200)]
ipcs: add missing "PIDs" to related shared memory header text

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
14 years agoipcs: get rid of colons from header strings for consistency
Francesco Cosoleto [Mon, 17 May 2010 23:07:46 +0000 (01:07 +0200)]
ipcs: get rid of colons from header strings for consistency

This changes output of -u, -l, and -c.

Example of non consistent output:
    $ ipcs -u | grep ^---
------ Shared Memory Status --------
------ Semaphore Status --------
------ Messages: Status --------

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
14 years agotests: add lscpu dump from Dell R710, 8-core Nehalem w/HT (RHEL 5.5)
Karel Zak [Tue, 1 Jun 2010 08:55:37 +0000 (10:55 +0200)]
tests: add lscpu dump from Dell R710, 8-core Nehalem w/HT (RHEL 5.5)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: update lscpu
Karel Zak [Tue, 1 Jun 2010 08:44:41 +0000 (10:44 +0200)]
tests: update lscpu

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolscpu: use cpuset masks, read data for all CPUs
Karel Zak [Fri, 28 May 2010 12:23:15 +0000 (14:23 +0200)]
lscpu: use cpuset masks, read data for all CPUs

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotaskset: move NR_CPUS determination to lib/cpuset.c
Karel Zak [Fri, 28 May 2010 09:08:39 +0000 (11:08 +0200)]
taskset: move NR_CPUS determination to lib/cpuset.c

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolscpu: improve --sysroot code
Karel Zak [Fri, 28 May 2010 08:45:41 +0000 (10:45 +0200)]
lscpu: improve --sysroot code

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolscpu: cleanup used names
Karel Zak [Thu, 27 May 2010 21:39:41 +0000 (23:39 +0200)]
lscpu: cleanup used names

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolscpu: cleanup path_scanstr()
Karel Zak [Thu, 27 May 2010 15:24:28 +0000 (17:24 +0200)]
lscpu: cleanup path_scanstr()

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotaskset: add NLS support, use err.h, cleanup
Karel Zak [Thu, 27 May 2010 14:29:56 +0000 (16:29 +0200)]
taskset: add NLS support, use err.h, cleanup

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolib: add fallback for libc (uClibc) without CPU_ALLOC
Karel Zak [Thu, 27 May 2010 11:32:12 +0000 (13:32 +0200)]
lib: add fallback for libc (uClibc) without CPU_ALLOC

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotaskset: use libc based cpu_set_t
Karel Zak [Thu, 27 May 2010 09:32:50 +0000 (11:32 +0200)]
taskset: use libc based cpu_set_t

The glibc already supports dynamically allocated CPU sets. We don't
have to maintains our private non-compatible implementation.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add cpuset regression test
Karel Zak [Mon, 24 May 2010 12:13:33 +0000 (14:13 +0200)]
tests: add cpuset regression test

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotaskset: move bitmap routines to lib/cpuset.c
Karel Zak [Mon, 24 May 2010 10:44:39 +0000 (12:44 +0200)]
taskset: move bitmap routines to lib/cpuset.c

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: fix coding style
Karel Zak [Fri, 28 May 2010 12:58:22 +0000 (14:58 +0200)]
mount: fix coding style

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: detect when kernel silently adds MS_RDONLY flag
Petr Uzel [Fri, 21 May 2010 13:19:31 +0000 (15:19 +0200)]
mount: detect when kernel silently adds MS_RDONLY flag

Linux kernel can silently add MS_RDONLY flag when mounting file system that
does not have write support. Check this to avoid 'ro' in /proc/mounts and 'rw'
in mtab.

[kzak@redhat.com: - don't check for 'ro' for MS_MOVE and MS_PROPAGATION]

Reported-by: James Foris <jim.foris@med.ge.com>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agogit: ignore index files generated by ctags and cscope
Petr Uzel [Fri, 21 May 2010 13:23:35 +0000 (15:23 +0200)]
git: ignore index files generated by ctags and cscope

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
14 years agoumount: do not sync() as the kernel does it by itself
Petr Uzel [Fri, 21 May 2010 12:18:31 +0000 (14:18 +0200)]
umount: do not sync() as the kernel does it by itself

On Fri, May 21, 2010 at 08:00:09AM -0400, Christoph Hellwig wrote:
> On Fri, May 21, 2010 at 01:55:17PM +0200, Petr Uzel wrote:
> > SUSE-based distributions have the following patch for some time. More
> > info here: https://bugzilla.novell.com/show_bug.cgi?id=447036
> >
> > From the Novell bugzilla:
> > <quote>
> > > I cannot see any justification for that sync call at all so I'd
> > > probably just remove it.  Your
> > > patch is possibly safer so maybe it should be used as is.
> > </quote>
> >
> > So, does anybody know why/if the sync() is actually needed?
>
> It's not needed.  The kernel performs a sync by itself.

Thanks, Christoph.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
14 years agomount: fix typo in comment
Petr Uzel [Thu, 20 May 2010 14:58:16 +0000 (16:58 +0200)]
mount: fix typo in comment

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
14 years agomount: fix information about XFS log buffers in mount.8
Christoph Hellwig [Wed, 19 May 2010 18:27:22 +0000 (14:27 -0400)]
mount: fix information about XFS log buffers in mount.8

Signed-off-by: Christoph Hellwig <hch@lst.de>
14 years agobuild-sys: replace ../ with $top_srcdir
Karel Zak [Mon, 24 May 2010 10:37:12 +0000 (12:37 +0200)]
build-sys: replace ../ with $top_srcdir

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkid: remove duplicate option from man page
Karel Zak [Fri, 21 May 2010 13:56:44 +0000 (15:56 +0200)]
blkid: remove duplicate option from man page

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: improve MD 0.90.0 detection (use sb->size)
Karel Zak [Fri, 21 May 2010 10:35:37 +0000 (12:35 +0200)]
libblkid: improve MD 0.90.0 detection (use sb->size)

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: update fdisk tests
Karel Zak [Wed, 19 May 2010 09:16:50 +0000 (11:16 +0200)]
tests: update fdisk tests

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agordev: remove this deprecated command
Karel Zak [Thu, 13 May 2010 11:58:16 +0000 (13:58 +0200)]
rdev: remove this deprecated command

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: improbe DDF detection
Karel Zak [Tue, 18 May 2010 14:09:58 +0000 (16:09 +0200)]
libblkid: improbe DDF detection

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: probe for (non-linux) RAIDs on whole devices only
Karel Zak [Tue, 18 May 2010 12:31:28 +0000 (14:31 +0200)]
libblkid: probe for (non-linux) RAIDs on whole devices only

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: cleanup superblocks_safeprobe()
Karel Zak [Tue, 18 May 2010 10:51:48 +0000 (12:51 +0200)]
libblkid: cleanup superblocks_safeprobe()

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: improve MD 0.90 detection
Karel Zak [Tue, 18 May 2010 10:13:48 +0000 (12:13 +0200)]
libblkid: improve MD 0.90 detection

We don't have to check for collision between partition table and RAID
on all RAIDs. This problem is specific to MD, where underlying device
could be a partition. The RAIDs like via, intel, ... always use
whole-disks only.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: tiny change in debug output
Karel Zak [Mon, 17 May 2010 21:45:13 +0000 (23:45 +0200)]
libblkid: tiny change in debug output

Use uint64_t rather than ssize_t for number of read bytes.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: improve MD 1.0 detection, add UUID_SUB
Karel Zak [Mon, 17 May 2010 21:34:50 +0000 (23:34 +0200)]
libblkid: improve MD 1.0 detection, add UUID_SUB

Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=592958
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoMerge remote branch 'origin/master' into HEAD
LaMont Jones [Fri, 14 May 2010 11:07:14 +0000 (05:07 -0600)]
Merge remote branch 'origin/master' into HEAD

Conflicts:
lib/fsprobe.c
mount/lomount.c

14 years agofallocate: check for number of arguments
Karel Zak [Fri, 14 May 2010 11:04:50 +0000 (13:04 +0200)]
fallocate: check for number of arguments

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agofsfreeze: new command
Hajime Taira [Thu, 13 May 2010 11:23:49 +0000 (13:23 +0200)]
fsfreeze: new command

[kzak@redhat.com: - cleanup
                  - add long options
                  - add note about DM to the man page
                  - use err.h and nls.h]

Signed-off-by: Hajime Taira <htaira@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkid: add 'export' output format
Karel Zak [Fri, 14 May 2010 10:02:57 +0000 (12:02 +0200)]
blkid: add 'export' output format

This output format is similar to 'udev' but without udev specific
prefixed (e.g. ID_FS_*). The 'export' format is automatically enabled
for I/O Limits (-i).

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkid: add -i option to print I/O limits
Karel Zak [Thu, 13 May 2010 20:26:27 +0000 (22:26 +0200)]
blkid: add -i option to print I/O limits

blkid -i /dev/sdb /dev/sda
/dev/sdb: MINIMUM_IO_SIZE="512" OPTIMAL_IO_SIZE="32768" PHYSICAL_SECTOR_SIZE="512" LOGICAL_SECTOR_SIZE="512"
/dev/sda: MINIMUM_IO_SIZE="512" PHYSICAL_SECTOR_SIZE="512" LOGICAL_SECTOR_SIZE="512"

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkid: update man page/usage()
Karel Zak [Thu, 13 May 2010 18:42:28 +0000 (20:42 +0200)]
blkid: update man page/usage()

The "-s <tag>" options is usable for low-level probing more too. This
feature should be documented.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoaddpart: use atoll() for parsing command line arguments
Thomas Fehr [Tue, 11 May 2010 15:09:46 +0000 (17:09 +0200)]
addpart: use atoll() for parsing command line arguments

Addresses: http://bugzilla.novell.com/show_bug.cgi?id=603328
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoshould build Depend: dpkg or install-info
LaMont Jones [Wed, 12 May 2010 12:38:46 +0000 (06:38 -0600)]
should build Depend: dpkg or install-info

14 years agocfdisk: support non-ascii characters in input
Karel Zak [Fri, 7 May 2010 12:12:26 +0000 (14:12 +0200)]
cfdisk: support non-ascii characters in input

On Sat, Apr 03, 2010 at 12:58:48PM +0000, Jorge wrote:
> When you want to write changes to disk you're asked for a
> confirmation, like this one:
>
>   Are you sure you want to write the partition table to disk? (yes
>   or no)
>
> There is no problem on the English version, but when you launch the
> program in Spanish you get this:
>
>   ¿Está seguro de que desea escribir la tabla de particiones en el
> disco?
>      (sí o no):
>
> You can't type the "í" character. Trying to do so will end in no
> input at all. That is, typing in my keyboard "´" then "i" leads to
> nothing. So you can't write changes to disk, and you must launch the
> program in English for it to operate.

Reported-by: Jorge <yo@jorgesuarezdelis.name>
Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/205327
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: update blkid/md-raid1-* tests
Karel Zak [Thu, 6 May 2010 13:30:18 +0000 (15:30 +0200)]
tests: update blkid/md-raid1-* tests

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: fix readline usage
Karel Zak [Thu, 6 May 2010 13:29:20 +0000 (15:29 +0200)]
libblkid: fix readline usage

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: add blkid test for TuxOnIce
Karel Zak [Thu, 6 May 2010 11:11:40 +0000 (13:11 +0200)]
tests: add blkid test for TuxOnIce

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: set correct offsets for TuxOnIce signature
Chow Loong Jin [Fri, 30 Apr 2010 23:55:41 +0000 (07:55 +0800)]
libblkid: set correct offsets for TuxOnIce signature

TuxOnIce stores its signature at the beginning of the swap, rather than
at the end of the first page like swsusp does.

[kzak@redhat.com: - use macro for TOI magic string,
                  - check for TOI in swap probing function to avoid
                    collision between swap and TOI]

Signed-off-by: Chow Loong Jin <hyperair@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agounshare: drop potential euid privileges before exec
Karel Zak [Thu, 6 May 2010 07:59:16 +0000 (09:59 +0200)]
unshare: drop potential euid privileges before exec

This patch drops potential euid privileges before executing the target
program. This allows to setuid unshare.

The unshare(1) is still distributed as non-setuid program.

Based on patch from Martin Pohlack <mp26@os.inf.tu-dresden.de>.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoionice: non-cryptic error message when ionice can't execvp
Ævar Arnfjörð Bjarmason [Mon, 3 May 2010 18:24:26 +0000 (18:24 +0000)]
ionice: non-cryptic error message when ionice can't execvp

Previously ionice would reply like this when it couldn't find the
command to execute:

    $ ionice -c 3 does-not-exist
    ionice: execvp failed: No such file or directory

Getting that message from cron because you haven't set the right $PATH
makes it hard to track down the problem. Now it says:

    $ ionice -c 3 does-not-exist
    ionice: executing does-not-exist failed: No such file or directory

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 years agotests: add blkid tests for RAID1
Karel Zak [Mon, 3 May 2010 09:20:52 +0000 (11:20 +0200)]
tests: add blkid tests for RAID1

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoscript: optionally compile with libutempter to update utmp
Karel Zak [Thu, 29 Apr 2010 10:25:06 +0000 (12:25 +0200)]
script: optionally compile with libutempter to update utmp

Use --with-utempter to enable utempter support. The libutempter calls
/usr/libexec/utempter/utempter suid helper to update utmp and wtmp
files.

Old version:
$ script
Script started, file is typescript

$ who i am

$ exit
Script done, file is typescript

New version:
$ script
Script started, file is typescript

$ who i am
kzak     pts/6        2010-04-29 12:30

$ exit
Script done, file is typescript

Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=477753
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agofdisk: improve 'move begin of partition' command
Karel Zak [Wed, 28 Apr 2010 12:40:46 +0000 (14:40 +0200)]
fdisk: improve 'move begin of partition' command

The 'b' command ("move beginning of data in a partition")
implementation is too restricted. For example:

     Device Boot      Start         End      Blocks   Id  System
  /dev/sdb1            2048       22527       10240   83  Linux
  ....
  Partition number (1-4): 1
  New beginning of data (2048-22527, default 2048):
                         ^^^^^^^^^^

the range is defined by the current partition size. New version:

  Partition number (1-4): 1
  New beginning of data (1-22527, default 2048):
                         ^^^^^^^

allows to move the begin to arbitrary place if the place is not
allocated by any other partition. This is useful for people who don't
want to use the default partitioning (1MiB offset, 1MiB grain).

The 'b' command is expert command and does not force users to use an
aligned LBA (fdisk(8) still prints warning (in 'p' command) if any
partition is not aligned to the physical sector boundary).

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agofdisk: improve add partition dialog
Karel Zak [Wed, 28 Apr 2010 08:10:39 +0000 (10:10 +0200)]
fdisk: improve add partition dialog

old version:
Partition number (1-4):

new version:
Partition number (1-4, default 1):

where the default value is the first non-used primary partition.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: fix LUKS version
Karel Zak [Wed, 28 Apr 2010 07:10:27 +0000 (09:10 +0200)]
libblkid: fix LUKS version

Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agotests: explicitly use --chunk and --metadata in MD test
Karel Zak [Tue, 27 Apr 2010 15:12:50 +0000 (17:12 +0200)]
tests: explicitly use --chunk and --metadata in MD test

The newer mdadm version uses a different chunk size and superblock
format, so the final MD device has a different I/O limits (optimal I/O
size is 1MiB for 1.20 metadata).

We have to explicitly use the same format which is expected in our tests.

Reported-by: Yulia Kopkova <ykopkova@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agomount: revert ugly ENOMEDIUM support
Karel Zak [Tue, 27 Apr 2010 13:15:11 +0000 (15:15 +0200)]
mount: revert ugly ENOMEDIUM support

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoscript: preserve child exit status
Karel Zak [Tue, 27 Apr 2010 10:11:31 +0000 (12:11 +0200)]
script: preserve child exit status

The patch also removes unnecessary detection of child process
existence (by kill()). This code was replaces with SIGCHLD
hold/release around fork().

Based on the patch from therealneworld@gmail.com.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agologger: add note about 'kern' to the man page
Karel Zak [Tue, 27 Apr 2010 06:31:03 +0000 (08:31 +0200)]
logger: add note about 'kern' to the man page

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agortcwake: add disable action to rtcwake man page
Marek Otahal [Fri, 23 Apr 2010 12:20:54 +0000 (14:20 +0200)]
rtcwake: add disable action to rtcwake man page

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agortcwake : add disable action for rtc alarm
Marek Otahal [Fri, 23 Apr 2010 12:16:59 +0000 (14:16 +0200)]
rtcwake : add disable action for rtc alarm

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: reset superblocks result after error
Karel Zak [Fri, 23 Apr 2010 12:03:44 +0000 (14:03 +0200)]
libblkid: reset superblocks result after error

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: cleanup some docs
Karel Zak [Fri, 23 Apr 2010 11:56:58 +0000 (13:56 +0200)]
libblkid: cleanup some docs

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: add blkid_partlist_get_table()
Karel Zak [Fri, 23 Apr 2010 11:35:20 +0000 (13:35 +0200)]
libblkid: add blkid_partlist_get_table()

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: don't gather PART_ENTRY_* values for binary interface
Karel Zak [Fri, 23 Apr 2010 09:20:08 +0000 (11:20 +0200)]
libblkid: don't gather PART_ENTRY_* values for binary interface

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agowipefs: print warning is PT detected
Karel Zak [Thu, 22 Apr 2010 19:53:11 +0000 (21:53 +0200)]
wipefs: print warning is PT detected

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkid: improve RAIDs and tiny devices probing
Karel Zak [Thu, 22 Apr 2010 19:52:31 +0000 (21:52 +0200)]
blkid: improve RAIDs and tiny devices probing

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: fix collision between RAID and PT probing
Karel Zak [Thu, 22 Apr 2010 19:30:04 +0000 (21:30 +0200)]
libblkid: fix collision between RAID and PT probing

The RAID signature is usually at end of the block device. We have to
differentiate between:

- RAID signature at the end of disk, and
- RAID signature at the end of the last partition

The position of the signature is same in both cases... It means we have
to the parse partition table and check if the area where is RAID signature
is covered by any partition. If yes, then the RAID signature belongs to the
partition and has to be ignored during whole-disk probing.

The second problem are RAID1 underlaying disks (=raid members).  The
RAID device could be partitioned, in such a case the partition table
is visible from underlaying devices. These partition tables has to be
ignored. The libblkid ignores partition tables on raid members now.

Note that all these changes are implemented for blkid_do_safeprobe()
only. The others functions allow to access all detected superblocks or
partition tables.

Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=543749
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoliblkid: export magic strings from raids
Karel Zak [Wed, 21 Apr 2010 12:24:52 +0000 (14:24 +0200)]
liblkid: export magic strings from raids

The library provides detected magic strings by SBMAGIC= and offsets of
the magic strings by SBMAGIC_OFFSET= variables. This patch allows to
support this feature for RAIDs and filesystems where the magic string
is not on fixed position.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: add partial support for superblock binary API
Karel Zak [Mon, 19 Apr 2010 21:03:30 +0000 (23:03 +0200)]
libblkid: add partial support for superblock binary API

The API is used only internally.

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: cleanup fstat() usage
Karel Zak [Mon, 19 Apr 2010 09:01:59 +0000 (11:01 +0200)]
libblkid: cleanup fstat() usage

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: export functions to get whole-disk devno
Karel Zak [Mon, 19 Apr 2010 08:51:37 +0000 (10:51 +0200)]
libblkid: export functions to get whole-disk devno

Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agoblkid: add \n to the "-o udev" output when probe more devices
Karel Zak [Thu, 15 Apr 2010 11:15:35 +0000 (13:15 +0200)]
blkid: add \n to the "-o udev" output when probe more devices

Old output:
# blkid -p -o udev /dev/sda{1,3}
ID_FS_LABEL=/boot
ID_FS_LABEL_ENC=\x2fboot
ID_FS_UUID=f1cd38fa-c887-4ab8-834b-c8ee659b97fe
ID_FS_UUID_ENC=f1cd38fa-c887-4ab8-834b-c8ee659b97fe
ID_FS_VERSION=1.0
ID_FS_TYPE=ext3
ID_FS_USAGE=filesystem
ID_FS_LABEL=BAR
ID_FS_LABEL_ENC=BAR
ID_FS_UUID=1f2aa318-9c34-462e-8d29-260819ffd657
ID_FS_UUID_ENC=1f2aa318-9c34-462e-8d29-260819ffd657
ID_FS_VERSION=2
ID_FS_TYPE=swap
ID_FS_USAGE=other

new output:
# blkid -p -o udev /dev/sda{1,3}
ID_FS_LABEL=/boot
ID_FS_LABEL_ENC=\x2fboot
ID_FS_UUID=f1cd38fa-c887-4ab8-834b-c8ee659b97fe
ID_FS_UUID_ENC=f1cd38fa-c887-4ab8-834b-c8ee659b97fe
ID_FS_VERSION=1.0
ID_FS_TYPE=ext3
ID_FS_USAGE=filesystem

ID_FS_LABEL=BAR
ID_FS_LABEL_ENC=BAR
ID_FS_UUID=1f2aa318-9c34-462e-8d29-260819ffd657
ID_FS_UUID_ENC=1f2aa318-9c34-462e-8d29-260819ffd657
ID_FS_VERSION=2
ID_FS_TYPE=swap
ID_FS_USAGE=other

Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
14 years agolibblkid: fix some typos
Milan Broz [Thu, 8 Apr 2010 19:15:25 +0000 (21:15 +0200)]
libblkid: fix some typos

Signed-off-by: Milan Broz <mbroz@redhat.com>