]> err.no Git - util-linux/log
util-linux
15 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Fri, 20 Nov 2009 12:48:26 +0000 (13:48 +0100)]
po: update pl.po (from translationproject.org)

15 years agomount: check for unsuccessful read-only bind mounts
Karel Zak [Thu, 19 Nov 2009 14:56:12 +0000 (15:56 +0100)]
mount: check for unsuccessful read-only bind mounts

Linux kernel allows to use MS_RDONLY together with MS_BIND,
unfortunately the MS_RDONLY is silently ignored and the target
mountpoint is still read-write. Then we have 'ro' in mtab and 'rw' in
/proc/mounts.

This patch checks for this situation by access(2) or futimens(2)
(change atime) and mtab is properly updated and user informed.

Reported-by: Terry Burton <tez@terryburton.co.uk>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoionice: add a note about none class and CFQ
Karel Zak [Wed, 18 Nov 2009 16:13:35 +0000 (17:13 +0100)]
ionice: add a note about none class and CFQ

Reported-by: Corrado Zoccolo <czoccolo@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: add a note about bind-dir remounts
Karel Zak [Wed, 18 Nov 2009 15:11:01 +0000 (16:11 +0100)]
mount: add a note about bind-dir remounts

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: offer aligned first sector
Karel Zak [Wed, 4 Nov 2009 14:14:04 +0000 (15:14 +0100)]
fdisk: offer aligned first sector

Typical "new partition" dialog looks like:

     Partition number (1-4): 1
     First sector (4-818687, default 4):
                             ^^^^^^^^^

The range (e.g. 4-818687) depends on fdisk mode (DOS/non-DOS), but the
default value should be always aligned.

For example RAID5 device in the DOS mode:

   Disk /dev/md0: 419 MB, 419168256 bytes
   2 heads, 4 sectors/track, 102336 cylinders, total 818688 sectors
   Units = sectors of 1 * 512 = 512 bytes
   Sector size (logical/physical): 512 bytes / 65536 bytes
   Disk identifier: 0x081479c3

   ....

   Command (m for help): n
   Command action
      e   extended
      p   primary partition (1-4)
   p
   Partition number (1-4): 1
   First sector (4-818687, default 128):    <---- !!!
   Using default value 128
   Last sector, +sectors or +size{K,M,G} (128-818687, default 818687): +10M

   Command (m for help): p

   ....

       Device Boot      Start         End      Blocks   Id  System
   /dev/md0p1             128       20607       10240   83  Linux

For non-DOS mode the range will be:

   First sector (128-818687, default 128):

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: align end of partition when defined by +size{K,M,G}
Karel Zak [Wed, 4 Nov 2009 13:30:31 +0000 (14:30 +0100)]
fdisk: align end of partition when defined by +size{K,M,G}

It's better to have disks without gaps between partitions, so it's
better to align ends of partitions.

Note, we don't care about end of partitions when the last sector has
been explicitly requested by user.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: check for partition boundary
Karel Zak [Tue, 3 Nov 2009 11:09:36 +0000 (12:09 +0100)]
fdisk: check for partition boundary

Disk /dev/md0: 419 MB, 419168256 bytes
2 heads, 4 sectors/track, 102336 cylinders, total 818688 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 65536 bytes
Disk identifier: 0x081479c3

    Device Boot      Start         End      Blocks   Id  System
/dev/md0p1             200      818687      409244   83  Linux
Partition 1 does not start on physical block boundary.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: print info and recommendations about alignment
Karel Zak [Tue, 3 Nov 2009 11:00:23 +0000 (12:00 +0100)]
fdisk: print info and recommendations about alignment

 * inform user that phy.sector > log.sector
 * warn user when alignment_offset is not provided does, DOS-compatible
   mode is enabled and the default geo.sectors are not aligned
 * suggest to change display units to sectors (oh yes, fdisk
   default are cylinders...)

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: use minimal_io_size for the first partition
Karel Zak [Tue, 3 Nov 2009 10:28:55 +0000 (11:28 +0100)]
fdisk: use minimal_io_size for the first partition

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: add basic routines for LBA alignment
Karel Zak [Wed, 4 Nov 2009 15:15:48 +0000 (16:15 +0100)]
fdisk: add basic routines for LBA alignment

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: read topology info from libblkid
Karel Zak [Thu, 29 Oct 2009 10:25:59 +0000 (11:25 +0100)]
fdisk: read topology info from libblkid

