summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Zak2009-01-29 17:56:09 +0100
committerKarel Zak2009-02-11 23:35:25 +0100
commit02a8a21a26fa8fbbf54b1264dada1dcd4735c87c (patch)
tree7aaad5a60e74c5270071fc5f13bd8a493f9b4226
parentblkid: support via raid version 2 (diff)
downloadkernel-qcow2-util-linux-02a8a21a26fa8fbbf54b1264dada1dcd4735c87c.tar.gz
kernel-qcow2-util-linux-02a8a21a26fa8fbbf54b1264dada1dcd4735c87c.tar.xz
kernel-qcow2-util-linux-02a8a21a26fa8fbbf54b1264dada1dcd4735c87c.zip
blkid: add new options to blkid.8 and help output
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r--libs/blkid/bin/blkid.c9
-rw-r--r--libs/blkid/blkid.8.in104
2 files changed, 67 insertions, 46 deletions
diff --git a/libs/blkid/bin/blkid.c b/libs/blkid/bin/blkid.c
index f7b43a496..87ee4a9fb 100644
--- a/libs/blkid/bin/blkid.c
+++ b/libs/blkid/bin/blkid.c
@@ -56,20 +56,23 @@ static void usage(int error)
"Usage:\n"
" %1$s [-c <file>] [-ghlLv] [-o format] [-s <tag>] \n"
" [-t <token>] [-w <file>] [dev ...]\n\n"
- " %1$s -p [-O <offset>] [-S <size>] <dev> [dev ...]\n\n"
+ " %1$s -p [-O <offset>] [-S <size>] [-o format] <dev> [dev ...]\n\n"
"Options:\n"
" -c <file> cache file (default: /etc/blkid.tab, /dev/null = none)\n"
" -h print this usage message and exit\n"
" -g garbage collect the blkid cache\n"
" -o <format> output format; can be one of:\n"
" value, device, list, udev or full; (default: full)\n"
- " -p switch to low-probe mode (bypass cache)\n"
" -s <tag> show specified tag(s) (default show all tags)\n"
" -t <token> find device with a specific token (NAME=value pair)\n"
" -l lookup the the first device with arguments specified by -t\n"
" -v print version and exit\n"
" -w <file> write cache to different file (/dev/null = no write)\n"
- " <dev> specify device(s) to probe (default: all devices)\n\n",
+ " <dev> specify device(s) to probe (default: all devices)\n\n"
+ "Low-level probing options:\n"
+ " -p switch to low-level mode (bypass cache)\n"
+ " -S <bytes> overwrite device size\n"
+ " -O <bytes> probe at the given offset\n\n"
progname);
exit(error);
diff --git a/libs/blkid/blkid.8.in b/libs/blkid/blkid.8.in
index 9c42686e9..e7eaf51e4 100644
--- a/libs/blkid/blkid.8.in
+++ b/libs/blkid/blkid.8.in
@@ -10,32 +10,33 @@
blkid \- command\-line utility to locate/print block device attributes
.SH SYNOPSIS
.B blkid
-[
-.B \-ghlLv
-]
-[
-[
-.B \-c
-.I cachefile
-]
-.B \-w
-.I writecachefile
-]
-[
-.B \-o
-.I format
-]
-[
-.B \-s
-.I tag
-]
-[
-.B \-t
-.IR NAME = value
-]
-[
-.I device ...
-]
+.RB [ \-ghlLv ]
+.RB [ \-c
+.IR file ]
+.RB [ \-w
+.IR file ]
+.RB [ \-o
+.IR format ]
+.in +6
+.RB [ \-s
+.IR tag ]
+.RB [ \-t
+.IR NAME=value ]
+.I device
+[\fIdevice\fR ...]
+.in -6
+
+.B blkid
+.RB -p
+.RB [ \-O
+.IR offset ]
+.RB [ \-S
+.IR size ]
+.RB [ \-o
+.IR format ]
+.I device
+[\fIdevice\fR ...]
+
.SH DESCRIPTION
The
.B blkid
@@ -79,25 +80,39 @@ block devices. If this option is not specified,
.B blkid
will print all of the devices that match the search parameter.
.TP
+.B \-L
+Print the devices in a user-friendly list format. This is the
+equivalent of using the option \fB-o list\fR.
+.TP
.BI \-o " format"
Display
.BR blkid 's
output using the specified format. The
.I format
-parameter may be
-.I full
-(the default),
-.I value
-(only print the value of the tags),
-.I list
-(print the devices in a user-friendly format),
-or
-.I device
-(only print the device name).
+parameter may be:
+.RS
.TP
-.B \-L
-Print the devices in a user-friendly list format. This is the
-equivalent of using the option \fB-o list\fR.
+.B full
+print all tags (the default)
+.TP
+.B value
+print the value of the tags
+.TP
+.B list
+print the devices in a user-friendly format
+.TP
+.B device
+print the device name only
+.TP
+.B udev
+vol_id compatible mode; usable in udev rules
+.RE
+.TP
+.BI \-O " bytes"
+Probe at the given offset (only useful with \fB-p\fR).
+.TP
+.BI \-p
+Switch to low-level probing mode (bypass cache)"
.TP
.BI \-s " tag"
For each (specified) device, show only the tags that match
@@ -110,6 +125,9 @@ In order to just refresh the cache without showing any tokens, use
.B "-s none"
with no other options.
.TP
+.BI \-S " bytes"
+Ooverwrite device/file size (only useful with \fB-p\fR).
+.TP
.BI \-t " NAME" = "value"
Search for block devices with tokens named
.I NAME
@@ -155,10 +173,10 @@ devices, 0 is returned. If the specified token was not found, or no
For usage or other errors, an exit code of 4 is returned.
.SH AUTHOR
.B blkid
-was written by Andreas Dilger for libblkid.
+was written by Andreas Dilger for libblkid and improved by Theodore Ts'o
+and Karel Zak.
.SH AVAILABILITY
-.B blkid
-is part the e2fsprogs package since version 1.26 and is available from
-http://e2fsprogs.sourceforge.net.
+The blkid command is part of the util-linux-ng package and is available from
+ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
.SH "SEE ALSO"
.BR libblkid (3)