Commit Graph

2740 Commits

Author SHA1 Message Date
Karel Zak c0f20acb7a build-sys: add term-utils/
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-02 13:54:05 +01:00
Karel Zak 3d604b4367 libblkid: fix gcc warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-01 15:31:49 +01:00
Karel Zak c2ec2ff9a2 libblkid: fix EFI GPT uuid byte order
Intel uses little-endians for UUID, the rest of the sane world uses 16
byte big-endian array...

Reported-by: Andrew Lutomirski <luto@mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-03-01 10:01:21 +01:00
Karel Zak a1504d8bf5 kill: add -q sigval to use sigqueue(2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-28 17:15:40 +01:00
Karel Zak 2713fc3ea7 kill: translate "-l <num>" to RT<n>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-28 15:09:18 +01:00
Karel Zak ae63d823ab kill: add support for real-time signals
Newly supported syntax for RT signals:

 RT<n>  		= SIGRTMIN + n
 RTMIN+<n>		= SIGRTMIN + n
 RTMAX-<n>		= SIGRTMAX - n

the final signal number has to be in interval [SIGRTMIN,SIGRTMAX].

Note that the "SIG" prefix is also supported for RT signals of course.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=676297
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-28 13:43:28 +01:00
Lawrence Rust e6d1dc9416 rtcwake: test for available suspend modes
Signed-off-by: Lawrence Rust <lawrence@softsystem.co.uk>
2011-02-28 10:21:12 +01:00
Marek Polacek 15103c4bc6 dmesg.c: cleanups -- use err(), xalloc()
Signed-off-by: Marek Polacek <mpolacek@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-28 10:10:32 +01:00
Karel Zak d8fb986bf5 docs: update TODO
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-26 14:14:17 +01:00
Karel Zak 8b7eae458c libblkid: try to detect if PT is newer than LVM
LVM (pvcreate) wipes the begin of the device. If there is a PT in the
wiped area then LVM signature is obsolete.

 # pvcreate /dev/sdb
 # fdisk /dev/sdb

old version:
 # blkid -p -o udev /dev/sdb
 ID_FS_TYPE=LVM2_member

new version:
 # blkid -p -o udev /dev/sdb
 ID_PART_TABLE_TYPE=dos

Reported-by: Matej Cepl <mcepl@redhat.com>
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=679799
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-24 14:21:11 +01:00
Karel Zak 947a7c9ca5 docs: update TODO
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-23 17:26:19 +01:00
Karel Zak 0ad19c2c0a tests: update libmount tests (add optstr output)
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-23 00:22:00 +01:00
Karel Zak ddfc6f28a7 libmount: better "user" evaluation
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-23 00:21:54 +01:00
Karel Zak f2b3a3a328 libmount: don't export functions for vfs/fs/userspace mount options
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-22 18:41:20 +01:00
Karel Zak 8a8835bc65 ipcs: fix typo
Reported-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 19:06:54 +01:00
Karel Zak d5e582d969 docs: update TODO file
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 17:18:09 +01:00
Dave Reisner 449f9336bb lsblk: bitwise or TT_FL_ASCII with tt_flags instead of setting
Signed-off-by: Dave Reisner <d@falconindy.com>
2011-02-21 17:10:55 +01:00
Daniel Drake 7894bf0f08 hwclock: make RTC default to UTC time
If /etc/adjtime doesn't specify UTC or LOCAL, rtcwake defaults to UTC
and hwclock defaults to LOCAL.

Switch hwclock to meet the behaviour of rtcwake (default=UTC), also
matching the kernel's CONFIG_RTC_HCTOSYS behaviour.

The user impact of this change should be minimal, as anyone who has run
"hwclock --systohc" before will have their UTC/LOCAL choice already
recorded in /etc/adjtime.

Signed-off-by: Daniel Drake <dsd@laptop.org>
2011-02-21 17:07:57 +01:00
Karel Zak 2ed7a5a3d7 cfdisk: fix compiler warning
cfdisk.c: In function ‘menuUpdate’:
cfdisk.c:1034:25: warning: unused variable ‘ymargin’

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 17:06:26 +01:00
Francesco Cosoleto 87672e98ec cfdisk: remove unused vertical menu direction code
It isn't used and doesn't seem very important, as well as requires more
work to run properly.

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2011-02-21 17:04:16 +01:00
Sami Kerola 89601b8e39 scriptreplay: bug in argument check
Number of arguments cannot be at the same time too many and few.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-02-21 16:54:48 +01:00
Sami Kerola 33e4710674 script: inform about long options in script manual page
[kzak@redhat.com: - use -V instead of -v]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 16:50:44 +01:00
Sami Kerola 3ff526391f script: support for long options
[kzak@redhat.com: - use -V instead of -v
		  - minor changes in usage()]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 16:47:00 +01:00
Sami Kerola 360d500547 script: use libc error printing facilities
[kzak@redhat.com: - use more verbose warnings]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 16:41:40 +01:00
Sami Kerola 9092858482 script: fix compiler warnings
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-02-21 16:31:37 +01:00
Francesco Cosoleto a6771a52a2 getopt: fix '--unqote' typo in usage text
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
2011-02-21 16:26:20 +01:00
Karel Zak 8d1b0fe28e mkswap: fix compiler warning
mkswap.c: In function ‘main’:
mkswap.c:646:6: warning: too few arguments for format

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 16:22:52 +01:00
Sami Kerola 17945af6be doc: mention mkswap long options in man page
The update will also expand kernel version numbers to have a
month and year next to them. This should help users can get idea
how long, for example, swap v1 has been around.

[kzak@redhat.com: - modify synopsis, remove duplicate info about page size]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 16:20:53 +01:00
Sami Kerola f2704664ba mkswap: coding style unification
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-02-21 16:13:51 +01:00
Sami Kerola 4c60c667c4 mkswap: fix to compiler warnings
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-02-21 16:12:49 +01:00
Sami Kerola a4d3e778ab mkswap: use EXIT_ values
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-02-21 16:12:48 +01:00
Sami Kerola e079c4e6ed mkswap: support long options and check user inputs
[kzak@redhat-com: - mimor changes to usage()]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 16:02:00 +01:00
Karel Zak 69e433d8d9 lib: [strutils.c] more robust strtol checks
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 15:35:04 +01:00
Sami Kerola 94d32126bf strutils: new wrapper function strtoll_or_err
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-02-21 15:32:50 +01:00
Sami Kerola 94a50e285a mkswap: use xalloc
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-02-21 15:29:49 +01:00
Sami Kerola 00a7d0d2f0 mkswap: use libc error messaging facilities
[kzak@redhat.com: - use "%s from %s" for -V output]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 15:27:52 +01:00
Karel Zak 1201340290 tests: add tests for [u]mount regular file
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 15:12:30 +01:00
Petr Uzel f4612577c9 umount: allow unmounting loopdev specified by associated file
Make it possible to unmount a filesystem on a loop device if it is
specified by associated backing file. It does not attempt to unmount
anything if there are more than one loop device associated with the
given file.

Umount looks for associated loopdevice(s) only if umount is called
with the regular file as an argument.

Before:
	mount -o loop -t ext2 img mnt
	umount -v img
	> Could not find /home/puzel/upstream/util-linux/img in mtab
	> umount: img: not mounted

After:
	mount -o loop -t ext2 img mnt
	umount -v img
	> img is associated with /dev/loop0, trying to unmount it
	> /dev/loop0 has been unmounted

[kzak@redhat.com: - fix memory leak in lomount.c]

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=666161
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 14:54:43 +01:00
Petr Uzel 8ba013af64 include: [xalloc.h]: mention strdup in the file description
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-21 14:41:37 +01:00
Petr Uzel 4581647a62 lscpu: use xstrdup from xalloc.h
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-21 14:41:36 +01:00
Petr Uzel b642d0e0c9 losetup: spelling fixes
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2011-02-21 14:41:34 +01:00
Sami Kerola 85bf44b714 hexdump: new usage(), xalloc and err.h stuff
New usage help screen and print version switch. Also fixes to
exit codes, util linux xmalloc replaced emalloc and every error
print is using libc error function.

[kzak@redhat.com: - minor changes in formatting and coding style]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-21 14:38:23 +01:00
Jens Kristian Søgaard 4dad230ffb ipcs: really show all resources when -a and -i are combined
When you have more than one resource with the same id (but differing
types) combining -a and -i does not show all resources. This patch
corrects that.

Signed-off-by: Jens Kristian Søgaard <jens@mermaidconsulting.dk>
2011-02-21 14:26:45 +01:00
Karel Zak cc6b1d11ea lsblk: fix readlink() usage
Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-18 14:36:04 +01:00
Karel Zak 5b7cb8687f Revert "libmount: do not check for EAGAIN after flock()"
Linux is not 100% POSIX compatible in this area...
 strace: "flock(3, LOCK_EX|LOCK_NB)   = -1 EAGAIN (Resource temporarily unavailable)"

This reverts commit 78d8c28f74.
2011-02-18 10:53:50 +01:00
Karel Zak 48399694a9 Revert "libuuid: do not check for EAGAIN after flock()"
Linux is not 100% POSIX compatible in this area...
 strace: "flock(3, LOCK_EX|LOCK_NB)   = -1 EAGAIN (Resource temporarily unavailable)"

This reverts commit d6c8d399b9.
2011-02-18 10:52:22 +01:00
Karel Zak 7be3d92f88 build-sys: add uuid_generate_time_safe.3 .gitignore
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-17 16:32:36 +01:00
Karel Zak 19a9d0b7c3 docs: update TODO file
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-17 16:30:52 +01:00
Karel Zak d73fd39176 chsh: fix gcc link() warn_unused_result warning
setpwnam.c:176:9: warning: ignoring return value of ‘link’, declared with attribute warn_unused_result

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-17 12:00:36 +01:00
Karel Zak f1c2eaac53 fsck: fix -C parsing
Reported-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-02-17 11:56:51 +01:00