Commit Graph

35 Commits

Author SHA1 Message Date
Bjarni Ingi Gislason 1c4c602427 man pages: Change a HYPHEN-MINUS (-) to a minus (\-) for options and numbers
Change a HYPHEN-MINUS (code 0x55, 2D) to a minus (\-), if in front of

1) a name of an option

2) a negative number to be printed.

  See man-pages(7) [Debian package "manpages"].

  The output from "nroff" is unchanged.

Signed-off-by: Bjarni Ingi Gislason <bjarniig@rhi.hi.is>
2019-12-17 12:32:43 +01:00
Karel Zak b97a25162a losetup: man page has repeating words [make checkmans]
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-24 12:43:27 +02:00
Karel Zak 422f0e9f20 losetup: properly use --sector-size when create a new device
The --partscan functionality depends on sector size. Make sure
sector size is set before we force kernel to scan the device for
partitions. For example:

 losetup -f loopfile --sector-size 4KiB --partscan --show

where 'loopfile' contains GPT with 4096 sectors.

Reported-by: Jeffrey Ferreira <jeffpferreira@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-01-22 11:50:20 +01:00
Karel Zak 784e9d9e2e losetup: add reference to suffixes for --{sizelimit,offset}
Reported-by: Milan Broz <gmazyland@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-08-08 13:12:27 +02:00
Sami Kerola 289673b1c0
losetup: add --output-all option
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2018-05-03 19:56:20 +01:00
Karel Zak 76493ceba6 losetup: rename to --sector-size and LOG-SEC
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-10-02 11:59:57 +02:00
Stanislav Brabec a1a41597bf losetup: Add support for logical block size
Kernel since 4.14 supports setting of logical block size[1]. It allows to
create loop devices that report logical block size different from 512.

Add support for this feature to losetup.

References:
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/block/loop.c?id=89e4fdecb51cf5535867026274bc97de9480ade5

[kzak@redhat.com: - fix loopcxt_get_blocksize()
                  - remove lo_blocksize from loop_info64]

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Omar Sandoval <osandov@fb.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-09-27 14:30:02 +02:00
Karel Zak 60eedb0a53 losetup: add info about lazy detach to manpage
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-08-10 12:37:34 +02:00
Ruediger Meier bda267627e misc: POSIX usage dd, regarding unit suffixes
In POSIX we have only 'b' and 'k' (case-sensitive).

In the real work, OSX was the only system I've found  which does
not understand capital 'K'.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-14 11:48:22 +02:00
Frederick Grose ec3624aa75 losetup.8: Reorder options documentation
Reorder options to match onboard help and group functionally.
Include some missing optional arguments.

[kzak@redhat.com: - don't include available columns in man page,
                  - add comments to the usage()
		  - fix order in usage()
		  - fix typo in usage()]

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-04-04 12:52:06 +02:00
Sébastien Helleu d673b74e9d docs: replace FTP by HTTPS in kernel.org URLs
The links to ftp://ftp.kernel.org/ are replaced by
https://www.kernel.org/.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-19 11:22:26 +01:00
Karel Zak 9a94b634a3 losetup: add --nooverlap options
This patch introduces overlap detections and loop devices
re-use for losetup(8). We already support this feature for mount(8)
where it's enabled by default (because we mount filesystems and it's
always mistake to share the same filesystem between more loop
devices).

Stanislav has suggested to enable this feature also for losetup by
default. I'm not sure about it, IMHO it's better to keep losetup(8)
simple and stupid by default, and inform users about possible problems
and solutions in the man page.

The feature forces losetup to scan all loop devices always when new
one is requested. This maybe disadvantage (especially when we use
control-loop  to avoid /sys or /dev scans) on system with huge number
of loop devices.

