]> err.no Git - util-linux/log
util-linux
15 years agomount: clean up SPEC canonicalization
Karel Zak [Sat, 13 Dec 2008 01:47:42 +0000 (02:47 +0100)]
mount: clean up SPEC canonicalization

The SPEC (fsname) field in fstab/mtab could be:

 - devname
 - NAME=value (e.g LABEL, UUID)
 - directory (MS_MOVE, MS_BIND, ..)
 - pseudo-fs keyword (tmpfs, proc, sysfs, ...)

the pseudo-fs keywords shouldn't be canonicalized to absolute path. It
means we have to differ between SPEC and mountpoint (fs_dir).

Unfortunately, the keywords was checked on wrong place. This patch
move this check to the new function canonicalize_spec().

The fsname in mtab entry is canonicalized when the FS type is not
pseudo filesystem.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: remove unnecessary gettext call
Karel Zak [Fri, 12 Dec 2008 14:20:06 +0000 (15:20 +0100)]
fdisk: remove unnecessary gettext call

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agopg: add gettext call for the help string
Karel Zak [Fri, 12 Dec 2008 14:13:44 +0000 (15:13 +0100)]
pg: add gettext call for the help string

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agorefresh gitignore
Karel Zak [Fri, 12 Dec 2008 14:03:18 +0000 (15:03 +0100)]
refresh gitignore

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agosimpleinit: cleanup gettext calls, use snprintf()
Karel Zak [Fri, 12 Dec 2008 14:01:15 +0000 (15:01 +0100)]
simpleinit: cleanup gettext calls, use snprintf()

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agochfn: several strings without gettext calls
Karel Zak [Fri, 12 Dec 2008 13:44:04 +0000 (14:44 +0100)]
chfn: several strings without gettext calls

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoTODO: add request to use nl_langinfo()
Karel Zak [Fri, 12 Dec 2008 13:41:34 +0000 (14:41 +0100)]
TODO: add request to use nl_langinfo()

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoRevert "login-utils: several strings without gettext calls"
Karel Zak [Fri, 12 Dec 2008 13:33:29 +0000 (14:33 +0100)]
Revert "login-utils: several strings without gettext calls"

This reverts commit 64fefaf5bffdd4041190f1e5ed4b5d0100638c0d.

