Commit Graph

15578 Commits

Author SHA1 Message Date
Karel Zak 167eaed783 swapon: does not correctly deal with symlinks
From: Marco d'Itri <md@Linux.IT>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-09 17:15:39 +01:00
Karel Zak 3e18b040af mkswap: automatically add selinux label to swapfile
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-08 15:22:37 +01:00
Karel Zak deef0ba55e build-sys: configure.am selinux support cleanup
Changes:
 - don't include SELinux as default (--with-selinux is required)
 - the SELinux is not useful for login-utils only
 - clean up PAM and login-utils tests in the configure.am

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-08 15:19:36 +01:00
Karel Zak b8d1314dc6 build-sys: fix README filenames and add missing files to EXTRA_DISTs
Also, the patch makes "make mrproper" more robust.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-08 12:38:25 +01:00
Karel Zak 061999ee0d mkswap: add regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-07 13:26:11 +01:00
Karel Zak 85ffb958a9 todo: add item about exit() codes
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-07 10:32:34 +01:00
Karel Zak 8abb4c2e00 mkswap: avoid mkswap usage on already mounted device
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-07 10:32:02 +01:00
Karel Zak f93a4afd47 todo: add this file
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-07 10:11:07 +01:00
Karel Zak 6b9a290adf mkswap: gcc happy: unsigned long usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-07 10:10:22 +01:00
Karel Zak 7ac3b5b8e3 Clean up pagesize/PAGE_SIZE usage.
Now all code in util-linux uses sysconf(_SC_PAGESIZE) that is standardized and
preferred way of querying page size. The asm/page.h file is not included to the
code anymore. (This patch doesn't change mount's FS detection code which will
be removed later).

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-06 11:35:15 +01:00
Karel Zak ca04734de1 tests: fix argv[] usage in mnt_test_sysinfo.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-06 11:33:35 +01:00
Karel Zak 5db4f8e3b3 namei: new regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-31 16:45:01 +01:00
Karel Zak d8ef4c19ab namei: fix logic and infinite loop of symlinks
Don't follow the path if a component is not directory.  It doesn't make sense
to support something like:

	$ touch a b
	$ namei a/b  <-- where "a" is not directory

The support for infinite loop of symbolic links is a strange wish only. The
stack size is very limited. Try:

	$ ln -s x
	$ namei x/x

[Migration note: severity="low"]

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-31 16:43:18 +01:00
Karel Zak e9ce5ccc90 col: getwchar() errors shouldn't be hidden
The col truncates output when multibyte errors is detected, but the problem is
not reported to stderr and return code is still same like for successful exit.
This stupid behaviour is fixed by this patch.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-30 13:52:48 +01:00
Karel Zak 06b04b23cd build-sys: fix ifdef ENABLE_WIDECHAR usage
There has been unexpected mix of HAVE_WIDECHAR and ENABLE_WIDECHAR macros. The
ENABLE_WIDECHAR is old version and has to be replaced everywhere otherwise we
will see bugs with multibyte stuff.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-30 13:49:50 +01:00
Karel Zak 5b0d01d619 tests: add return code
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-28 01:24:15 +01:00
Karel Zak b6b6c3e3eb raw: add file with udev rule example
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-26 20:06:38 +01:00
Karel Zak 3f88ee9731 raw: move the raw command to /sbin
The raw command could be used from udev scripts.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-26 20:01:39 +01:00
Karel Zak 34ab1590bd raw: don't accept raw0 as a target name
The raw0 is rawctl and cannot be used as a normal raw device. The patch
also enlarge range of <N> for raw<N> and improve the query mode.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-26 19:55:41 +01:00
Karel Zak 69616d88d4 raw: update man page (about dd and O_DIRECT)
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-25 11:22:42 +01:00
Karel Zak 42c9ce52aa hexdump: don't use memset with zero lenght
gcc 4.1.0: "warning: memset used with constant zero length parameter...."

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-17 14:27:15 +01:00
Karel Zak df3773fba0 schedutils: add support for SCHED_BATCH
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-16 15:24:13 +01:00
Karel Zak 5ee003094e schedutils: remove extra hyptens from man pages
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-16 14:30:24 +01:00
Karel Zak b268a0714a po: rename mount/mntent.c to mount/mount_mntent.c
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 15:02:25 +01:00
Karel Zak b30cd7eed5 ipcs: add new tests for ipcs limits
The tests check if data from kernel and from the ipcs command are same.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:53:57 +01:00
Karel Zak 0f0584addc tests: add simple helper that returns info about system
usage: tests/helpers/mnt_test_sysinfo <infoname>

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:53:19 +01:00
Karel Zak cdd540c19f ipcs: max total shared memory in kbytes instead pages
The ipcs command has reported "max total shared memory" as a number of pages.
The others IPC limits are reported in (k)bytes, so it doesn't make sense mix
pages and bytes in the same output. Now "max total shared memory" is reported in
kbytes.