Co-Author: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-08-17 12:28:33 +02:00
Mike Frysinger 5593132a90 man pages: fix spacing between man page name & section number
Most have standardized correctly, but fix a few latent ones.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2016-05-20 10:54:31 +02:00
Benno Schulenberg 289619bdb6 losetup: correct some formatting in the man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2016-03-08 14:21:55 +01:00
Karel Zak f98d9641a3 losetup: clean up --direct-io
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-11-19 11:57:05 +01:00
Karel Zak 4827093d4b losetup: add --json
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-06-05 10:30:52 +02:00
J William Piggott b06c1ca6f8 docs: restore minus symbols in long opts
Signed-off-by: J William Piggott <elseifthen@gmx.com>
2015-01-20 18:15:30 -05:00
Karel Zak 0bf037402a lib/loopdev: replace custom DBG() with include/debug.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-11-04 14:08:45 +01:00
Karel Zak f1453d528e losetup: improve man page -D docs
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-10-07 11:54:33 +02:00
Benno Schulenberg c372860ddb docs: bring eight more man pages closer to standard formatting
Also, for chcpu, the options -c, -d, -e and -g are mutually exclusive,
and for the mode argument the option -p is not optional.  For ldattach,
use the standard options separator ", " instead of the unusual " | ".
And add the missing --version to several of the pages.  Besides, improve
the wording and the consistency of the spacing.

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-07-21 10:29:44 +02:00
Karel Zak 145766440a losetup: tiny change to usage()
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-04-03 12:29:20 +02:00
Karel Zak 961d69f799 losetup, mount: remove --pass-fd at all
The option is unsupported since v2.23, let's cleanup man pages and
code to remove it at all.

Reported-by: "Dale R. Worley" <worley@alum.mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06 09:02:36 +01:00
Yuri Chornoivan 0d0d12adf8 Fix various typos 2013-09-28 13:33:59 +03:00
Karel Zak 9f56106df6 losetup: add --raw and --noheadings
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-05-13 12:00:24 +02:00
Karel Zak 16ef36f783 docs: add TB to list of supported suffixes
Reported-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-03-18 18:31:07 +01:00
Karel Zak ead259e325 docs: mark old losetup output format as DEPRECATED
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-12 13:23:19 +01:00
Ondrej Oprala 896352d390 losetup: add --list and --output option
The --list --all is the default output:

  # losetup
  NAME       SIZE OFFSET AUTOCLEAR RO BACK-FILE
  /dev/loop0    0      0         0  0 /home/fs-images/swap.img
  /dev/loop1    0    100         0  0 /home/fs-images/disk.img

[kzak@redhat.com: - default to --all if no device specified,
                  - cleanup column names (add BACK- prefix)
                  - add MAJ:MIN to of the loopdev device]

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-11-12 13:08:00 +01:00
Mike Frysinger 8323d9fd59 fix bold style of man page references
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-10-09 12:12:48 +02:00
Ludwig Nussel 5cf05c7147 mount: losetup: remove obsolete encryption support
kernel cryptoloop is deprecated since ages and support for cryptoloop
in util-linux is incomplete/broken.
- no password hashing
- last 8 bit of key are always set to zero
- no binary keys possible (stops reading key at \n and \0)

In the past some Distros added the above features with patches. So
remove cryptoloop support from util-linux completely to make sure
people won't try using it.

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-09-11 10:46:11 +02:00
Bernhard Voelker d636d6d82a docs: clarify KiB vs. KB in man pages
Update the man pages of blkid, wipefs, fallocate, fstrim, losetup
and hexdump to clarify the suffixes for the numerical values of the
offset and size/length arguments regarding KiB=1024 vs KB=1000.
Also mention the ZiB/YiB and ZB/YB suffixes supported by strtosize().

Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-03-30 15:23:32 +02:00
Petr Uzel 26c15246f2 losetup: add --detach-all to the list of options
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-02-24 14:13:47 +01:00
Karel Zak 6af8d3d722 losetup: add note about non-root users to losetup.8
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-11 15:45:36 +01:00
Karel Zak 916bf85e62 losetup: add --partscan option
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-09 23:28:50 +01:00
Karel Zak 23b85230e7 losetup: cleanup man page
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-22 12:19:38 +01:00
Karel Zak bd6d0d039c losetup: move to sys-utils directory
Now losetup(8) is independent on mount/ stuff at all.

Signed-off-by: Karel Zak <kzak@redhat.com>
2011-12-20 13:07:54 +01:00