When editing a disk image, fdisk wants to ask the kernel to reread the
partition table which is useless and provokes an error, a wrong exit
code and some waiting. This annoys me as I can't check the return code
in my script and because I have to wait a few seconds each time.
This trivial patch makes it only do the ioctl on block devices.
It also simplifies code by dropping some workaround for kernel 1.2.x
Signed-off-by: Pascal Terjan <pterjan@linuxfr.org>
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>
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>
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.
"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>
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>
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>
This reverts commit f8988ebf89 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.
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>
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>
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>
The patch:
commit 6a4c63d9d9
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>
"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>
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>
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>
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>
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>