blockdev: sync man page with code
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
9ef30d6178
commit
455fdf4af8
|
@ -3,90 +3,82 @@
|
||||||
.\" Copyright 2007 Karel Zak <kzak@redhat.com>
|
.\" Copyright 2007 Karel Zak <kzak@redhat.com>
|
||||||
.\"
|
.\"
|
||||||
.\" May be distributed under the GNU General Public License
|
.\" May be distributed under the GNU General Public License
|
||||||
.TH BLOCKDEV 8 "Jun 2007" ""
|
.TH BLOCKDEV 8 "Aug 2010" ""
|
||||||
.SH NAME
|
.SH NAME
|
||||||
blockdev \- call block device ioctls from the command line
|
blockdev \- call block device ioctls from the command line
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B blockdev
|
.B blockdev
|
||||||
.RI [ options ]
|
.RB [ \-q ]
|
||||||
.I commands devices
|
.RB [ \-v ]
|
||||||
|
.IR command
|
||||||
|
.RI [ command ...]
|
||||||
|
.IR device
|
||||||
|
.RI [ device ...]
|
||||||
.br
|
.br
|
||||||
.B blockdev
|
.B blockdev
|
||||||
.B \-\-report
|
.B \-\-report
|
||||||
.RI [ devices ]
|
.RI [ device ...]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
The utility
|
The utility
|
||||||
.B blockdev
|
.B blockdev
|
||||||
allows one to call block device ioctls from the command line.
|
allows one to call block device ioctls from the command line.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
.TP
|
.IP "\fB\-V\fP"
|
||||||
.B \-V
|
|
||||||
Print version and exit.
|
Print version and exit.
|
||||||
.TP
|
.IP "\fB\-q\fP"
|
||||||
.B \-q
|
|
||||||
Be quiet.
|
Be quiet.
|
||||||
.TP
|
.IP "\fB\-v\fP"
|
||||||
.B \-v
|
|
||||||
Be verbose.
|
Be verbose.
|
||||||
.TP
|
.IP "\fB\-\-report\fP"
|
||||||
.B \-\-report
|
Print a report for the specified device. It is possible to give multiple
|
||||||
Print a report for
|
devices. If none is given, all devices which appear in /proc/partitions are
|
||||||
.IR devices .
|
shown. Note that the partition StartSec is in 512-byte sectors.
|
||||||
Note that the partition StartSec is in 512-byte sectors.
|
|
||||||
.SH COMMANDS
|
.SH COMMANDS
|
||||||
.TP
|
It is possible to give multiple devices and multiple commands.
|
||||||
.B \--setro
|
.IP "\fB\-\-flushbufs\fP"
|
||||||
Set read-only.
|
|
||||||
.TP
|
|
||||||
.B \--setrw
|
|
||||||
Set read-write.
|
|
||||||
.TP
|
|
||||||
.B \--getro
|
|
||||||
Get read-only. Print 1 if the device is read-only, 0 otherwise.
|
|
||||||
.TP
|
|
||||||
.B \--getss
|
|
||||||
Print sectorsize in bytes - usually 512.
|
|
||||||
.TP
|
|
||||||
.B \--getbsz
|
|
||||||
Print blocksize in bytes.
|
|
||||||
.TP
|
|
||||||
.BI \--setbsz " N"
|
|
||||||
Set blocksize to
|
|
||||||
.I N
|
|
||||||
bytes.
|
|
||||||
.TP
|
|
||||||
.B \--getsize
|
|
||||||
Print device size in sectors (BLKGETSIZE). Deprecated in favor of the
|
|
||||||
.B \--getsz
|
|
||||||
option.
|
|
||||||
.TP
|
|
||||||
.B \--getsize64
|
|
||||||
Print device size in bytes (BLKGETSIZE64)
|
|
||||||
.TP
|
|
||||||
.B \--getsz
|
|
||||||
Get size in 512-byte sectors (BLKGETSIZE64 / 512).
|
|
||||||
.TP
|
|
||||||
.BI \--setra " N"
|
|
||||||
Set readahead to
|
|
||||||
.I N
|
|
||||||
512-byte sectors.
|
|
||||||
.TP
|
|
||||||
.B \--getra
|
|
||||||
Print readahead (in 512-byte sectors).
|
|
||||||
.TP
|
|
||||||
.BI \--setfra " N"
|
|
||||||
Set filesystem readahead (same like --setra on 2.6 kernels).
|
|
||||||
.TP
|
|
||||||
.B \--getfra
|
|
||||||
Get filesystem readahead.
|
|
||||||
.TP
|
|
||||||
.B \--flushbufs
|
|
||||||
Flush buffers.
|
Flush buffers.
|
||||||
.TP
|
.IP "\fB\-\-getalignoff\fP"
|
||||||
.B \--rereadpt
|
Get alignment offset.
|
||||||
Reread partition table.
|
.IP "\fB\-\-getbsz\fP"
|
||||||
|
Print blocksize in bytes.
|
||||||
|
.IP "\fB\-\-getdiscardzeroes\fP"
|
||||||
|
Get discard zeroes support status.
|
||||||
|
.IP "\fB\-\-getfra\fP"
|
||||||
|
Get filesystem readahead in 512-byte sectors.
|
||||||
|
.IP "\fB\-\-getiomin\fP"
|
||||||
|
Get minimum I/O size.
|
||||||
|
.IP "\fB\-\-getioopt\fP"
|
||||||
|
Get optimal I/O size.
|
||||||
|
.IP "\fB\-\-getmaxsect\fP"
|
||||||
|
Get max sectors per request
|
||||||
|
.IP "\fB\-\-getpbsz\fP"
|
||||||
|
Get physical block (sector) size.
|
||||||
|
.IP "\fB\-\-getra\fP"
|
||||||
|
Print readahead (in 512-byte sectors).
|
||||||
|
.IP "\fB\-\-getro\fP"
|
||||||
|
Get read-only. Print 1 if the device is read-only, 0 otherwise.
|
||||||
|
.IP "\fB\-\-getsize64\fP"
|
||||||
|
Print device size in bytes.
|
||||||
|
.IP "\fB\-\-getsize\fP"
|
||||||
|
Print device size (32-bit!) in sectors. Deprecated in favor of the --getsz option.
|
||||||
|
.IP "\fB\-\-getss\fP"
|
||||||
|
Print sectorsize in bytes - usually 512.
|
||||||
|
.IP "\fB\-\-getsz\fP"
|
||||||
|
Get size in 512-byte sectors.
|
||||||
|
.IP "\fB\-\-rereadpt\fP"
|
||||||
|
Seread partition table
|
||||||
|
.IP "\fB\-\-setbsz\fP \fIbytes\fP"
|
||||||
|
Set blocksize.
|
||||||
|
.IP "\fB\-\-setfra\fP \fIsectors\fP"
|
||||||
|
Set filesystem readahead (same like --setra on 2.6 kernels).
|
||||||
|
.IP "\fB\-\-setra\fP \fIsectors\fP"
|
||||||
|
Set readahead (in 512-byte sectors).
|
||||||
|
.IP "\fB\-\-setro\fP"
|
||||||
|
Set read-only.
|
||||||
|
.IP "\fB\-\-setrw\fP"
|
||||||
|
Set read-write.
|
||||||
.SH AUTHOR
|
.SH AUTHOR
|
||||||
blockdev was written by Andries E. Brouwer.
|
blockdev was written by Andries E. Brouwer and rewrittent by Karel Zak.
|
||||||
.SH AVAILABILITY
|
.SH AVAILABILITY
|
||||||
The blockdev command is part of the util-linux-ng package and is available from
|
The blockdev command is part of the util-linux-ng package and is available from
|
||||||
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
|
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
|
||||||
|
|
|
@ -109,7 +109,7 @@ struct bdc bdcms[] =
|
||||||
.name = "--getalignoff",
|
.name = "--getalignoff",
|
||||||
.argtype = ARG_INT,
|
.argtype = ARG_INT,
|
||||||
.argval = -1,
|
.argval = -1,
|
||||||
.help = N_("get alignment offset")
|
.help = N_("get alignment offset in bytes")
|
||||||
},{
|
},{
|
||||||
IOCTL_ENTRY(BLKSECTGET),
|
IOCTL_ENTRY(BLKSECTGET),
|
||||||
.name = "--getmaxsect",
|
.name = "--getmaxsect",
|
||||||
|
@ -125,7 +125,7 @@ struct bdc bdcms[] =
|
||||||
},{
|
},{
|
||||||
IOCTL_ENTRY(BLKBSZSET),
|
IOCTL_ENTRY(BLKBSZSET),
|
||||||
.name = "--setbsz",
|
.name = "--setbsz",
|
||||||
.argname = "BLOCKSIZE",
|
.argname = "<bytes>",
|
||||||
.argtype = ARG_INT,
|
.argtype = ARG_INT,
|
||||||
.flags = FL_NORESULT,
|
.flags = FL_NORESULT,
|
||||||
.help = N_("set blocksize")
|
.help = N_("set blocksize")
|
||||||
|
@ -134,7 +134,7 @@ struct bdc bdcms[] =
|
||||||
.name = "--getsize",
|
.name = "--getsize",
|
||||||
.argtype = ARG_ULONG,
|
.argtype = ARG_ULONG,
|
||||||
.argval = -1,
|
.argval = -1,
|
||||||
.help = N_("get 32-bit sector count")
|
.help = N_("get 32-bit sector count (deprecated, use --getsz)")
|
||||||
},{
|
},{
|
||||||
IOCTL_ENTRY(BLKGETSIZE64),
|
IOCTL_ENTRY(BLKGETSIZE64),
|
||||||
.name = "--getsize64",
|
.name = "--getsize64",
|
||||||
|
@ -144,7 +144,7 @@ struct bdc bdcms[] =
|
||||||
},{
|
},{
|
||||||
IOCTL_ENTRY(BLKRASET),
|
IOCTL_ENTRY(BLKRASET),
|
||||||
.name = "--setra",
|
.name = "--setra",
|
||||||
.argname = "READAHEAD",
|
.argname = "<sectors>",
|
||||||
.argtype = ARG_INT,
|
.argtype = ARG_INT,
|
||||||
.flags = FL_NOPTR | FL_NORESULT,
|
.flags = FL_NOPTR | FL_NORESULT,
|
||||||
.help = N_("set readahead")
|
.help = N_("set readahead")
|
||||||
|
@ -157,7 +157,7 @@ struct bdc bdcms[] =
|
||||||
},{
|
},{
|
||||||
IOCTL_ENTRY(BLKFRASET),
|
IOCTL_ENTRY(BLKFRASET),
|
||||||
.name = "--setfra",
|
.name = "--setfra",
|
||||||
.argname = "FSREADAHEAD",
|
.argname = "<sectors>",
|
||||||
.argtype = ARG_INT,
|
.argtype = ARG_INT,
|
||||||
.flags = FL_NOPTR | FL_NORESULT,
|
.flags = FL_NOPTR | FL_NORESULT,
|
||||||
.help = N_("set filesystem readahead")
|
.help = N_("set filesystem readahead")
|
||||||
|
|
Loading…
Reference in New Issue