Commit Graph

849 Commits

Author SHA1 Message Date
Karel Zak 043102bf19 tools: add checkconfig to top-level Makefile
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-26 13:42:16 +01:00
Karel Zak 685758e852 tools: rename codecheck-config to checkconfig.sh
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-26 12:59:41 +01:00
Karel Zak 44e293d65c tools: add checkincludes.pl (from linux kernel)
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-26 12:59:29 +01:00
Karel Zak 60aeb5b76d fdisk: fix man page typo
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-25 16:19:36 +01:00
Américo Wang 7e37b8cc03 tests: remove useless return value checks in testing scripts
Signed-off-by: WANG Cong <wangcong@zeuux.org>
2008-11-20 10:02:03 +01:00
Karel Zak 4ea5676c44 tests: update namei reg.test
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-19 13:38:01 +01:00
Américo Wang f0b561b632 tests: clean up the testing scripts
Do some cleanups to the testing scripts.

Signed-off-by: WANG Cong <wangcong@zeuux.org>
2008-11-19 13:17:08 +01:00
Alon Bar-Lev 7177d32ecf 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>
2008-11-19 12:40:06 +01:00
Karel Zak 1dabcd2498 pivot_root: clean up
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-19 12:40:06 +01:00
Karel Zak 5947572d5e 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>
2008-11-19 12:38:43 +01:00
Karel Zak c268327edd losetup: add warning about read-only mode
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-18 15:50:38 +01:00
Matthias Koenig bc984ef97c 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>
2008-11-18 15:40:34 +01:00
Matthias Koenig 4b13a5a66b 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>
2008-11-14 00:09:23 +01:00
Matthias Koenig 943add2882 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>
2008-11-13 23:56:32 +01:00
Matthias Koenig 6ee3f81fae 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>
2008-11-13 23:49:14 +01:00
Karel Zak 4cfcf09b33 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>
2008-11-13 23:25:59 +01:00
Karel Zak c84a633a92 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>
2008-11-13 23:25:46 +01:00
Karel Zak 5ea8931c95 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>
2008-11-13 23:08:34 +01:00
Karel Zak 981b80b797 fdisk: read /proc/partitions in more robust way
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-11-13 15:37:22 +01:00
Karel Zak 197d1d7c79 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>
2008-11-13 14:56:17 +01:00
CAI Qian c655294a39 sfdisk: fix Compilation Error
This patch fixes a compilation error in the latest tree.

Signed-off-by: CAI Qian <caiqian@cclom.cn>
2008-10-23 10:42:05 +02:00
Matthias Koenig cf474aacfc lscpu: return EXIT_SUCCESS at the end
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
2008-10-22 23:35:19 +02:00
Karel Zak 7bfa31b953 tests: refresh Makefile.am (add missing lscpu tests)
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-22 14:01:44 +02:00
Karel Zak 5e8f283e90 tests: add lscpu(1) test for fullvirt. Xen x86_64
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-22 14:01:44 +02:00
Karel Zak 750e040e00 tests: add lscpu(1) test for paravirt. Xen i386
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-22 13:56:52 +02:00
Karel Zak 6c7bba315c 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>
2008-10-22 13:56:52 +02:00
Karel Zak c8b64f6d77 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>
2008-10-22 13:56:52 +02:00
Karel Zak 846baede16 docs: update TODO list
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-16 23:44:59 +02:00
Karel Zak 433c8bea8a 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>
2008-10-16 23:37:38 +02:00
Karel Zak bf7b8d773b ipcs: fix exit codes, remove tailing white-spaces
Addresses-Red-Hat-Bugzilla: #465911
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-07 10:23:23 +02:00
Karel Zak b9f2b3de43 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>
2008-10-06 13:01:54 +02:00
Karel Zak 2e5e25bc13 mount: sync FAT info in mount.8 with Documentation/filesystems/vfat.txt
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-06 12:25:59 +02:00
Vincent Deffontaines c64061c9b3 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>
2008-10-06 11:52:48 +02:00
Karel Zak 6e52d20f46 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>
2008-10-03 09:34:25 +02:00
Pedro Ribeiro 7c7f4ff8e0 pg: several strings without gettext calls
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-03 09:31:44 +02:00
Pedro Ribeiro 39a5a2314b readprofile: several strings without gettext calls
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-03 09:27:33 +02:00
Pedro Ribeiro 5bbba4a5bd losetup: several strings without gettext strings
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-03 09:25:10 +02:00
Pedro Ribeiro 331b704481 logger: several strings without gettext calls
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-03 09:17:07 +02:00
Pedro Ribeiro 64fefaf5bf 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>
2008-10-03 09:13:20 +02:00
Pedro Ribeiro f9e151dddb hwclock: several strings without gettext calls
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-03 08:57:43 +02:00
Pedro Ribeiro add5133f4a fdisk: several strings without gettext calls
Signed-off-by: Pedro Ribeiro <p.m42.ribeiro@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-10-03 08:52:35 +02:00
Pedro Ribeiro 5dd48fb28f 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>
2008-10-03 08:46:36 +02:00
Pedro Ribeiro 5044f6d7f0 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>
2008-10-03 08:35:16 +02:00
Pedro Ribeiro e56644ca45 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>
2008-10-03 08:30:33 +02:00
Pedro Ribeiro 90d43eca4e 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>
2008-10-03 08:22:50 +02:00
Karel Zak 7a451aa995 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>
2008-10-01 00:34:52 +02:00
Karel Zak af17e0d170 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>
2008-09-30 13:16:50 +02:00
Karel Zak a063e16c5d 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>
2008-09-29 13:08:06 +02:00
Karel Zak 293889d084 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>
2008-09-29 12:24:38 +02:00
Signed-off-by: Guan Xin 1069973afa 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>
2008-09-29 12:13:54 +02:00