Commit Graph

313 Commits

Author SHA1 Message Date
Karel Zak 6a5486fded docs: cleanup before release
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03 14:15:08 +02:00
Karel Zak b622c840d3 docs: update TODO file
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03 01:55:06 +02:00
Karel Zak 0027a8b16f po: update po files
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03 01:48:28 +02:00
Karel Zak a5b47e0a39 setarch: add NLS support
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03 01:36:03 +02:00
Karel Zak 86d62711a9 man pages: add "AVAILABILITY" section
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-03 01:17:04 +02:00
Karel Zak 2e039577c5 mount: use loop= option when mounting by /sbin/mount.<type>
The mount(8) calls external mount programs (/sbin/mount.<type>)
without the loop=/dev/loopN option. This patch fix this bug.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 23:35:08 +02:00
Arkadiusz Miskiewicz 46e711180f build-sys: fix linking when ncurses is built with --with-termlib=tinfo
When system ncurses is built with --with-termlib=tinfo option
then there are two libraries - libtinfo (which contains terminal
related functions) and libncurses (rest).

Correctly link against libtinfo in such case.

Signed-off-by: Arkadiusz Miskiewicz <arekm@maven.pl>
2007-07-02 16:26:20 +02:00
Karel Zak a6f628832a wall: fix O_NONBLOCK usage
From: Alan Curry <pacman@TheWorld.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 15:58:09 +02:00
Karel Zak 652de88cef cfdisk: fix stupid typo in GPT checker call
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 15:41:48 +02:00
Karel Zak 46151e8772 sfdisk: fix "differ in signedness" compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 15:39:58 +02:00
Karel Zak f27bec298f sfdisk: fix "may be used uninitialized" compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 15:30:27 +02:00
Karel Zak 3a9215ddc4 fdisk: fix "differ in signedness" compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 15:06:13 +02:00
David Miller 899736f12f fdisk: many significant improvements and fixes to Sun label handling
1) Properly describe the exact layout and fields of the sun disk
   label.  Several fields were incorrectly mentioned and others
   wrongly sized.

2) Properly set the version, sane, and num_partitions fields.

   Because we weren't doing this, programs such as Solaris's format
   and the Solaris kernel itself refused to recognize our disk labels
   as valid.

3) Move SSWAP*() macros into fdisksunlabel.c as there is no reason
   for them to be exposed to the rest of fdisk.

4) Kill the sun_predefined_drives array hack and assosciated code.

   Instead size the disk and figure out the geometry properly just
   like the SGI and MSDOS partition handling do, by means of the
   HD_GETGEO ioctl() and disksize().

5) If the disk label read is found to not have the proper values
   set in version, sane, or num_partitions, fix them, recompute the
   label checksum, dirty the disk label, and let the user know what
   we did and that the fixed values will be written out if they 'w'.

   This gives users an easy way to fix up disk labels created by
   disk labelling programs which had this bug.

6) Create a sun_sys_getid() function so that fdisk.c does not need
   to reference the sun disk label details directly, just like the
   SGI code does.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-02 14:41:36 +02:00
David Miller eba338783e ionice: fix ionice build on sparc
Provide the proper syscall numbers for this architecture.

Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-02 13:52:41 +02:00
Karel Zak 8b3a46d2b0 sys-utils: added setarch command
This patch merges setarch command to util-linux-ng code.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 13:48:15 +02:00
Karel Zak e782f1d400 build-sys: cleanup architecture conditionals
This patch also add some new architectures for
AM_CONDITIONAL(ARCH_  ...)

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-02 13:21:06 +02:00
Karel Zak 2dfd8e6276 build-sys: cleanup sys-utils/ rdev symlinks
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-29 15:12:33 +02:00
Karel Zak a424171cd1 blockdev: cleanup usage() and update man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-29 12:06:58 +02:00
Karel Zak c2a1e78808 blockdev: add BLKFRAGET/BLKFRASET ioctls
In Linux 2.6 the BLKRASET ioctl has the desired effect for mounted
file-systems.  In Linux 2.4 it appears to set the number of blocks to
read-ahead on the *device* as opposed to within a *file*, and the
maximum value of this number is 255.  As a result the invocation of
blockdev will fail on Linux 2.4 for any usefully large value of
READAHEAD, and will not in any case have the desired affect for
fragmented files.

(Based on the blockdev-getfra-setfra.patch Debian patch.)

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-29 11:38:54 +02:00
Karel Zak d1a3470951 agetty: check gethostname() return value
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-29 02:27:27 +02:00
Karel Zak e61e66bd95 agetty: add 'O' escape code to display domain name
This patch add a new 'O' escape code to display domain name
by issue-file (/etc/issue) output.

(Based on an Gentoo patch.)

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-29 02:26:02 +02:00
Karel Zak bd1eae0f55 mount: needs to handle special mountprog even on guessed file systems.
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-28 01:23:49 +02:00
Karel Zak e7fa917a33 fdisk: add MAC label detection
This patch is based on the old Suse util-linux-2.11q-fs_mac.diff patch.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-27 23:49:56 +02:00
Karel Zak 024353c9ea fdisk: move duplicate stuff from fdisk*label.h to fdisk.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-27 23:36:08 +02:00
Karel Zak d99f0140f7 losetup: add long options and fix man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-27 17:32:51 +02:00
Matthias Koenig 6ffa7c9383 mount: loop device race condition
Fix race in losetup

Retry acquiring a loop device if set_loop failed with EBUSY

Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-27 16:15:50 +02:00
Matthias Koenig 95ba33f7a4 mount: loop device race condition
Fix race in mount -o loop

