]> err.no Git - util-linux/log
util-linux
17 years agopo: update po files
Karel Zak [Mon, 15 Oct 2007 10:05:59 +0000 (12:05 +0200)]
po: update po files

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agopo: fix typo in de.po
Karel Zak [Thu, 11 Oct 2007 12:31:41 +0000 (14:31 +0200)]
po: fix typo in de.po

de.po:9010: internationalized messages should not contain the `\r' escape sequence

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Thu, 11 Oct 2007 09:59:48 +0000 (11:59 +0200)]
po: update nl.po (from translationproject.org)

17 years agopo: update de.po (from translationproject.org)
Michael Piefel [Fri, 5 Oct 2007 10:43:51 +0000 (12:43 +0200)]
po: update de.po (from translationproject.org)

17 years agoscript: dies on SIGWINCH
Karel Zak [Fri, 5 Oct 2007 10:22:13 +0000 (12:22 +0200)]
script: dies on SIGWINCH

The "doinput" process doesn't make a difference between SIGWINCH and
SIGCHILD.  This process also sends unnecessary SIGWINCH to child (the
signal is ignored by child). Fixed.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoionice: add a note about permissions to ionice.1
Karel Zak [Thu, 20 Sep 2007 12:33:31 +0000 (14:33 +0200)]
ionice: add a note about permissions to ionice.1

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agochsh: should use pam_end function to terminate the PAM transaction
Yu Zhiguo [Thu, 6 Sep 2007 06:28:49 +0000 (14:28 +0800)]
chsh: should use pam_end function to terminate the PAM transaction

chsh will use PAM transaction if macros 'REQUIRE_PASSWORD' and
'HAVE_SECURITY_PAM_MISC_H' are defined, but there is no pam_end function be
used when the PAM transaction be terminated.

This patch also cleanup PAM code in chsh(1).

Signed-off-by: Yu Zhiguo <yuzg@cn.fujitsu.com>
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agochfn: add pam_end() call and cleanup PAM code
Karel Zak [Wed, 3 Oct 2007 22:22:36 +0000 (00:22 +0200)]
chfn: add pam_end() call and cleanup PAM code

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: fix blkid cache usage
Karel Zak [Thu, 11 Oct 2007 22:33:01 +0000 (00:33 +0200)]
tests: fix blkid cache usage

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: -L|-U segfault when label or uuid doesn't exist
Karel Zak [Thu, 11 Oct 2007 14:18:29 +0000 (16:18 +0200)]
mount: -L|-U segfault when label or uuid doesn't exist

 # mount -L foo
 Segmentation fault

mount(8) calls strcmp() with NULL argument.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agopg: fix segfault on search
Rajeev V. Pillai [Wed, 3 Oct 2007 20:39:27 +0000 (22:39 +0200)]
pg: fix segfault on search

Run pg(1) and type '/<CR>' which is supposed to forward search for the
previously remembered search string. pg(1) will segfault after printing
"No remembered search string:".

Signed-off-by: Rajeev V. Pillai <rajeevvp@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agopo: update sv.po (from translationproject.org)
Daniel Nylander [Sun, 23 Sep 2007 19:30:30 +0000 (21:30 +0200)]
po: update sv.po (from translationproject.org)

17 years agomount: doesn't drop privileges properly when calling helpers
Ludwig Nussel [Thu, 20 Sep 2007 12:57:20 +0000 (14:57 +0200)]
mount: doesn't drop privileges properly when calling helpers

{,u}mount calls setuid() and setgid() in the wrong order and doesn't checking
the return value of set{u,g}id(() when running helpers like mount.nfs.

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agohwclock: fix --rtc option
Matthias Koenig [Thu, 20 Sep 2007 09:11:18 +0000 (11:11 +0200)]
hwclock: fix --rtc option

The --rtc option does not set the name of the device correctly.
It still uses /dev/rtc even if the --rtc option is given.

Testcase:
$ mv /dev/rtc /dev/foo
$ hwclock --show --debug --rtc=/dev/foo
hwclock from util-linux-2.13-rc2
Using /dev interface to clock.
Last drift adjustment done at 1190198135 seconds after 1969
Last calibration done at 1190198135 seconds after 1969
Hardware clock is on local time
Assuming hardware clock is kept in local time.
Waiting for clock tick...
hwclock: open() of /dev/rtc failed, errno=2: No such file or directory.
...got clock tick

Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agosetarch: fix compiler warning
LaMont Jones [Sat, 22 Sep 2007 04:38:32 +0000 (22:38 -0600)]
setarch: fix compiler warning

NULL is not 0L.  It's (void*)0.  Passing that as a parameter to a function
that takes an unsigned long results in a warning about the lack of a cast.

Signed-off-by: LaMont Jones <lamont@debian.org>
17 years agologin: login segfaults on EOF (rh#298461)
Karel Zak [Thu, 20 Sep 2007 22:34:30 +0000 (00:34 +0200)]
login: login segfaults on EOF (rh#298461)

Stupid bug in audit code:

  $ login
  login: ^D
  login: ^D
  Segmentation fault

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: nls/locale handling in util-linux-ng general
Mike Frysinger [Fri, 7 Sep 2007 00:30:16 +0000 (20:30 -0400)]
build-sys: nls/locale handling in util-linux-ng general

On Monday 03 September 2007, Karel Zak wrote:
> http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/590/focus=592
>
>  I agree that we need a better support for compilation without
>  locales, but from my point of view NLS != all locales stuff. The NLS
>  support is subset only.

thinking about the input from everyone, i'd propose the attached ...

Only pull in locale.h as needed and move it to the common nls.h.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
17 years agoblockdev: add missing description about option --report in manpage
Li Zefan [Mon, 10 Sep 2007 09:25:10 +0000 (17:25 +0800)]
blockdev: add missing description about option --report in manpage

The manpage does not mention the option --report.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
17 years agorename: add description about option -V to manpage
Li Zefan [Tue, 4 Sep 2007 07:33:36 +0000 (15:33 +0800)]
rename: add description about option -V to manpage

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
17 years agorename: remove useless variable
Li Zefan [Tue, 4 Sep 2007 07:20:25 +0000 (15:20 +0800)]
rename: remove useless variable

The number of files successfully renamed is calculated and stored in variable
ct, > but actually the variable is not used afterwards.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
17 years agomount: chain of symlinks to fstab causes use of pointer after free
Norbert Buchmuller [Sun, 2 Sep 2007 20:08:53 +0000 (14:08 -0600)]
mount: chain of symlinks to fstab causes use of pointer after free

Looking at the source in 'mount/realpath.c' we find that when dealing with
the second or later symlink in the chain, a memory block was free()d before
copying its contents to a newly allocated block.

17 years agocal: add description about option -V to manpage
Li Zefan [Mon, 3 Sep 2007 06:25:40 +0000 (14:25 +0800)]
cal: add description about option -V to manpage

cal support option -V to display version information, but the manpage doesn't
mention it.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
17 years agobuild-sys: remove files that are no longer delivered from git
LaMont Jones [Tue, 28 Aug 2007 21:56:41 +0000 (15:56 -0600)]
build-sys: remove files that are no longer delivered from git

Neither mount/h/swap.h nor mount/mount.smbfs is delivered
as part of util-linux-ng tar archives.  As such, they
should not be in git either.

Signed-off-by: LaMont Jones <lamont@debian.org>
17 years agosetarch: adding groff symlinks to setarch manual page
Arkadiusz Miskiewicz [Tue, 28 Aug 2007 07:16:57 +0000 (09:16 +0200)]
setarch: adding groff symlinks to setarch manual page

Signed-off-by: Arkadiusz Miskiewicz <arekm@maven.pl>
17 years agomount: improve error message when helper program not present
LaMont Jones [Thu, 9 Aug 2007 19:37:22 +0000 (13:37 -0600)]
mount: improve error message when helper program not present

"missing codepage" is a bit confusing to many people, so include
"helper program" in the error message when we fail to mount something.

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
17 years agofdisk: fix typo
Karel Zak [Sun, 2 Sep 2007 13:02:55 +0000 (15:02 +0200)]
fdisk: fix typo

Reported-by: Daniel Nylander <po@danielnylander.se>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoflock: typo in man page
A. Costa [Wed, 29 Aug 2007 13:07:10 +0000 (07:07 -0600)]
flock: typo in man page

Signed-off-by: LaMont Jones <lamont@debian.org>
17 years agobuild-sys: fix localedir (unsupported by autoconf < 2.60)
Karel Zak [Sun, 2 Sep 2007 11:00:23 +0000 (13:00 +0200)]
build-sys: fix localedir (unsupported by autoconf < 2.60)

The autoconf < 2.60 doesn't support the @localedir@ directory
variable. The util-linux-ng-2.13 minimally requires autoconf-2.59.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: fix stable branche name in README.devel
Karel Zak [Sun, 2 Sep 2007 09:43:53 +0000 (11:43 +0200)]
docs: fix stable branche name in README.devel

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: release++
Karel Zak [Mon, 27 Aug 2007 22:41:54 +0000 (00:41 +0200)]
build-sys: release++

Increment release number to v2.13

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: update ReleaseNotes
Karel Zak [Mon, 27 Aug 2007 22:38:57 +0000 (00:38 +0200)]
docs: update ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: update and sort AUTHORS file
Karel Zak [Mon, 27 Aug 2007 22:15:49 +0000 (00:15 +0200)]
docs: update and sort AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agopo: update po/ stuff
Karel Zak [Mon, 27 Aug 2007 22:14:16 +0000 (00:14 +0200)]
po: update po/ stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoionice: clean up error handling
Matthias Koenig [Mon, 27 Aug 2007 14:49:19 +0000 (16:49 +0200)]
ionice: clean up error handling

Print error in case execvp fails and use exit macros.

Based on patch by Bernhard Voelker <mail@bernhard-voelker.de>

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agocytune: make the oneliner more specific the cyclades hw in question
Justin B Rye [Fri, 24 Aug 2007 06:36:24 +0000 (00:36 -0600)]
cytune: make the oneliner more specific the cyclades hw in question

See http://bugs.debian.org/375150

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
17 years agodocs: update TODO
Karel Zak [Mon, 27 Aug 2007 21:39:10 +0000 (23:39 +0200)]
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agosetarch: add --3gb option fot compatibility with Debian linux{32,64} command
Karel Zak [Mon, 27 Aug 2007 21:31:25 +0000 (23:31 +0200)]
setarch: add --3gb option fot compatibility with Debian linux{32,64} command

Debian had a pre-existing linux{32,64} command which supported only
--3gb and --4gb. Adding support for those options allows setarch to
replace that package.

(Note that long options are expected for all setarch flags in the next
release.)

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agosetarch: finish adding parisc support
Karel Zak [Mon, 27 Aug 2007 21:16:28 +0000 (23:16 +0200)]
setarch: finish adding parisc support

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: update AUTHORS file
Karel Zak [Mon, 27 Aug 2007 13:37:05 +0000 (15:37 +0200)]
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoRevert "mount: improve error message when helper program not present"
Karel Zak [Mon, 27 Aug 2007 11:16:08 +0000 (13:16 +0200)]
Revert "mount: improve error message when helper program not present"

This reverts commit f8988ebf89c65b624ee19c685d15cab6c77fd9df that
breaks new PO translation. The code is currently in "string freeze"
state. The patch will be applied to 2.14 and 2.13.1.

17 years agopo: update sv.po (from translationproject.org)
Daniel Nylander [Mon, 27 Aug 2007 09:12:14 +0000 (11:12 +0200)]
po: update sv.po (from translationproject.org)

17 years agopo: update cs.po (from translationproject.org)
Petr Pisar [Mon, 27 Aug 2007 09:10:06 +0000 (11:10 +0200)]
po: update cs.po (from translationproject.org)

17 years agotaskset: check for existence of sched_getaffinity
Mike Frysinger [Sun, 26 Aug 2007 11:22:56 +0000 (07:22 -0400)]
taskset: check for existence of sched_getaffinity

Some architectures do no reliably provide sched_getaffinity, so make sure the
define exists before we try using it.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
17 years agosetarch: add parisc/parisc64 support
LaMont Jones [Tue, 21 Aug 2007 16:19:19 +0000 (10:19 -0600)]
setarch: add parisc/parisc64 support

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
17 years agomount: free loop device on failure
Sascha Sommer [Tue, 21 Aug 2007 13:13:43 +0000 (15:13 +0200)]
mount: free loop device on failure

Testcase:
$ mount -oloop /etc/group /mnt
ioctl: LOOP_CLR_FD: Device or resource busy
mount: you must specify the filesystem type
$ losetup /dev/loop0
/dev/loop0: [0803]:1931929 (/etc/group)

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
17 years agomount: avoid duplicates for root fs in mtab
Matthias Koenig [Fri, 24 Aug 2007 11:05:27 +0000 (13:05 +0200)]
mount: avoid duplicates for root fs in mtab

If the root fs is defined with LABEL or UUID in fstab, avoid
a duplicate entry in mtab when calling mount without existing
mtab.
A mount -f / creates two entries, one for LABEL and another
for the devicename, because canonicalize does not expand the
LABEL or UUID tags.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
17 years agosetarch: cleanup licensing note
Karel Zak [Tue, 21 Aug 2007 08:52:02 +0000 (10:52 +0200)]
setarch: cleanup licensing note

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: update AUTHORS file
Karel Zak [Tue, 21 Aug 2007 08:32:41 +0000 (10:32 +0200)]
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agopo: update vi.po (from translationproject.org)
Phan Vinh Thinh [Tue, 21 Aug 2007 08:27:27 +0000 (10:27 +0200)]
po: update vi.po (from translationproject.org)

Signed-off-by: Phan Vinh Thinh <teppi82@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agopo: update nl.po (from translationproject.org)
Benno Schulenberg [Tue, 21 Aug 2007 08:25:25 +0000 (10:25 +0200)]
po: update nl.po (from translationproject.org)

Signed-off-by: Benno Schulenberg <benno@vertaalt.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agosetarch: add __alpha__ support
Balint Cristian [Tue, 21 Aug 2007 08:00:58 +0000 (10:00 +0200)]
setarch: add __alpha__ support

Signed-off-by: Balint Cristian <cbalint@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agosetarch: add sparc32bash alias to keep compatibility with sparc32
Dennis Gilmore [Tue, 21 Aug 2007 07:55:28 +0000 (09:55 +0200)]
setarch: add sparc32bash alias to keep compatibility with sparc32

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: add DEPRECATED to EXTRA_DIST
Karel Zak [Mon, 20 Aug 2007 12:37:52 +0000 (14:37 +0200)]
docs: add DEPRECATED to EXTRA_DIST

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: fix BSD licence name in README.licensing
Karel Zak [Fri, 17 Aug 2007 11:02:03 +0000 (13:02 +0200)]
docs: fix BSD licence name in README.licensing

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: fix authorship of 8-bit cleanup agetty patch
Karel Zak [Fri, 17 Aug 2007 10:44:57 +0000 (12:44 +0200)]
docs: fix authorship of 8-bit cleanup agetty patch

The patch:

commit 6a4c63d9d90b24d770f887f8cd89fd20f8378267
Author: Moritz Muehlenhoff <jmm@inutil.org>
Date:   Thu Jul 19 00:29:13 2007 +0200

agetty: 8 bit characters on the Linux console lead to input
corruption

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
has been posted and committed with wrong "Author" field.

Sorry to Samuel Thibault who is original author of the patch.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agopo: update de.po (from translationproject.org)
Karel Zak [Wed, 15 Aug 2007 10:26:46 +0000 (12:26 +0200)]
po: update de.po (from translationproject.org)

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: add note about http://translationproject.org
Karel Zak [Wed, 15 Aug 2007 10:10:13 +0000 (12:10 +0200)]
docs: add note about http://translationproject.org

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoman-pages: cleanup of chrt.1 and taskset.1
LaMont Jones [Tue, 14 Aug 2007 13:28:14 +0000 (07:28 -0600)]
man-pages: cleanup of chrt.1 and taskset.1

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: improve error message when helper program not present
LaMont Jones [Thu, 9 Aug 2007 19:37:22 +0000 (13:37 -0600)]
mount: improve error message when helper program not present

"missing codepage" is a bit confusing to many people, so include
"helper program" in the error message when we fail to mount something.

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
17 years agopo: gettextizing some overlooked messages.
Benno Schulenberg [Sun, 12 Aug 2007 09:48:34 +0000 (11:48 +0200)]
po: gettextizing some overlooked messages.

Gettextize three new strings, make two strings indentical to two others,
and gettextize three strings that are already gettextized elsewhere.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: add --disable-makeinstall-chown
Karel Zak [Tue, 14 Aug 2007 12:32:45 +0000 (14:32 +0200)]
build-sys: add --disable-makeinstall-chown

A chown-like operations are unexpected when you execute "make install"
as non-root user. For example RPM defines owner+permissions in .spec
file -- you needn't to use root account to create useful RPM package.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: add README.licensing
Karel Zak [Tue, 14 Aug 2007 10:27:55 +0000 (12:27 +0200)]
docs: add README.licensing

There is not only one unique license for all code in utl-linux-ng. We
have mix of utils with Public Domain, BSD, GPLv2 or GPLv2+. This thing
should be more transparent to avoid misunderstanding.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: fix ULONG_MAX usage on 32bit machines
Karel Zak [Tue, 14 Aug 2007 10:05:29 +0000 (12:05 +0200)]
tests: fix ULONG_MAX usage on 32bit machines

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agochsh: don't use empty shell field in /etc/passwd
Karel Zak [Tue, 14 Aug 2007 10:04:09 +0000 (12:04 +0200)]
chsh: don't use empty shell field in /etc/passwd

chsh(1) uses empty shell setting (pw->pw_shell="") as a synonym for
/bin/sh. This convention is silly and unnecessary. (The vsftpd server
will not run if the shell assigned to user "ftp" is a null string --
according to bug rh#103004).

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomore: fix underlining for multibyte chars
Karel Zak [Tue, 14 Aug 2007 09:51:19 +0000 (11:51 +0200)]
more: fix underlining for multibyte chars

Try:
$ printf "aaa _\bŽ_\bŽ_\bŽ bbb\n" | more
aaa ŽŽŽ bbb

(ŽŽŽ has to be three underlined chars on terminal).

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agologin: replace /usr/spool/mail with /var/spool/main in man page
Karel Zak [Tue, 14 Aug 2007 08:58:57 +0000 (10:58 +0200)]
login: replace /usr/spool/mail with /var/spool/main in man page

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add warning "For development purpose only."
Karel Zak [Tue, 7 Aug 2007 22:42:29 +0000 (00:42 +0200)]
tests: add warning "For development purpose only."

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: release++
Karel Zak [Tue, 7 Aug 2007 22:15:52 +0000 (00:15 +0200)]
build-sys: release++

Increment release number to v2.13-rc3.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: update AUTHORS file
Karel Zak [Tue, 7 Aug 2007 22:13:54 +0000 (00:13 +0200)]
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodocs: update ReleaseNotes
Karel Zak [Tue, 7 Aug 2007 22:07:57 +0000 (00:07 +0200)]
docs: update ReleaseNotes

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agopo: update po/ stuff
Karel Zak [Tue, 7 Aug 2007 21:34:52 +0000 (23:34 +0200)]
po: update po/ stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoswapon: cleanup fsprobe_*() usage
Karel Zak [Tue, 7 Aug 2007 10:03:53 +0000 (12:03 +0200)]
swapon: cleanup fsprobe_*() usage

This patch clean ups code and avoids duplicate calling of fsprobe
functions.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoswapoff: correctly handle UUID= and LABEL= identifiers
LaMont Jones [Sun, 5 Aug 2007 00:04:11 +0000 (18:04 -0600)]
swapoff: correctly handle UUID= and LABEL= identifiers

While parsing /etc/fstab, swapoff did not make provision for UUID= and
LABEL= identifiers.  Added logic similar to swapon -a code.

Signed-off-by: Kel Modderman <kel@otaku42.de>
Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
17 years agomount: fix incorrect behavior when more than one fs type is specified
Attila Áfra [Mon, 6 Aug 2007 12:48:37 +0000 (15:48 +0300)]
mount: fix incorrect behavior when more than one fs type is specified

"mount" may fail when more than one file system type is specified, and the
requested access mode is read/write, but the device is read-only. The error
message is: "mount: wrong fs type, bad option, bad superblock on...".
It works only if the correct file system type is the last item in the comma
separated list. This is because when it tries to mount the file system again
in read-only mode, the "types" parameter passed to the "try_mount_one"
function contains only the last item instead of the entire list.

For example, you cannot mount a UDF CD/DVD with "-t udf,iso9660" if you
don't also add the read-only option. This means that some Linux distributions
with the default configuration may not be able to mount UDF disks
automatically (e.g. Ubuntu Dapper - Gutsy Tribe 3).

Signed-off-by: Attila Áfra <attila.afra@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agotests: add script(1) race condition test
Karel Zak [Mon, 6 Aug 2007 22:46:46 +0000 (00:46 +0200)]
tests: add script(1) race condition test

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoscript: fix race conditions
Karel Zak [Mon, 6 Aug 2007 22:36:31 +0000 (00:36 +0200)]
script: fix race conditions

script(1) uses three processes (doinput, dooutput and doshell).  It's
possible that the shell process is finished before the input and
output processes are completely initialized. For example:

  $ script -c "printf Bingo"

In particular case the output and input processes read/write data from
shell process in time when the shell process is already done -- so it
hangs on read().

The second problem is that the output process can finish although
there are unread data from finished shell process -- an output in
the typescript file and on terminal is incomplete!

script(1) has to pass:

 $ for i in `seq 1 1000`; do script -q -c "printf 'Bingo\n'"; done | grep -c Bingo
 1000

without problems.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomkfs: remove nonsense from man page
Karel Zak [Thu, 2 Aug 2007 12:23:38 +0000 (14:23 +0200)]
mkfs: remove nonsense from man page

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoblockdev: use LU and LLU for BLKGETSIZE and BLKGETSIZE64
Karel Zak [Wed, 1 Aug 2007 13:47:33 +0000 (15:47 +0200)]
blockdev: use LU and LLU for BLKGETSIZE and BLKGETSIZE64

The "blkockdev --getsize" returns negative numbers on i386
for 1Tb devices. The BLKGETSIZE and BLKGETSIZE64 have to
use unsigned long and unsigned long long.

$ blockdev --getsize /dev/mapper/huge
-2147483648

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoblockdev: fix "blockdev --getsz" for large devices
Karel Zak [Wed, 1 Aug 2007 13:06:18 +0000 (15:06 +0200)]
blockdev: fix "blockdev --getsz" for large devices

The "blockdev --getsz" command doesn't try to use BLKGETSIZE64 when
previous BLKGETSIZE failed with EFBIG. This patch fixes this problem.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: should set proper permissions on locktime
Flávio Leitner [Tue, 31 Jul 2007 10:42:14 +0000 (12:42 +0200)]
mount: should set proper permissions on locktime

When creating the "/etc/mtab~" lockfile (specifically 'linktargetfile'  in the
lock_mtab function), the file is created with incorrect permissions ('000')
which necessitates root to leverage CAP_DAC_OVERRIDE. If proper file modes (it
would appear 0600 would be sufficient) were used in the open this would
function properly with CAP_DAC_OVERRIDE revoked.

  $ sysctl -w kernel.cap-bound=0xf7fd7df5
  $ mount -t tmpfs /dev/swap /mnt
  can't open lock file /etc/mtab~: Permission denied (use -n flag to override)

Signed-off-by: Flávio Leitner <fleitner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agodisk-utils: let mkfs tools open with O_EXCL
Matthias Koenig [Wed, 18 Jul 2007 14:15:46 +0000 (16:15 +0200)]
disk-utils: let mkfs tools open with O_EXCL

Let mkswap, mkfs.bfs, mkfs.minix open with O_EXCL if
used on block devices to prevent writing to the device
even if they are busy (mounted).

Unfortunately, O_EXCL has zero effect for 2.4 kernels where
in-kernel code doesn't use O_EXCL-like access locks. (Tested
on RHEL3.)

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoremove hardcoded package name from some utils
Karel Zak [Fri, 27 Jul 2007 10:12:00 +0000 (12:12 +0200)]
remove hardcoded package name from some utils

We have PACKAGE_STRING in config.h that includes package name and
version. It's better to use this macro that hardcoded strings.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: fix directories in EXTRA_DIST
Karel Zak [Thu, 26 Jul 2007 13:21:50 +0000 (15:21 +0200)]
build-sys: fix directories in EXTRA_DIST

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomount: fix -f -o remount
Karel Zak [Thu, 26 Jul 2007 12:39:03 +0000 (14:39 +0200)]
mount: fix -f -o remount

Bug:

   $ mount -fv / -o remount
   mount: according to mtab, /dev/sda3 is already mounted on /

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agordev: should be delivered on amd64 as well as i386.
LaMont Jones [Tue, 17 Jul 2007 23:48:10 +0000 (17:48 -0600)]
rdev: should be delivered on amd64 as well as i386.

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoagetty: fix short malloc in initstring handling
LaMont Jones [Tue, 17 Jul 2007 23:47:33 +0000 (17:47 -0600)]
agetty: fix short malloc in initstring handling

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
17 years agodocs: add rdev(8) between deprecated utils
Karel Zak [Wed, 25 Jul 2007 16:50:01 +0000 (18:50 +0200)]
docs: add rdev(8) between deprecated utils

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agobuild-sys: add ${AC,AP,AM,AH}_OPTS to autogen.sh
Karel Zak [Wed, 25 Jul 2007 16:45:01 +0000 (18:45 +0200)]
build-sys: add ${AC,AP,AM,AH}_OPTS to autogen.sh

With this patch, you can define autotool options when you
need to generate build-system. For example:

  $ AM_OPTS="--copy" ./autogen.sh

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoagetty: 8 bit characters on the Linux console lead to input corruption
Moritz Muehlenhoff [Wed, 18 Jul 2007 22:29:13 +0000 (00:29 +0200)]
agetty: 8 bit characters on the Linux console lead to input corruption

8 bit characters on the Linux console lead to input corruption (e.g.
German umlauts). This is easily reproducable by inserting a login name with
umlaut and typing backspace afterwards.

agetty supports tty parity, which leads to getty treating these characters
as a 7bit char with set parity.

This patch by Samuel Thibault adds a new option -8 which disables parity
detection for ttys not used for serial logins.

| Note: With this patch, 8bit characters are just silently dropped (that's
| the expected getty behavior), this is quite neat since you then don't
| even need to backspace your 8bit characters :)

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
17 years agolook: man page clarification
Pádraig Brady [Wed, 25 Jul 2007 14:36:37 +0000 (15:36 +0100)]
look: man page clarification

* misc-utils/look.1: Clarify the default state of the -d and -f options

Signed-Off-By: Pádraig Brady <P@draigBrady.com>
17 years agomkswap: fix signedness problems and remove obsolete code
Karel Zak [Wed, 25 Jul 2007 14:55:25 +0000 (16:55 +0200)]
mkswap: fix signedness problems and remove obsolete code

The UUID is unsigned char *

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoionice: cleanup usage for idle class
Matthias Koenig [Tue, 17 Jul 2007 14:00:32 +0000 (16:00 +0200)]
ionice: cleanup usage for idle class

The idle class has no class data. It will print a warning if
a prio argument is given for it, since this will be ignored.
Output for idle class will not contain prio data.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
17 years agomount: update xfs mount options
Matthias Koenig [Tue, 24 Jul 2007 17:29:39 +0000 (19:29 +0200)]
mount: update xfs mount options

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
17 years agoscript: improve quiet mode
Karel Zak [Tue, 24 Jul 2007 13:22:57 +0000 (15:22 +0200)]
script: improve quiet mode

script(1) is not consistent and writes "Script started on.." to
scriptfile, although the others messages are ignored when running
with '-q'.

Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomkswap: default to V1 in any case
Matthias Koenig [Wed, 18 Jul 2007 14:15:45 +0000 (16:15 +0200)]
mkswap: default to V1 in any case

mkswap(8) enforces to use v0 swap format when pagesize > 16kB.
(use case might be ppc64 with CONFIG_PPC_64K_PAGES).

As version 0 swap is not supported anymore by recent kernels, the
behaviour in this case is rather strange.

Here is a testcase:

for i in 4 8 16 32 64; do mkswap -p `expr $i \* 1024` ./swap.file; done
Setting up swapspace version 1, size = 4294963 kB

Using user-specified page size 8192, instead of the system values
4096/4096
Setting up swapspace version 1, size = 4294959 kB

Using user-specified page size 16384, instead of the system values
4096/4096
Setting up swapspace version 1, size = 4294950 kB

Using user-specified page size 32768, instead of the system values
4096/4096
Setting up swapspace version 0, size = 4294934 kB

Using user-specified page size 65536, instead of the system values
4096/4096
Setting up swapspace version 0, size = 4294901 kB

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agoreadprofile: fix on ppc64
Matthias Koenig [Wed, 18 Jul 2007 14:15:44 +0000 (16:15 +0200)]
readprofile: fix on ppc64

Fix inconsistency between kernel profiling and readprofile.
The range of kernel profiling is between _stext and _etext,
and readprofile tries to extract profiling for all the symbols in
/boot/System.map-2.6.16.11-7-ppc64 from /proc/profile, but there
are more symbols in /boot/System.map-2.6.16.11-7-ppc64 than those
between _stext and _etext.

Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agomanpage typos
LaMont Jones [Wed, 18 Jul 2007 05:32:03 +0000 (23:32 -0600)]
manpage typos

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
17 years agomount: mention hfsplus in mount manpage
LaMont Jones [Wed, 18 Jul 2007 04:34:04 +0000 (22:34 -0600)]
mount: mention hfsplus in mount manpage

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
17 years agologger: use snprintf instead of sprintf in logger.c
LaMont Jones [Wed, 18 Jul 2007 04:43:15 +0000 (22:43 -0600)]
logger: use snprintf instead of sprintf in logger.c

Signed-off-by: LaMont Jones <lamont@mmjgroup.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
17 years agofdisk: cleanup partname.c
Karel Zak [Mon, 23 Jul 2007 21:55:37 +0000 (23:55 +0200)]
fdisk: cleanup partname.c

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