[Migration note: type="API change", severity="low"]

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:46:25 +01:00
Karel Zak 4ac0f9d0c2 ipcs: fix typo in Semaphore headers
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:45:48 +01:00
Karel Zak 97cdb3cb5c ipcs: add regression test for output headers
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:41:29 +01:00
Karel Zak 8271f58d51 more: fix file descriptor leak
When you view a file with the more command and run a shell, the file descriptor
for reading the file is leaked to that process.

To test, more any file. Then do !/bin/sh. At the prompt do "ls -l /proc/$$/fd"
and you'll see the leaked fd.

From: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:40:00 +01:00
Karel Zak d057115966 execl() should be use NULL not 0
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:39:44 +01:00
Karel Zak 8174c9ca72 build-sys: remove DEFAULT_INCLUDES workaround
The automake stuff uses "-I.". as a default gcc option for includes. This is a
problem for source code where is local includes with a same name like system
includes (e.g.  mntent.h, paths.h). Possible workaround is overwrite the
automake DEFAULT_INCLUDES variable. But this solution produces warnings. The
best way (this patch) is probably rename the files and remove DEFAULT_INCLUDES.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:39:17 +01:00
Karel Zak e83446da1a tests: add basic infrastructure for regression tests
The patch adds tests/ directory with simple regression tests infrastructure.

Also, it adds the "ts-mount-paths" test that testing if all defined paths
(fstab, mtab, locks) are still same.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 14:23:48 +01:00
Karel Zak 61d9d2ff1c mount: add simple (printf-like) debug routine and --debug option
The --debug=<level> command line option enables debug outputs. It's
undocumented option, because it's really for debug/tests purpose only.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 13:58:05 +01:00
Karel Zak 5bbc26de59 build-sys: rename to -ng, change maintainer name
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 13:44:06 +01:00
Karel Zak 562218e6ea build-sys: add missing files
This patch add all missing headers, man pages and README files to automake
stuff and "make dist-gzip" produces useful tarball now.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-04 11:57:07 +01:00
Karel Zak 8eeb575c0d build-sys: remove generated autotools stuff from git
The generated autotools stuff shouldn't be maintained by SCM. After check out
from git use ./autogen.sh. For more details see README.devel.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-01-03 22:20:44 +01:00
Karel Zak a120aaa70d Imported from util-linux-2.13-pre7 tarball. 2006-12-07 00:27:22 +01:00
Karel Zak cf6d7faebb Imported from util-linux-2.13-pre6 tarball. 2006-12-07 00:27:13 +01:00
Karel Zak 19922f22a1 Imported from util-linux-2.13-pre5 tarball. 2006-12-07 00:27:10 +01:00
Karel Zak ca3ea756e7 Imported from util-linux-2.13-pre4 tarball. 2006-12-07 00:27:06 +01:00
Karel Zak 9cb689775c Imported from util-linux-2.13-pre3 tarball. 2006-12-07 00:27:03 +01:00
Karel Zak baf39af15b Imported from util-linux-2.13-pre2 tarball. 2006-12-07 00:26:58 +01:00
Karel Zak 48d7b13a1e Imported from util-linux-2.13-pre1 tarball. 2006-12-07 00:26:54 +01:00
Karel Zak 2ab8f9d3ce Imported from util-linux-2.12r tarball. 2006-12-07 00:26:46 +01:00
Karel Zak 9d761c85e0 Imported from util-linux-2.12r-pre1 tarball. 2006-12-07 00:26:44 +01:00
Karel Zak 091b402e31 Imported from util-linux-2.12q tarball. 2006-12-07 00:26:42 +01:00
Karel Zak b359eb3b42 Imported from util-linux-2.12q-pre2 tarball. 2006-12-07 00:26:40 +01:00
Karel Zak cf3f26bf24 Imported from util-linux-2.12q-pre1 tarball. 2006-12-07 00:26:36 +01:00
Karel Zak bf3baa9907 Imported from util-linux-2.12p tarball. 2006-12-07 00:26:33 +01:00