Commit Graph

1656 Commits

Author SHA1 Message Date
Karel Zak fed194513d build-sys: remove obsolete --with-fsprobe from distcheck flags
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-05 23:37:15 +01:00
Karel Zak 495a87331a 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>
2009-11-05 22:49:26 +01:00
Karel Zak 10a43146c3 build-sys: cleanup static building
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-05 15:58:20 +01:00
Karel Zak 949130cbdf libblkid: add superblocks.c sample
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-02 14:59:23 +01:00
Karel Zak f2b898f031 libblkid: add sector size funcs to blkid.h.in
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-02 14:08:56 +01:00
Karel Zak 344cf58967 mount: add long options to mount.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-02 11:27:47 +01:00
Zdenek Behan 66723dfd8a fdisk: add regression test listing empty/nonsense images
Signed-off-by: Zdenek Behan <rain@matfyz.cz>
2009-11-02 10:10:18 +01:00
Peter Breitenlohner 327f07d601 mkswap: restore device argument in mkswap.8 synopsis
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-11-02 10:06:06 +01:00
Karel Zak 870768adb5 wipefs: remove obsolete comment
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-30 13:48:10 +01:00
Karel Zak 0071917f78 tests: refresh GPT regression test
The n+1 change has been introduced by commit
4c8e837230.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-30 12:26:03 +01:00
Karel Zak d7be1a7426 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>
2009-10-30 12:20:51 +01:00
Karel Zak 4c3ceac607 libblkid: topology - add logical and physical sector size
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-30 12:08:01 +01:00
Karel Zak 1a70e0cba2 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>
2009-10-27 12:11:37 +01:00
Karel Zak 033cf439e3 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>
2009-10-27 11:30:37 +01:00
Scott James Remnant 048c62915f 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>
2009-10-26 13:49:17 +01:00
Mike Hommey 06b1f2eda4 libblkid: add test cases for VMFS
Signed-off-by: Mike Hommey <mh@glandium.org>
2009-10-26 13:42:36 +01:00
Karel Zak a992137b7b 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>
2009-10-26 13:33:03 +01:00
Karel Zak 4c8e837230 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>
2009-10-22 23:19:25 +02:00
Karel Zak 2a1dfbad1c 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>
2009-10-22 14:52:39 +02:00
Ken Kopin d13fe35ca1 dmesg: fix typo in man page
Signed-off-by: LaMont Jones <lamont@debian.org>
2009-10-19 22:22:18 +02:00
Karel Zak 6d2b1f82c2 libblkid: topology - ignore non-blockdevs
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-19 15:39:31 +02:00
Karel Zak 58cde6ce41 libblkid: add support for topology ioctls
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-19 15:33:00 +02:00
Karel Zak 5e51568e14 docs: add 'unshare' and 'wipefs' to AUTHORS
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-19 11:26:12 +02:00
Karel Zak 3bcf2c734f docs: update AUTHORS file
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-19 10:59:15 +02:00
Karel Zak 56e7984dd5 po: merge changes
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-19 10:55:17 +02:00
Karel Zak 65ff501338 po: update po/POTFILES.in
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-19 10:53:52 +02:00
Clytie Siddall c397dfd1c2 po: update vi.po (from translationproject.org) 2009-10-19 10:45:58 +02:00
Makoto Kato 1d492495b1 po: update ja.po (from translationproject.org) 2009-10-19 10:45:58 +02:00
Arif E. Nugroho b631d132f0 po: update id.po (from translationproject.org) 2009-10-19 10:45:58 +02:00
Nicolas Provost 889eaf220f po: update fr.po (from translationproject.org) 2009-10-19 10:45:58 +02:00
Lauri Nurmi 7a83395bc0 po: update fi.po (from translationproject.org) 2009-10-19 10:45:58 +02:00
Petr Pisar dfb1ba902f po: update cs.po (from translationproject.org) 2009-10-19 10:45:58 +02:00
Karel Zak 23387a68a7 initctl: fix strict-aliasing bugs
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-17 00:19:23 +02:00
Karel Zak dfea25692c mkfs.minix: fix strict-aliasing bugs
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-17 00:19:23 +02:00
Karel Zak c326060c2f fsck.minix: fix strict-aliasing bugs
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-17 00:19:23 +02:00
Karel Zak b2f15782a7 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>
2009-10-17 00:18:46 +02:00
Karel Zak 3f8a8dd82f 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 d4fa971c42.
2009-10-16 22:53:12 +02:00
Karel Zak 83aca6b072 fdisk: sgi label - remove duplicate swab16swab[16,32]() definitions
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 11:43:02 +02:00
Mike Hommey 3a1e412fe2 libblkid: add support for VMFS (VMware File System)
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 10:27:04 +02:00
Karel Zak f8521e7652 libblkid: update docs/.gitignore
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 10:21:44 +02:00
Karel Zak 11854e2eff 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>
2009-10-16 02:34:28 +02:00
Karel Zak 45bda5c8dd include: use c.h in canonicalize.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:45:42 +02:00
Karel Zak fd03d92da8 namei: use c.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:44:33 +02:00
Karel Zak 3ebd663b09 libblkid: use c.h in samples
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:43:07 +02:00
Karel Zak b6e899d934 setterm: use c.h, remove tailing whitespace
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:40:58 +02:00
Karel Zak ad564eadf9 newgrp: use c.h, remove tailing whitespace
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:38:29 +02:00
Karel Zak b940bae397 hwclock: use c.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:37:09 +02:00
Karel Zak 1aff9b620e partx: use c.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:35:55 +02:00
Karel Zak c4c0eedc4d losetup: remove unused macro
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:34:20 +02:00
Karel Zak 1728253821 cal: use c.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:32:28 +02:00