Commit Graph

173 Commits

Author SHA1 Message Date
Karel Zak aaf8fffb35 blkid: fix blkid_probe_lookup_value() usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-19 10:15:11 +01:00
Karel Zak dcc58f62c4 blkid: encode PART_ENTRY_TYPE
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-18 23:04:22 +01:00
Karel Zak 4f74ffdbfe blkid: export ID_PART_ENTRY_* variables for udev
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-18 16:46:56 +01:00
Karel Zak 4fc5d65bf2 blkid: report open() errors in low-level probing
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-16 09:43:26 +01:00
Karel Zak 06b1e27aaf blkid: fix #ifdef HAVE_TERMIO[S]_H
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-12 10:32:34 +01:00
Karel Zak aebb9522b7 cal: fix first day of the week calculation on BE systems
This reverts commit dcb54fafb1,
"cal: remove gcc-ism from nl_langinfo() call".

The code:

	int wfd = (int)(intptr_t) nl_langinfo(_NL_TIME_WEEK_1STDAY);

does not work on big-endian machines. The original solution based on
union is better.

Note that the "type punning" is not gcc-ism any more, it's allowed
by C99 (6.5.2.3).

Reported-by: Joseph Jezak <josejx@gentoo.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-11 16:29:05 +01:00
Karel Zak 269c1a2a64 wipefs: ignore devices with partition table
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-02-04 21:18:34 +01:00
Karel Zak f00aae6d7b blkid: add newline when only one value is printed
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-01-27 18:16:06 +01:00
Vladimir Brednikov ed5de10ed7 namei: fix man page formatting 2010-01-22 10:32:30 +01:00
Karel Zak e3d8933aaa blkid: probe for PT, don't probe for FS on small whole-disks
* blkid(8) in low-level mode probes for PT now (blkid is replacement
   for devkit-disks-part-id)

 * add ID_PART_TABLE_TYPE=<name> to blkid(8) udev output

 * don't probe for FS/RAIDs on small devices when PT is detected

Signed-off-by: Karel Zak <kzak@redhat.com>
2010-01-21 00:16:19 +01:00
Karel Zak 04c944419d po: fix msgid bugs
Reported-by: Petr Pisar <petr.pisar@atlas.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-12-10 13:04:41 +01:00
Karel Zak c54670d564 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>
2009-11-11 17:21:36 +01:00
Karel Zak bf12cd21d1 build-sys: cleanup AM_CFLAGS usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-11-09 16:45:50 +01:00
Karel Zak 959ac815b6 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>
2009-11-06 03:28:00 +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 870768adb5 wipefs: remove obsolete comment
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-30 13:48:10 +01: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 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 1728253821 cal: use c.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:32:28 +02:00
Karel Zak bf969be77d kill: use c.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-16 01:28:41 +02:00
Karel Zak 2d71a92941 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>
2009-10-14 02:51:30 +02:00
Karel Zak c21e7023ca namei: better mount points detection
Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-09 16:43:35 +02:00
Guillem Jover 76fb73ef98 cal: remove obsolete <localeinfo.h> include
The fact that the system does not have <langinfo.h> does not imply that
it has <localeinfo.h> (which is an ancient header from Linux libc4).

Signed-off-by: Guillem Jover <guillem@hadrons.org>
2009-10-09 15:17:53 +02:00
Karel Zak a439d194fb namei: gater information about / (root)
$ ll -d /foo
	drwxr-xr-x 2 kzak kzak 4096 2009-10-07 01:23 /foo

old version:

	$ namei -l /foo
	f: /foo
	Segmentation fault

new version:

	$ namei -l /foo
	f: /foo
	drwxr-xr-x root root /
	drwxr-xr-x kzak kzak foo

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-07 01:37:57 +02:00
Karel Zak d1dca71078 namei: fix alone symlink evaluation
$ mkdir aaa
	$ ln -s aaa mylink

old version:

	$ namei mylink
	namei: could not stat 'mylink/aaa': No such file or directory