and print ('p' command) info about logical and physical sectors and
alignment_offset.

minimum_io_size

  we don't use physical sector size directly, because on RAIDs is
  better to use minimum_io_size (aka stripe chunk size). For disk drives
  is minimum_io_size the same value as physical sector size.

alignment_offset

  For compatibility with legacy operating systems some vendors provide
  disks where logical and physical sectors are aligned at sector 63
  (= geometry.sectors). In other words the physical 4KB sectors
  start at LBA -1. Then the physical boundary is at:

                     alignment_offset + N * phy_sector_size

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomore: limited line buffer length results in corrupted UTF-8 text
Karel Zak [Mon, 16 Nov 2009 14:52:45 +0000 (15:52 +0100)]
more: limited line buffer length results in corrupted UTF-8 text

Addresses-Debian-Bug: #552608
Reported-By: Roger Leigh <rleigh@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: add NTFS blkid test
Karel Zak [Mon, 16 Nov 2009 13:36:29 +0000 (14:36 +0100)]
tests: add NTFS blkid test

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: fix NTFS non-ASCII labels
Karel Zak [Thu, 12 Nov 2009 23:10:48 +0000 (00:10 +0100)]
libblkid: fix NTFS non-ASCII labels

Addresses-Red-Hat-Bug: #536797
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoblkid: add ID_FS_AMBIVALENT for udev output
Karel Zak [Wed, 11 Nov 2009 16:21:36 +0000 (17:21 +0100)]
blkid: add ID_FS_AMBIVALENT for udev output

UI tools that read information from udev need a way how inform users
about ambivalent probing result (more valid filesystems on the
device).

This patch add a new ID_FS_AMBIVALENT variable:

ID_FS_AMBIVALENT=<info> <info> [ ...]

where <info> is:

<usage>:<type>[:<version>]

all strings are encoded (white spaces and utf8 are replaced with \hex).

For example:

# blkid -p -o udev /dev/sda1
ID_FS_AMBIVALEN=filesystem:vfat:FAT12 other:swap:2

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: remove duplicate debug message
Karel Zak [Wed, 11 Nov 2009 14:34:54 +0000 (15:34 +0100)]
libblkid: remove duplicate debug message

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: properly reset position in probing chains
Karel Zak [Wed, 11 Nov 2009 14:26:49 +0000 (15:26 +0100)]
libblkid: properly reset position in probing chains

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agopo: update pl.po (from translationproject.org)
Jakub Bogusz [Tue, 10 Nov 2009 21:08:25 +0000 (22:08 +0100)]
po: update pl.po (from translationproject.org)

15 years agolibblkid: don't return empty LABELs
Karel Zak [Tue, 10 Nov 2009 13:00:13 +0000 (14:00 +0100)]
libblkid: don't return empty LABELs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoRevert "libblkid: fix buffer usage in FAT prober"
Karel Zak [Tue, 10 Nov 2009 11:48:34 +0000 (12:48 +0100)]
Revert "libblkid: fix buffer usage in FAT prober"

This patch is unnecessary, the library uses two buffers and the VFAT
superblock is always stored in the probe->sbbuf buffer which is never
overwritten. It seems that FAT fsinfo is also in the superblock
buffer. I was too paranoid :-) Sorry.

This reverts commit 041a4ff1db7c3004644211377ac828e8a536da02.

15 years agobuild-sys: cleanup AM_CFLAGS usage
Karel Zak [Mon, 9 Nov 2009 15:45:50 +0000 (16:45 +0100)]
build-sys: cleanup AM_CFLAGS usage

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: update list of pseudo filesystems
Karel Zak [Mon, 9 Nov 2009 14:46:54 +0000 (15:46 +0100)]
mount: update list of pseudo filesystems

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agodocs: update TODO
Karel Zak [Fri, 6 Nov 2009 23:20:55 +0000 (00:20 +0100)]
docs: update TODO

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: remove gtkdocize from autogen.sh
Karel Zak [Fri, 6 Nov 2009 23:06:53 +0000 (00:06 +0100)]
build-sys: remove gtkdocize from autogen.sh

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoRevert "build-sys: check for gtk-doc by default"
Karel Zak [Fri, 6 Nov 2009 22:59:54 +0000 (23:59 +0100)]
Revert "build-sys: check for gtk-doc by default"