It does not make sense to localize config options (wdays in
checktty.c) and debug messages (main() in checktty.c.

15 years agomount: fix mount_static_LDADD
Karel Zak [Fri, 12 Dec 2008 13:04:19 +0000 (14:04 +0100)]
mount: fix mount_static_LDADD

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: add md5 regression test
Karel Zak [Mon, 8 Dec 2008 11:36:07 +0000 (12:36 +0100)]
tests: add md5 regression test

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoinclude: use __BYTE_ORDER rather than AC specific WORDS_BIGENDIAN
Karel Zak [Mon, 8 Dec 2008 10:16:37 +0000 (11:16 +0100)]
include: use __BYTE_ORDER rather than AC specific WORDS_BIGENDIAN

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolib: add __BYTE_ORDER to md5.c
Karel Zak [Mon, 8 Dec 2008 10:12:30 +0000 (11:12 +0100)]
lib: add __BYTE_ORDER to md5.c

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: add MD5 regression test
Karel Zak [Sat, 6 Dec 2008 00:43:55 +0000 (01:43 +0100)]
tests: add MD5 regression test

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: add swabN() regression test
Karel Zak [Fri, 5 Dec 2008 15:27:19 +0000 (16:27 +0100)]
tests: add swabN() regression test

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoinclude: swapheader.h is missing in Makefile.am
Karel Zak [Fri, 5 Dec 2008 14:53:40 +0000 (15:53 +0100)]
include: swapheader.h is missing in Makefile.am

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomkfs.minix: (and fsck) rename bitops.h
Karel Zak [Fri, 5 Dec 2008 13:38:54 +0000 (14:38 +0100)]
mkfs.minix: (and fsck) rename bitops.h

This patch renames bitops.h to minix_bitops.h to avoid possible
collisions with global include/bitops.h file.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: add missing AC_C_BIGENDIAN
Karel Zak [Fri, 5 Dec 2008 13:01:12 +0000 (14:01 +0100)]
build-sys: add missing AC_C_BIGENDIAN

This configure test is required in include/bitops.h.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoswapon: add swap format detection and pagesize check
Matthias Koenig [Thu, 27 Nov 2008 11:32:56 +0000 (12:32 +0100)]
swapon: add swap format detection and pagesize check

As swap format depends on the pagesize being used, it may happen
that the pagesize of the swap space and the current pagesize differ,
resulting in swapon to fail when trying to enable such a swap space.
In such a case swapon should rather reinitialize the swap space.

[kzak@redhat.com: - add blkdev.c to the global swapon_SOURCES
                  - don't try to detect for huge pages on small swap
                    areas (or when read() returns less than MAX_PAGESIZE)
                  - fix fprintf() format string]

Co-Author: Olaf Hering <olh@suse.de>
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoinclude: move swapheader.h to include
Matthias Koenig [Thu, 27 Nov 2008 11:32:55 +0000 (12:32 +0100)]
include: move swapheader.h to include

[kzak@redhat.com: add ifndef _SWAPHEADER_H]

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: remove spurious newline from mount.8
Mike Frysinger [Fri, 28 Nov 2008 21:57:24 +0000 (16:57 -0500)]
mount: remove spurious newline from mount.8

The man page display shows quote marks instead of being interpreted by the
.B statement and hidden away due to a spurious newline.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
15 years agosetterm: fix -blank man page
Karel Zak [Fri, 5 Dec 2008 10:41:28 +0000 (11:41 +0100)]
setterm: fix -blank man page

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoflock: Allow lock directory
Alexey Gladkov [Mon, 24 Nov 2008 15:15:36 +0000 (18:15 +0300)]
flock: Allow lock directory

With this patch, you can lock directory. Additionally,
lockfile opens with O_NOCTTY.

Try to open file with O_CREAT flag first, and without it
if open fails with EISDIR.  Suggested by H. Peter Anvin.

Signed-off-by: Alexey Gladkov <legion@altlinux.org>
15 years agodocs: add feature-requests from RH bugzilla to TODO list
Karel Zak [Tue, 2 Dec 2008 13:27:37 +0000 (14:27 +0100)]
docs: add feature-requests from RH bugzilla to TODO list

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: use subsections in mount.8 DESCRIPTION
Karel Zak [Thu, 27 Nov 2008 13:16:37 +0000 (14:16 +0100)]
mount: use subsections in mount.8 DESCRIPTION

The DESCRIPTION section is huge non-structuralized mess. This patch is
attempt to make this part of the man page more readable.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: create separate section for fs-independent options in mount.8
Karel Zak [Thu, 27 Nov 2008 12:29:44 +0000 (13:29 +0100)]
mount: create separate section for fs-independent options in mount.8

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: reorder list of options in mount.8
Karel Zak [Thu, 27 Nov 2008 12:03:25 +0000 (13:03 +0100)]
mount: reorder list of options in mount.8

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: add i_version support
Karel Zak [Thu, 27 Nov 2008 11:08:44 +0000 (12:08 +0100)]
mount: add i_version support

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotailf: unistd.h is included more than once
Karel Zak [Wed, 26 Nov 2008 13:40:45 +0000 (14:40 +0100)]
tailf: unistd.h is included more than once

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agordev: cleanup includes
Karel Zak [Wed, 26 Nov 2008 13:40:03 +0000 (14:40 +0100)]
rdev: cleanup includes

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agologin: cleanup includes
Karel Zak [Wed, 26 Nov 2008 13:38:36 +0000 (14:38 +0100)]
login: cleanup includes

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoagetty: sys/types.h and time.h are included more than once
Karel Zak [Wed, 26 Nov 2008 13:35:31 +0000 (14:35 +0100)]
agetty: sys/types.h and time.h are included more than once

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agohwclock: clock.h is included more than once
Karel Zak [Wed, 26 Nov 2008 13:31:19 +0000 (14:31 +0100)]
hwclock: clock.h is included more than once

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agogetopt: remove unnecessary ifdefs
Karel Zak [Wed, 26 Nov 2008 13:25:25 +0000 (14:25 +0100)]
getopt: remove unnecessary ifdefs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: rename ENABLE_CMDTAGQ macro
Karel Zak [Wed, 26 Nov 2008 13:24:52 +0000 (14:24 +0100)]
fdisk: rename ENABLE_CMDTAGQ macro

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotools: add checkconfig to top-level Makefile
Karel Zak [Wed, 26 Nov 2008 12:42:16 +0000 (13:42 +0100)]
tools: add checkconfig to top-level Makefile

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotools: rename codecheck-config to checkconfig.sh
Karel Zak [Wed, 26 Nov 2008 11:48:37 +0000 (12:48 +0100)]
tools: rename codecheck-config to checkconfig.sh

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotools: add checkincludes.pl (from linux kernel)
Karel Zak [Wed, 26 Nov 2008 11:42:35 +0000 (12:42 +0100)]
tools: add checkincludes.pl (from linux kernel)

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: fix man page typo
Karel Zak [Tue, 25 Nov 2008 15:19:36 +0000 (16:19 +0100)]
fdisk: fix man page typo

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: remove useless return value checks in testing scripts
Américo Wang [Wed, 19 Nov 2008 18:11:23 +0000 (18:11 +0000)]
tests: remove useless return value checks in testing scripts

Signed-off-by: WANG Cong <wangcong@zeuux.org>
15 years agotests: update namei reg.test
Karel Zak [Wed, 19 Nov 2008 12:38:01 +0000 (13:38 +0100)]
tests: update namei reg.test

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: clean up the testing scripts
Américo Wang [Thu, 6 Nov 2008 15:46:22 +0000 (15:46 +0000)]
tests: clean up the testing scripts

Do some cleanups to the testing scripts.

Signed-off-by: WANG Cong <wangcong@zeuux.org>
15 years agobuild-sys: add --disable-mount
Alon Bar-Lev [Fri, 14 Nov 2008 16:40:25 +0000 (18:40 +0200)]
build-sys: add --disable-mount

I use busybox for most of the utilities, still lacks a few that I wish to use
from util-linux...

So mount comes from busybox.  And during the cross compile I don't want to
compile the mount dependencies only to make the configure script happy...

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agopivot_root: clean up
Karel Zak [Wed, 19 Nov 2008 10:15:44 +0000 (11:15 +0100)]
pivot_root: clean up

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: move pivot_root(8) to sys-utils
Karel Zak [Wed, 19 Nov 2008 10:07:58 +0000 (11:07 +0100)]
build-sys: move pivot_root(8) to sys-utils

This patch moves pivot_root.{8,c) from mount/ to sys-utils/ directory.
There is not ant relation between pivot_root source code and the rest of
code in the mount.

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agolosetup: add warning about read-only mode
Karel Zak [Tue, 18 Nov 2008 14:50:38 +0000 (15:50 +0100)]
losetup: add warning about read-only mode

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agolosetup: try to set up loop readonly if EACCES
Matthias Koenig [Thu, 6 Nov 2008 13:45:38 +0000 (14:45 +0100)]
losetup: try to set up loop readonly if EACCES

Currently mounting/losetup an image fails if it is accessable readonly.

There are no problems if it is a file on a local filesystem.
It seems only to happen if it is a NFS mounted image, which is
read-write in permission but with root_squash option.

set_loop checks only for EROFS to retry open with readonly mode,
but in this case we get EACCES.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
16 years agocfdisk: accept yes/no as fallback
Matthias Koenig [Thu, 6 Nov 2008 14:49:30 +0000 (15:49 +0100)]
cfdisk: accept yes/no as fallback

Accept "yes" or "no" as fallback in case the question
has not been translated.

[kzak@redhat.com: note that rpmatch(3) looks at only the first
                  character of response, but we need have to
                  check the full yes/no string.]

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
16 years agomkfs.minix: fix size detection
Matthias Koenig [Thu, 6 Nov 2008 14:43:46 +0000 (15:43 +0100)]
mkfs.minix: fix size detection

blkdev_get_size returns size in bytes, so BLOCKS has to be
calculated accordingly.
Use stat value for size if device is not a block device.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
16 years agofdisk: add some missing includes
Matthias Koenig [Thu, 6 Nov 2008 14:24:24 +0000 (15:24 +0100)]
fdisk: add some missing includes

Currently these missing includes prevent that HDIO_GETGEO
is defined, so is_probably_full_disk always uses the
"silly heuristic" method.

[kzak@redhat.com: add also unistd.h]

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agonamei: add --owners and --long options
Karel Zak [Thu, 30 Oct 2008 12:42:50 +0000 (13:42 +0100)]
namei: add --owners and --long options

Added file owner and group name printing support. The groupnames and
usernames are cached to avoid an extra overhead. This implementation
does not use fixed width of user/group name columns.

$ namei -l /var/www/cgi-bin
f: /var/www/cgi-bin
 drwxr-xr-x root root /
 drwxr-xr-x root root var
 drwxr-xr-x root root www
 drwxr-xr-x root root cgi-bin

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agonamei: new re-written version
Karel Zak [Thu, 30 Oct 2008 09:19:39 +0000 (10:19 +0100)]
namei: new re-written version

This new version:
 * not based on chdir()
 * implemented without recursion (does not depend on stack size)
 * list of directories is stored in allocated memory (the code is
   extendable with new functionality (e.g. show usernames, groupnames,
   selunux contexts, ...).
 * supports long command line options
 * adds a new command line option:
     -n, --nosymlinks    don't follow symlinks

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agofdisk: support +cylinder notation
Karel Zak [Thu, 13 Nov 2008 22:08:34 +0000 (23:08 +0100)]
fdisk: support +cylinder notation

Currently fdisk does not support +cylinder notation and reports
"Unsupported suffix: ''".

Reported-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agofdisk: read /proc/partitions in more robust way
Karel Zak [Thu, 13 Nov 2008 14:37:22 +0000 (15:37 +0100)]
fdisk: read /proc/partitions in more robust way

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agofdisk: cannot create partition with starting beyond 1 TB
Karel Zak [Thu, 13 Nov 2008 13:56:17 +0000 (14:56 +0100)]
fdisk: cannot create partition with starting beyond 1 TB

fdisk(8) uses "unsigned long long" for all internal calculations --
let use it for start of partition too.

Address-Red-Hat-Bugzilla: #471369
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agosfdisk: fix Compilation Error
CAI Qian [Thu, 23 Oct 2008 04:21:14 +0000 (21:21 -0700)]
sfdisk: fix Compilation Error

This patch fixes a compilation error in the latest tree.

Signed-off-by: CAI Qian <caiqian@cclom.cn>
16 years agolscpu: return EXIT_SUCCESS at the end
Matthias Koenig [Tue, 21 Oct 2008 16:45:40 +0000 (18:45 +0200)]
lscpu: return EXIT_SUCCESS at the end

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
16 years agotests: refresh Makefile.am (add missing lscpu tests)
Karel Zak [Wed, 22 Oct 2008 11:56:07 +0000 (13:56 +0200)]
tests: refresh Makefile.am (add missing lscpu tests)

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agotests: add lscpu(1) test for fullvirt. Xen x86_64
Karel Zak [Wed, 22 Oct 2008 11:49:23 +0000 (13:49 +0200)]
tests: add lscpu(1) test for fullvirt. Xen x86_64

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agotests: add lscpu(1) test for paravirt. Xen i386
Karel Zak [Wed, 22 Oct 2008 11:22:21 +0000 (13:22 +0200)]
tests: add lscpu(1) test for paravirt. Xen i386

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agotests: add mk-lscpu-input.sh
Karel Zak [Wed, 22 Oct 2008 11:13:41 +0000 (13:13 +0200)]
tests: add mk-lscpu-input.sh

This script makes a copy from system /proc and /sys. The result is
useful for lscpu(1) regression tests.

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agolscpu: add Hypervisor detection
Karel Zak [Tue, 30 Sep 2008 23:29:32 +0000 (01:29 +0200)]
lscpu: add Hypervisor detection

This patch adds two new fields:

 * "Hypervisor vendor"  -- based on CPUID and hypervisor specific
   PCI devices. lscpu(1) supports KVM, XEN, Microsoft HV now.

 * "Virtualization type"
- "none" = Xen dom0
- "full" = full virtualization (KVM, Xen, ...)
- "para" = Xen paravirtualization

Co-Author: Ky Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agodocs: update TODO list
Karel Zak [Thu, 16 Oct 2008 21:44:59 +0000 (23:44 +0200)]
docs: update TODO list

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agohwclock: remove "cli" and "sti" from i386 CMOS code
Karel Zak [Thu, 16 Oct 2008 21:37:38 +0000 (23:37 +0200)]
hwclock: remove "cli" and "sti" from i386 CMOS code

The protection against context switch is nonsense. There is possible
to optimize the access to CMOS by mlockall(MCL_CURRENT) and SCHED_FIFO.

For more details see: http://lkml.org/lkml/2008/10/12/132

Reported-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agoipcs: fix exit codes, remove tailing white-spaces
Karel Zak [Tue, 7 Oct 2008 08:23:23 +0000 (10:23 +0200)]
ipcs: fix exit codes, remove tailing white-spaces

Addresses-Red-Hat-Bugzilla: #465911
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agomount: sync tmpfs info in mount.8 with Documentation/filesystems/tmpfs.txt
Karel Zak [Mon, 6 Oct 2008 10:56:37 +0000 (12:56 +0200)]
mount: sync tmpfs info in mount.8 with Documentation/filesystems/tmpfs.txt

Addresses-Red-Hat-Bugzilla: #465761
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agomount: sync FAT info in mount.8 with Documentation/filesystems/vfat.txt
Karel Zak [Mon, 6 Oct 2008 10:25:59 +0000 (12:25 +0200)]
mount: sync FAT info in mount.8 with Documentation/filesystems/vfat.txt

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agofdisk: suggest partprobe(8) and kpartx(8) when BLKRRPART failed
Vincent Deffontaines [Tue, 16 Sep 2008 11:08:12 +0000 (13:08 +0200)]
fdisk: suggest partprobe(8) and kpartx(8) when BLKRRPART failed

Signed-off-by: Vincent Deffontaines <vincent@gryzor.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Co-Author: Karel Zak <kzak@redhat.com>

16 years agomount: remove link to namesys.com
Karel Zak [Fri, 3 Oct 2008 07:34:25 +0000 (09:34 +0200)]
mount: remove link to namesys.com

Ricardo Catalinas Jiménez  wrote:
  In the man page mount(8) there is the url
  "http://www.namesys.com/mount-options.html". The web site has been
  down for a long time and the Namesys company is trying to be sold.

Reported-By: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agopg: several strings without gettext calls
Pedro Ribeiro [Fri, 3 Oct 2008 07:31:44 +0000 (09:31 +0200)]
pg: several strings without gettext calls

Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agoreadprofile: several strings without gettext calls
Pedro Ribeiro [Fri, 3 Oct 2008 07:27:33 +0000 (09:27 +0200)]
readprofile: several strings without gettext calls

Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agolosetup: several strings without gettext strings
Pedro Ribeiro [Fri, 3 Oct 2008 07:25:10 +0000 (09:25 +0200)]
losetup: several strings without gettext strings

Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agologger: several strings without gettext calls
Pedro Ribeiro [Fri, 3 Oct 2008 07:17:07 +0000 (09:17 +0200)]
logger: several strings without gettext calls

Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agologin-utils: several strings without gettext calls
Pedro Ribeiro [Fri, 3 Oct 2008 07:13:20 +0000 (09:13 +0200)]
login-utils: several strings without gettext calls

Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agohwclock: several strings without gettext calls
Pedro Ribeiro [Fri, 3 Oct 2008 06:57:43 +0000 (08:57 +0200)]
hwclock: several strings without gettext calls

Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agofdisk: several strings without gettext calls
Pedro Ribeiro [Fri, 3 Oct 2008 06:52:35 +0000 (08:52 +0200)]
fdisk: several strings without gettext calls

Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agoraw: add NLS support
Pedro Ribeiro [Fri, 3 Oct 2008 06:46:36 +0000 (08:46 +0200)]
raw: add NLS support

[kzak@redhat.com: - add setlocale(), ...
                  - remove tailing white spaces]

Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agomkfs.cramfs: several strings without gettext calls
Pedro Ribeiro [Fri, 3 Oct 2008 06:35:16 +0000 (08:35 +0200)]
mkfs.cramfs: several strings without gettext calls

Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agofsck.cramfs: add NLS support
Pedro Ribeiro [Fri, 3 Oct 2008 06:30:33 +0000 (08:30 +0200)]
fsck.cramfs: add NLS support

[kzak@redhat.com: - add setlocale(), ...]

Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agoelvtune: add NLS support
Pedro Ribeiro [Fri, 3 Oct 2008 06:22:50 +0000 (08:22 +0200)]
elvtune: add NLS support

[kzak@redhat.com: - add missing setlocale(), ...]

Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agomount: mtab created multiple times with -a option
Karel Zak [Tue, 30 Sep 2008 22:27:37 +0000 (00:27 +0200)]
mount: mtab created multiple times with -a option

When /etc/mtab does not exist and mount is called with -a, for every
mount point that is mounted a root-fs record is added to mtab. This is
because get_mtab_info() sets the flag mtab_does_not_exist to 1 when it
doesn't find /etc/mtab. However, if it actually finds /etc/mtab, the
variable is not reset to 0. So on every subsequent call to
get_mtab_info() (as it is the case when mounting several mount points
with the -a option), mount will think that /etc/mtab does not exist,
even if it was created in the meantime by mount itself.

Reported-By: Jonas Kramer <jkramer@nex.scrapping.cc>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agolosetup: missing EBUSY error hint message
Karel Zak [Tue, 30 Sep 2008 10:49:58 +0000 (12:49 +0200)]
losetup: missing EBUSY error hint message

old version:
 # losetup /dev/loop0 /foo.img
 # losetup /dev/loop0 /bar.img; echo $?
 2

new version:
 # losetup /dev/loop0 /foo.img
 # losetup /dev/loop0 /bar.img; echo $?
 losetup: /dev/loop0: device is busy
 2

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agologin: fix compiler warning (int32 time() arg)
Karel Zak [Mon, 29 Sep 2008 10:53:39 +0000 (12:53 +0200)]
login: fix compiler warning (int32 time() arg)

login.c: In function ‘dolastlog’:
login.c:1438  warning: passing argument 1 of ‘time’ from incompatible pointer type

Unfortunately, on-disk lastlog format is always 32bit, bits/utmp.h:

  struct lastlog
  {
  #if __WORDSIZE == 64 && defined __WORDSIZE_COMPAT32
     int32_t ll_time;
  #else
     __time_t ll_time;
  #endif

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agofsck.cramfs: fix compiler warning
Karel Zak [Mon, 29 Sep 2008 10:24:38 +0000 (12:24 +0200)]
fsck.cramfs: fix compiler warning

fsck.cramfs.c: In function ‘main’:
fsck.cramfs.c:676  warning: ‘length’ may be used uninitialized in this function

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agoumount: no checking mount point removal
Signed-off-by: Guan Xin [Mon, 29 Sep 2008 10:13:54 +0000 (12:13 +0200)]
umount: no checking mount point removal

No longer checks if mount point has been renamed or removed.
Linux reports EBUSY for these actions, so this check is redundant.

[kzak@redhat.com: - remove the check rather than "#if 0"
                  - remove unnecessary mnt_err2 stuff]

Signed-off-by: Guan Xin <guanx.bac@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agomount: fix typo
Guan Xin [Mon, 29 Sep 2008 09:43:45 +0000 (11:43 +0200)]
mount: fix typo

Signed-off-by: Guan Xin <guanx.bac@gmail.com>
16 years agoumount: check for overlaid mounts
Guan Xin [Mon, 29 Sep 2008 09:38:06 +0000 (11:38 +0200)]
umount: check for overlaid mounts

Linux cannot umount a device whose mount point is hidden by subsequent
mount(s). i.e. We must umount the devices associated to a mount point
in the reverse order of when they were mounted.  If umount was called
violating this rule, report error and exit.

Signed-off-by: Guan Xin <guanx.bac@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agomount: add info about /proc/mounts to mount.1
Karel Zak [Mon, 29 Sep 2008 09:04:59 +0000 (11:04 +0200)]
mount: add info about /proc/mounts to mount.1

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agomount: fix typo
Karel Zak [Thu, 25 Sep 2008 20:25:38 +0000 (22:25 +0200)]
mount: fix typo

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agochrt: add NLS support, clean error messages and return codes
Karel Zak [Tue, 23 Sep 2008 21:17:36 +0000 (23:17 +0200)]
chrt: add NLS support, clean error messages and return codes

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agochrt: support CFS SCHED_IDLE priority and document it
Martin Steigerwald [Tue, 23 Sep 2008 12:23:03 +0000 (14:23 +0200)]
chrt: support CFS SCHED_IDLE priority and document it

Signed-off-by: Martin Steigerwald <ms@teamix.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agobuild-sys: add -luuid to BLKID_LIBS
Karel Zak [Wed, 17 Sep 2008 11:49:45 +0000 (13:49 +0200)]
build-sys: add -luuid to BLKID_LIBS

The libblkid is always linked with libuuild, so this indirect
dependence in BLKID_LIBS is not a problem. This change helps to people
who compile util-linux-ng with non-standard prefix, ..etc.

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agopartx: don't redeclare daddr_t
maximilian attems [Sun, 7 Sep 2008 19:57:24 +0000 (21:57 +0200)]
partx: don't redeclare daddr_t

klibc porting fix, use proper include, nuke redefinition.
solaris.c:8: error: redefinition of typedef ‘daddr_t’
/usr/lib/klibc/include/sys/types.h:29: error: previous declaration of ‘daddr_t’ was here

Signed-off-by: maximilian attems <max@stro.at>
16 years agoipcmk: add NLS support
Karel Zak [Wed, 10 Sep 2008 14:03:43 +0000 (16:03 +0200)]
ipcmk: add NLS support

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agoipcmk: fix error codes and error messages
Karel Zak [Wed, 10 Sep 2008 14:00:17 +0000 (16:00 +0200)]
ipcmk: fix error codes and error messages

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agoipcmk: new command
Hayden James [Wed, 10 Sep 2008 13:31:36 +0000 (15:31 +0200)]
ipcmk: new command

Small patch to create an application that can easily create ad-hoc ipc
resources, along with man page.

[kzak@redhat.com: - rename from ipccreat to ipcmk
                  - minor coding style changes]

Signed-off-by: Hayden James <hayden.james@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agoionice: add strtol() checks, cleanup usage text and man page
Karel Zak [Sat, 6 Sep 2008 12:54:01 +0000 (14:54 +0200)]
ionice: add strtol() checks, cleanup usage text and man page

 * cleanup usage() output

 * check strtol(); don't ignore wrong command line options

The original ionice design was a little broken, because it was
possible to specify a PID and also a COMMAND:

ionice -c2 -p 123 /bin/foo

but the command /bin/foo was executed without requested scheduling
class. That's stupid behaviour.

Now you have to use "-p PID" **or** COMMAND, but not both. Nothing is
ignored and all options are checked.

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agoionice: let -p handle multiple PIDs
Stephan Maka [Wed, 20 Aug 2008 21:51:55 +0000 (23:51 +0200)]
ionice: let -p handle multiple PIDs

Makes ionice -p usable like renice, this time backwards compatible

[kzak@redhat.com: - fix coding style
                  - add ioprio_setpid()]

Signed-off-by: Stephan Maka <stephan@spaceboyz.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agologin: fix warning "dereferencing type-punned pointer will break strict-aliasing...
Karel Zak [Mon, 1 Sep 2008 10:41:57 +0000 (12:41 +0200)]
login: fix warning "dereferencing type-punned pointer will break strict-aliasing rules"

This patch fix problems with odd pam_get_iten( ..., void **) API.
(tested by gcc-4.1.2-42.el5.i386)

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agolosetup: remove dependence on minor numbers
Karel Zak [Thu, 21 Aug 2008 10:06:25 +0000 (12:06 +0200)]
losetup: remove dependence on minor numbers

The latest kernel supports partitioned loop devices (kernel commit
476a4813cfddf7cf159956cc0e2d3c830c1507e3). Unfortunately, this change
makes minor numbers useless, because mirror number does not match with
loop device name (loop<N>).

We have to follow loop device names only.

Signed-off-by: Karel Zak <kzak@redhat.com>
16 years agofdisk: round reported sizes rather than truncate
Karel Zak [Wed, 20 Aug 2008 21:27:50 +0000 (23:27 +0200)]
fdisk: round reported sizes rather than truncate

Exmaples (-old, +new):

- Disk /dev/mapper/bar: 266.6 GB, 266666666496 bytes
+ Disk /dev/mapper/bar: 266.7 GB, 266666666496 bytes

- WARNING: The size of this disk is 2.1 TB (2199023255552 bytes).
+ WARNING: The size of this disk is 2.2 TB (2199023255552 bytes).

Reported-by: Stepan Kasal <skasal@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>