new version:

        $ namei mylink
	f: mylink
	 l mylink -> aaa
	   d aaa

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-07 01:34:36 +02:00
Karel Zak f54a736f2f wipefs: fix coding style
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-07 00:04:08 +02:00
Karel Zak c49057d261 wipefs: new command
# ./wipefs /dev/sda4
 offset               type
 ----------------------------------------------------------------
 0xff6                swap   [other]
                      UUID:  da6c54ea-77d9-470a-82f1-e793fd5d9131

 0x36                 vfat   [filesystem]
                      UUID:  497F-3013

 # ./wipefs --offset 0x36 /dev/sda4
 8 bytes [46 41 54 31 32 20 20 20] erased at offset 0x36 (vfat)

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-06 23:56:23 +02:00
Karel Zak 7a2fd52032 findfs: fix typo in findfs.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-10-05 15:23:57 +02:00
Karel Zak 7711e2150b blkid: allow to use -s <TAG> for low-level probing (-p mode)
# blkid -p -s TYPE /dev/sda3
 /dev/sda3: TYPE="swap"

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-24 14:44:47 +02:00
Karel Zak 1b780848b0 libblkid: use the new API in whole u-l-ng
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-09-16 10:57:24 +02:00
Peter Breitenlohner 19046308b6 write.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:09 +02:00
Peter Breitenlohner fd5ccc6969 whereis.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:08 +02:00
Peter Breitenlohner e173df7113 uuidgen.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:08 +02:00
Peter Breitenlohner aefd84226e uuidd.8: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:08 +02:00
Peter Breitenlohner 9c933aa39e setterm.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:08 +02:00
Peter Breitenlohner fc6b5e0daa scriptreplay.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:08 +02:00
Peter Breitenlohner 74bb20ebb7 reset.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:08 +02:00
Peter Breitenlohner f736d38534 rename.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:08 +02:00
Peter Breitenlohner 3eca4291b9 namei.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:07 +02:00
Peter Breitenlohner 894aa2f20c mcookie.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:07 +02:00
Peter Breitenlohner b0315e1fab kill.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:07 +02:00
Peter Breitenlohner 1fb6af9149 ddate.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:07 +02:00
Peter Breitenlohner eb3395852b cal.1: formatting
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
2009-08-17 12:11:07 +02:00
Daniel Mierswa c0f19ccff7 replace bcopy,bzero,index and rindex
Those 4 functions are marked as LEGACY in POSIX.1-2001 and removed in
POSIX.1-2008.

Replaced with memmove,memset,strchr and strrchr.

Signed-off-by: Daniel Mierswa <impulze@impulze.org>
2009-08-17 11:15:59 +02:00
Peter Breitenlohner f06602a42a cal: fix broken computation for Sep 1752
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Pádraig Brady <P@draigBrady.com>
2009-07-20 15:33:50 +02:00
Peter Breitenlohner 32dec5ac25 cal: fix (harmless) typo
Signed-off-by: Peter Breitenlohner <peb@mppmu.mpg.de>
Signed-off-by: Pádraig Brady <P@draigBrady.com>
2009-07-20 15:33:44 +02:00
Karel Zak 91b72e09a4 scriptreplay: fix typo in error message
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-07-20 10:31:27 +02:00
Karel Zak 30688dde55 build-sys: rename to _execdir
The variable name "usrlibexecdir" is very confusing (because we have
/usr/libexec). The "exec" prefix is required for user-defined
directories, see

   http://www.gnu.org/software/hello/manual/automake/The-Two-Parts-of-Install.html#The-Two-Parts-of-Install

This patch renames all usr*execdir variables to usr*_execdir.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-07-04 01:23:41 +02:00
Karel Zak 5663298c2c blkid: move to misc-utils/ directory
The others utilities are in one of the top-level directories. That's
confusing to have blkid(8) and findfs(8) in shlibs/ tree.

Signed-off-by: Karel Zak <kzak@redhat.com>
2009-07-02 14:38:23 +02:00