The gtt-doc.make is not required for "make dist" now. So
gtk-doc is completely optional now.

Let's keep gtk-doc disabled by default.

This reverts commit 57facddbc561f86f26cb70e9c5a4391bcf42ff11.

15 years agobuild-sys: clean up gtk-doc stuff
Karel Zak [Fri, 6 Nov 2009 22:43:46 +0000 (23:43 +0100)]
build-sys: clean up gtk-doc stuff

* gtk-doc.make does not care about difference between $srcdir and $builddir
  and many things are generated into $srcdir. It's pretty difficult to support
  out-of-source build...

* gtk-doc expects that many generated files are stored in repository
  (we don't use XML templates, all documentation in source code only).

* we don't want to distribute generated html files, the docs is
  attractive for very small group of people...

Frankly, it would be nice to found something more robust and better
than gtk-doc.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: fix out-of-source build
Karel Zak [Fri, 6 Nov 2009 02:05:27 +0000 (03:05 +0100)]
build-sys: fix out-of-source build

The blkid.h file is generated and stored in $top_builddir.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: don't distribute generated blkid.h
Karel Zak [Fri, 6 Nov 2009 01:53:22 +0000 (02:53 +0100)]
build-sys: don't distribute generated blkid.h

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: check for gtk-doc by default
Karel Zak [Fri, 6 Nov 2009 01:04:41 +0000 (02:04 +0100)]
build-sys: check for gtk-doc by default

This patch add "check|yes|no" concept for --{disable,enable}-gtk-doc
configure option. (We use the same concept for many u-l-ng compile
options.)

The gtk-doc is required for "make dist" (not sure if this is good
idea..), so it makes sense to enable gtk-doc by default.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: fix (official) gtk-doc.make
Karel Zak [Fri, 6 Nov 2009 00:13:30 +0000 (01:13 +0100)]
build-sys: fix (official) gtk-doc.make

The dist-hook rule in config/gtk-doc.make requires {xml,html,tmpl}/*
gkt-doc files, but there is not defined a dependence on these files.

It means "make dist" does not work on pristine source code
tree (e.g. "git clean -xfd" source).

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: remove obsolete --with-fsprobe from distcheck flags
Karel Zak [Thu, 5 Nov 2009 22:37:15 +0000 (23:37 +0100)]
build-sys: remove obsolete --with-fsprobe from distcheck flags

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: remove LT_STATIC_LDFLAGS
Karel Zak [Thu, 5 Nov 2009 21:49:11 +0000 (22:49 +0100)]
build-sys: remove LT_STATIC_LDFLAGS

It was really stupid idea to use *_LDFLAGS for some global variable.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: cleanup static building
Karel Zak [Thu, 5 Nov 2009 14:58:20 +0000 (15:58 +0100)]
build-sys: cleanup static building

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add superblocks.c sample
Karel Zak [Mon, 2 Nov 2009 13:59:23 +0000 (14:59 +0100)]
libblkid: add superblocks.c sample

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add sector size funcs to blkid.h.in
Karel Zak [Mon, 2 Nov 2009 13:08:56 +0000 (14:08 +0100)]
libblkid: add sector size funcs to blkid.h.in

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomount: add long options to mount.8
Karel Zak [Mon, 2 Nov 2009 10:27:47 +0000 (11:27 +0100)]
mount: add long options to mount.8

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: add regression test listing empty/nonsense images
Zdenek Behan [Sun, 1 Nov 2009 23:38:36 +0000 (00:38 +0100)]
fdisk: add regression test listing empty/nonsense images

Signed-off-by: Zdenek Behan <rain@matfyz.cz>
15 years agomkswap: restore device argument in mkswap.8 synopsis
Peter Breitenlohner [Thu, 29 Oct 2009 15:29:56 +0000 (16:29 +0100)]
mkswap: restore device argument in mkswap.8 synopsis

Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
15 years agowipefs: remove obsolete comment
Karel Zak [Fri, 30 Oct 2009 12:48:10 +0000 (13:48 +0100)]
wipefs: remove obsolete comment

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: refresh GPT regression test
Karel Zak [Fri, 30 Oct 2009 11:26:03 +0000 (12:26 +0100)]
tests: refresh GPT regression test

The n+1 change has been introduced by commit
4c8e837230bb96dc3c447706d9c3b11e4167ba13.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: does not return useless binary data
Karel Zak [Fri, 30 Oct 2009 11:20:51 +0000 (12:20 +0100)]
libblkid: does not return useless binary data

Currently, the binary blkid_probe_get_{topology,partitions}() API
returns empty structs when information has not been gathered. This is
confusing for applications. It's seems better to return NULL.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: topology - add logical and physical sector size
Karel Zak [Fri, 30 Oct 2009 11:08:01 +0000 (12:08 +0100)]
libblkid: topology - add logical and physical sector size

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agobuild-sys: add HAVE_LIBBLKID_INTERNAL
Karel Zak [Tue, 27 Oct 2009 11:11:37 +0000 (12:11 +0100)]
build-sys: add HAVE_LIBBLKID_INTERNAL

It's better to use one macro for all situations where we depends on
in-tree (internal) libblkid.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add BLKID_{VERSION,DATE} to blkid.h
Karel Zak [Tue, 27 Oct 2009 10:30:37 +0000 (11:30 +0100)]
libblkid: add BLKID_{VERSION,DATE} to blkid.h

The original e2fsprogs has BLKID_{VERSION,DATE} macros in blkid.h.
Although the macros are not updated for many years in e2fsprogs. So I
guess nobody uses it.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: return first detected crypto device
Scott James Remnant [Mon, 26 Oct 2009 12:49:17 +0000 (13:49 +0100)]
libblkid: return first detected crypto device

Crypto devices may sometimes have multiple additional prober matches,
however just like RAID, there's no danger of activating the wrong one
since special help is needed to activate the block device before it
can be used.

Thus modify blkid_do_safeprobe() to break out of the loop when a
crypto device is detected, as it does already for RAID.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add test cases for VMFS
Mike Hommey [Fri, 16 Oct 2009 10:38:10 +0000 (12:38 +0200)]
libblkid: add test cases for VMFS

Signed-off-by: Mike Hommey <mh@glandium.org>
15 years agomount: and libblkid: covert /dev/dm-N to /dev/mapper/<name>
Karel Zak [Mon, 26 Oct 2009 12:33:03 +0000 (13:33 +0100)]
mount: and libblkid: covert /dev/dm-N to /dev/mapper/<name>

 * mount(8) uses private device-mapper names in mtab

 * libblkid returns private device-mapper names when evaluate udev
   /dev/disk-by symlinks.

 * on systems where DM is fully integrated with udev the /dev/mapper/<name>
   files are symlinks to /dev/dm-N. It means we need a special care to hide
   private device-mapper names.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: convert GPT partition LBA to 512-byte sectors
Karel Zak [Thu, 22 Oct 2009 19:40:27 +0000 (21:40 +0200)]
libblkid: convert GPT partition LBA to 512-byte sectors

The libblkid keeps information about partitions in 512-byte counts.
This patch:

 * convert GPT partition LBA to 512-byte sectors

 * fix n+1 bug in GPT partition size, because:

   "The partition is defined as all the logical blocks **inclusive**
    of the StartingLBA and EndingLBA." (UEFI 2.3)

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: use BLKSSZGET for GPT sectors
Karel Zak [Thu, 22 Oct 2009 12:52:39 +0000 (14:52 +0200)]
libblkid: use BLKSSZGET for GPT sectors

The current implementation uses fixed sector size (512 bytes), that's
wrong. UEFI standard requires real logical sector size -- it means
BLKSSZGET for Linux.

The size of GPT header is not static, but whole sector is allocated
for the header. In theory the HeaderSize field could be greater than
sizeof(struct gpt_header). It means we have to read whole sector with
the header, because the header crc32 checksum is counted according to
HeaderSize.

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agodmesg: fix typo in man page
Ken Kopin [Mon, 19 Oct 2009 13:58:57 +0000 (07:58 -0600)]
dmesg: fix typo in man page

Signed-off-by: LaMont Jones <lamont@debian.org>
15 years agolibblkid: topology - ignore non-blockdevs
Karel Zak [Mon, 19 Oct 2009 13:39:31 +0000 (15:39 +0200)]
libblkid: topology - ignore non-blockdevs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add support for topology ioctls
Karel Zak [Mon, 19 Oct 2009 13:33:00 +0000 (15:33 +0200)]
libblkid: add support for topology ioctls

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agodocs: add 'unshare' and 'wipefs' to AUTHORS
Karel Zak [Mon, 19 Oct 2009 09:26:12 +0000 (11:26 +0200)]
docs: add 'unshare' and 'wipefs' to AUTHORS

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agodocs: update AUTHORS file
Karel Zak [Mon, 19 Oct 2009 08:59:15 +0000 (10:59 +0200)]
docs: update AUTHORS file

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agopo: merge changes
Karel Zak [Mon, 19 Oct 2009 08:55:17 +0000 (10:55 +0200)]
po: merge changes

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agopo: update po/POTFILES.in
Karel Zak [Mon, 19 Oct 2009 08:53:52 +0000 (10:53 +0200)]
po: update po/POTFILES.in

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agopo: update vi.po (from translationproject.org)
Clytie Siddall [Mon, 19 Oct 2009 08:45:58 +0000 (10:45 +0200)]
po: update vi.po (from translationproject.org)

15 years agopo: update ja.po (from translationproject.org)
Makoto Kato [Mon, 19 Oct 2009 08:45:58 +0000 (10:45 +0200)]
po: update ja.po (from translationproject.org)

15 years agopo: update id.po (from translationproject.org)
Arif E. Nugroho [Mon, 19 Oct 2009 08:45:58 +0000 (10:45 +0200)]
po: update id.po (from translationproject.org)

15 years agopo: update fr.po (from translationproject.org)
Nicolas Provost [Mon, 19 Oct 2009 08:45:58 +0000 (10:45 +0200)]
po: update fr.po (from translationproject.org)

15 years agopo: update fi.po (from translationproject.org)
Lauri Nurmi [Mon, 19 Oct 2009 08:45:58 +0000 (10:45 +0200)]
po: update fi.po (from translationproject.org)

15 years agopo: update cs.po (from translationproject.org)
Petr Pisar [Mon, 19 Oct 2009 08:45:58 +0000 (10:45 +0200)]
po: update cs.po (from translationproject.org)

15 years agoinitctl: fix strict-aliasing bugs
Karel Zak [Fri, 16 Oct 2009 21:37:22 +0000 (23:37 +0200)]
initctl: fix strict-aliasing bugs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agomkfs.minix: fix strict-aliasing bugs
Karel Zak [Fri, 16 Oct 2009 20:13:14 +0000 (22:13 +0200)]
mkfs.minix: fix strict-aliasing bugs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofsck.minix: fix strict-aliasing bugs
Karel Zak [Fri, 16 Oct 2009 20:08:35 +0000 (22:08 +0200)]
fsck.minix: fix strict-aliasing bugs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: fix strict-aliasing bugs
Karel Zak [Fri, 16 Oct 2009 19:49:33 +0000 (21:49 +0200)]
fdisk: fix strict-aliasing bugs

gcc 4.4 produces tons of

  "dereferencing type-punned pointer will break strict-aliasing rules"

warnings for fdisk code where is

  char buffer[BUFSIZ];

  ((struct disklabel *) MBRBuffer)->foo

There are two ways how fix the problem:

  1/ union {
          char buffer[BUFSIZ], struct disklabel label
     } MBRBuffer;

  2/ use allocated buffer, this way seems less invasive.

This patch implements 2/.

Old version:
  $ make -C fdisk | grep -c warning
  236

New version:
  $ make -C fdisk | grep -c warning
  0

About aliasing:
 - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40665
 - http://cellperformance.beyond3d.com/articles/2006/06/understanding-strict-aliasing.html
 - C99

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoRevert "build-sys: move fsck/mkfs for bfs/cramfs/minix to /usr"
Karel Zak [Fri, 16 Oct 2009 20:53:12 +0000 (22:53 +0200)]
Revert "build-sys: move fsck/mkfs for bfs/cramfs/minix to /usr"

See http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/2689/focus=2690

This reverts commit d4fa971c42467fb69e5d89d28e1b98c491a1505a.

15 years agofdisk: sgi label - remove duplicate swab16swab[16,32]() definitions
Karel Zak [Fri, 16 Oct 2009 09:43:02 +0000 (11:43 +0200)]
fdisk: sgi label - remove duplicate swab16swab[16,32]() definitions

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add support for VMFS (VMware File System)
Mike Hommey [Fri, 16 Oct 2009 07:26:07 +0000 (09:26 +0200)]
libblkid: add support for VMFS (VMware File System)

Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: update docs/.gitignore
Karel Zak [Fri, 16 Oct 2009 08:21:44 +0000 (10:21 +0200)]
libblkid: update docs/.gitignore

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: add missing packed attributes
Karel Zak [Fri, 16 Oct 2009 00:34:28 +0000 (02:34 +0200)]
libblkid: add missing packed attributes

This patch add __attribute__((packed)) to almost all superblock and
disk label definitions. Well, in many cases this is not necessary, but
it's a cheap way how to keep the code robust...

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoinclude: use c.h in canonicalize.h
Karel Zak [Thu, 15 Oct 2009 23:45:42 +0000 (01:45 +0200)]
include: use c.h in canonicalize.h

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agonamei: use c.h
Karel Zak [Thu, 15 Oct 2009 23:44:33 +0000 (01:44 +0200)]
namei: use c.h

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: use c.h in samples
Karel Zak [Thu, 15 Oct 2009 23:43:07 +0000 (01:43 +0200)]
libblkid: use c.h in samples

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agosetterm: use c.h, remove tailing whitespace
Karel Zak [Thu, 15 Oct 2009 23:40:58 +0000 (01:40 +0200)]
setterm: use c.h, remove tailing whitespace

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agonewgrp: use c.h, remove tailing whitespace
Karel Zak [Thu, 15 Oct 2009 23:38:29 +0000 (01:38 +0200)]
newgrp: use c.h, remove tailing whitespace

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agohwclock: use c.h
Karel Zak [Thu, 15 Oct 2009 23:37:09 +0000 (01:37 +0200)]
hwclock: use c.h

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agopartx: use c.h
Karel Zak [Thu, 15 Oct 2009 23:35:55 +0000 (01:35 +0200)]
partx: use c.h

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolosetup: remove unused macro
Karel Zak [Thu, 15 Oct 2009 23:34:20 +0000 (01:34 +0200)]
losetup: remove unused macro

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agocal: use c.h
Karel Zak [Thu, 15 Oct 2009 23:32:28 +0000 (01:32 +0200)]
cal: use c.h

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agokill: use c.h
Karel Zak [Thu, 15 Oct 2009 23:28:41 +0000 (01:28 +0200)]
kill: use c.h

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofdisk: use c.h
Karel Zak [Thu, 15 Oct 2009 23:26:46 +0000 (01:26 +0200)]
fdisk: use c.h

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agosfdisk: use c.h, remove obsolete #ifdefs
Karel Zak [Thu, 15 Oct 2009 23:15:19 +0000 (01:15 +0200)]
sfdisk: use c.h, remove obsolete #ifdefs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoblockdev: use c.h
Karel Zak [Thu, 15 Oct 2009 23:05:45 +0000 (01:05 +0200)]
blockdev: use c.h

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agochrt: use c.h
Karel Zak [Thu, 15 Oct 2009 23:01:48 +0000 (01:01 +0200)]
chrt: use c.h

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoldattach: use c.h
Karel Zak [Thu, 15 Oct 2009 23:00:27 +0000 (01:00 +0200)]
ldattach: use c.h

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: use c.h
Karel Zak [Thu, 15 Oct 2009 22:58:53 +0000 (00:58 +0200)]
libblkid: use c.h

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoinclude: add c.h with fundamental C definitions
Karel Zak [Thu, 15 Oct 2009 22:42:22 +0000 (00:42 +0200)]
include: add c.h with fundamental C definitions

Add:
  * ARRAY_SIZE with array type check
  * PATH_MAX, TRUE and FALSE macros
  * dummy __attribute__ for non-gcc compilers

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agotests: update fsck.ismounted test
Karel Zak [Thu, 15 Oct 2009 21:37:34 +0000 (23:37 +0200)]
tests: update fsck.ismounted test

The latest version of the lib/test_ismounted binary returns absolute
mountpoint path too. This patch removes the path from test output (the
path is variable).

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolibblkid: fix typo s/Hihg/High/
Jim Meyering [Thu, 15 Oct 2009 13:28:58 +0000 (15:28 +0200)]
libblkid: fix typo s/Hihg/High/

* shlibs/blkid/docs/libblkid-docs.xml

Signed-off-by: Jim Meyering <meyering@redhat.com>
15 years agolibblkid: add note about UUID_SUB, increment number of superblock values
Karel Zak [Thu, 15 Oct 2009 13:20:38 +0000 (15:20 +0200)]
libblkid: add note about UUID_SUB, increment number of superblock values

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agofsck.minix: fix broken zone checking
Karel Zak [Thu, 15 Oct 2009 12:14:32 +0000 (14:14 +0200)]
fsck.minix: fix broken zone checking

This bug has been introduced by commit
95356e8b744439336925eeb36f01399f1ee8a5e9.

The fsck.minix code assumes that isset() macro returns boolean,
unfortunately the generic implementation from libc returns integer.

This patch also add a fallback for the bitmap macros to include/bitops.h.

Reported-by: "Andries E. Brouwer" <Andries.Brouwer@cwi.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoblockdev: fix topology ioctls
Karel Zak [Thu, 15 Oct 2009 00:32:03 +0000 (02:32 +0200)]
blockdev: fix topology ioctls

 kernel 2.6.32-rc4 (kvm):

 # blockdev -v --getss --getpbsz --getiomin --getioopt --getmaxsect --getalignoff   /dev/sda
 get logical block (sector) size: 512
 get physical block (sector) size: 512
 get minimum I/O size: 512
 get optimal I/O size: 0
 get max sectors per request: 1024
 get alignment offset: 0

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoblockdev: add topology ioctls support
Karel Zak [Wed, 14 Oct 2009 23:22:42 +0000 (01:22 +0200)]
blockdev: add topology ioctls support

new options:

   --getpbsz                      get physical block (sector) size
   --getiomin                     get minimum I/O size
   --getioopt                     get optimal I/O size
   --getalignoff                  get alignment offset
   --getmaxsect                   get max sectors per request

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoblockdev: add support for uint and ushort ioctls
Karel Zak [Wed, 14 Oct 2009 22:06:07 +0000 (00:06 +0200)]
blockdev: add support for uint and ushort ioctls

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoblockdev: refactoring (better commands definition)
Karel Zak [Wed, 14 Oct 2009 21:57:52 +0000 (23:57 +0200)]
blockdev: refactoring (better commands definition)

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agoblkid: add pretty output, document -L incompatibility with e2fsprogs
Karel Zak [Wed, 14 Oct 2009 00:17:27 +0000 (02:17 +0200)]
blkid: add pretty output, document -L incompatibility with e2fsprogs

... sad story, I have temporary disabled pretty-output code
in very early version of blkid.c in u-l-ng. (It was also in
time when pretty-output was very new feature in e2fsprogs.)

Unfortunately, the -L option (shortcut to "-o list") in u-l-ng version
was reused for for any other functionality few months later.... this
stupid thing was released in u-l-ng 2.15 and 2.16 without any negative
feedback from users.

It means the blkid from u-l-ng is not backwardly compatible with
the original version from e2fsprogs. The -L option has a different
meaning there.

I'm sorry about this bug...

This patch:

  * enable pretty-output (-o line)
  * add a note about incompatibility between u-l-ng and e2fsprogs
    to blkid.8 man page

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agolib: import whole ismounted.c code from e2fsprogs
Karel Zak [Tue, 13 Oct 2009 23:13:18 +0000 (01:13 +0200)]
lib: import whole ismounted.c code from e2fsprogs

Signed-off-by: Karel Zak <kzak@redhat.com>
15 years agohwclock: set kernel timezone with --systz --utc
Scott James Remnant [Thu, 24 Sep 2009 19:17:23 +0000 (12:17 -0700)]
hwclock: set kernel timezone with --systz --utc

Even though --systz doesn't need to change the system clock when the
hardware clock is in UTC time (--systz --utc), it does need to set
the kernel timezone so that FAT timestamps, etc. will be correct.

Signed-off-by: Scott James Remnant <scott@ubuntu.com>
15 years agotests: swapon workaround for libtool wrapper
Karel Zak [Tue, 13 Oct 2009 13:37:49 +0000 (15:37 +0200)]
tests: swapon workaround for libtool wrapper

The swapon command behaviour depends on program name (argv[0] = swapon
| swapoff). It means we cannot use the libtool wrapper script in our
regression tests. It seems better to call the binaries directly with
proper LD_LIBRARY_PATH. This is probably less portable, but good
enough for our tests.

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