Retry acquiring a loop device if the setup failed with EBUSY.

Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-27 14:55:00 +02:00
Luciano Chavez 653872612c sfdisk: setting default geometry values
The cfdisk and fdisk set defaults for heads and sectors in order to handle a
situation when the get_geometry() ends up with zeroes for the disk geometry for
device-mapper devices. This patch add same functionally to sfdisk.

You know that a dmsetup setgeometry of the the dm device can be used to
circumvent the issue but users may not immediately realize they need to do
that.
2007-06-26 13:21:25 +02:00
Kay Sievers 9f70f8b143 mount: use encoded labels for volume_id
The current version of libvolume_id exports the encoding function for the
symlinks names, so slashes in labels and other chars, that don't really fit
into symlink names, will work as expected with LABEL=.
2007-06-26 12:53:16 +02:00
Karel Zak 6b9cda90f4 ddate: fix compiler warnings
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-19 16:42:07 +02:00
Cliff Wickman f7e3dc0533 taskset: independent of hardcoded NR_CPUS max.
This patch makes the taskset command independent of the system's maximum
number of cpus (CONFIG_NR_CPUS).  The maximum for CONFIG_NR_CPUS is a
moving target.

With this patch the size of the systems's cpumask_t is gotten from
sched_getaffinity(2).

This patch uses variable length bitmasks borrowed from Paul Jackson's
variable size bitmask routines (hence I kept his copyright notice).
This replaces the use of the glibc CPU_SETSIZE, CPU_SET, CPU_ZERO and
CPU_ISSET macros which depend on a hardcoded size for cpu_set_t.

(also fixes one little nit: the -V option is "-v" in the built-in help, so
 changed the built-in help)

Signed-off-by: Cliff Wickman <cpw@sgi.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-19 15:00:10 +02:00
Karel Zak ba3809b012 losetup: add a new option -s
The losetup provides an -f option to discover an unused loop device.  As
implemented, it is racy. The problem is that -f prints the loop device
to stdout only when used standalone.  This means a script has to do:

 lodev=$(losetup -f)
 losetup $lodev $filename

which is racy if another script may be running.

This patch add a new option '-s'. The '-s' option prints device name
if the -f option and a file argument are present. For example:

 lodev=$(losetup -f -s $filename)

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-18 15:44:02 +02:00
Karel Zak d20b54c4bb tests: add mount /dev/symlink test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-15 21:32:45 +02:00
Karel Zak 1b5417aca1 tests: add support for suid programs
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-15 15:55:10 +02:00
Karel Zak 140603be64 mount: rewrite getfs_by_specdir() without mem leaks
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-15 15:47:22 +02:00
Karel Zak f178b56e27 mount: fix typo in error message
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-15 15:24:45 +02:00
Karel Zak b002d0212d tests: fix ts_fstab_add function
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-15 11:29:04 +02:00
Karel Zak 71be1ee4a1 tools: add codecheck-config that checks for {HAVE,ENABLE}_ orphans
Signed-off-by: Matthias Koenig <mkoenig@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-15 10:17:51 +02:00
Karel Zak 69c47f8089 getopt: remove old unused files
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-14 14:50:14 +02:00
Karel Zak 039837878d mcookie: remove non-linux code
Something like #ifdef __linux__ is non-sense in util-linux where
everything depend on linux.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-14 14:43:41 +02:00
Karel Zak 94ed908c8d mkfs.cramfs: cleanup HAVE_ macros usage
It's bad to use any HAVE_* macros for anything other than
for build-system (autotools) stuff.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-14 13:55:37 +02:00
Karel Zak 4445728f0f build-sys: fix HAVE_NCURSES
The HAVE_NCURSES in config.h is required by the misc-utils/cal.c.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-14 13:32:32 +02:00
Karel Zak 41d8815ab7 swapon: cleanup PATH_ macros and tailing white-spaces
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-14 11:54:44 +02:00
Karel Zak 96aef66687 misc-utils: remove old cal test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-13 21:43:41 +02:00
Mike Frysinger ffa63a3dbb swapon: fix swapon headers and syscalls
This patch scrubs anything related to SWAPON_NEEDS_TWO_ARGS as this is only
relevant for < linux-1.3.2 and i say it's about time we let it go.

I also cleaned up the system call fallback logic as the _syscall#() macros are
the deprecated interface in favor of the real syscall() function.

The asm/page.h gets the boot as nothing in swapon.c utilizes defines from it
while unistd.h gets always included as defines/functions are used from it other
than just swapon().

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2007-06-13 14:35:34 +02:00
Karel Zak a256ea01ff cal: widechar code cleanup
This patch make widechar code (cal headers initialization) more
robust. That's possible to format wide char strings by swprintf() and
non-widechar version by sprintf(). This is better than the old
solution with wcscat().

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12 17:46:16 +02:00
Karel Zak 174809cff0 docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12 16:59:03 +02:00
Karel Zak f406193831 cal: ifdef cleanup, non-curses/tempcap code fixes
This patche:
  - removes extra #ifdef-s,
  - fixes \n usage when compiled without curses/termcap

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12 16:45:32 +02:00
Karel Zak 94b269193b cal: fix a segfault and -3m highlighting
Fixes a segfault for certain values of $TERM

Fixes alignment issues when the highlighted day (today)
is in the last week of the month.

Signed-off-by: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12 16:08:58 +02:00
Karel Zak 15ec3ddf19 tests: add cal -y test
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-06-12 13:26:05 +02:00