diff options
| author | Karel Zak <kzak@redhat.com> | 2025-11-07 12:19:16 +0100 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2025-11-07 12:19:16 +0100 |
| commit | 326b656b602738fc2b6c0d009d2f67d6d835ffae (patch) | |
| tree | 61a79051a1966f904155a2b7b24b3b48df567398 | |
| parent | 8e28ec958daf6c2c127d2b776bb453eb5cea269a (diff) | |
| parent | 3cd29d861d69b70ca5390596425d4906adbf0082 (diff) | |
| download | util-linux-326b656b602738fc2b6c0d009d2f67d6d835ffae.tar.gz | |
Merge branch 'PR/benno-losetup' of https://github.com/karelzak/util-linux-work
* 'PR/benno-losetup' of https://github.com/karelzak/util-linux-work:
losetup: (man) put the synopses in a better order, the name-giver first
losetup: remove the --verbose flag, as it doesn't actually do anything
losetup: sort 'O' correctly for the mutual-exclusive check to work
| -rw-r--r-- | sys-utils/losetup.8.adoc | 29 | ||||
| -rw-r--r-- | sys-utils/losetup.c | 6 |
2 files changed, 12 insertions, 23 deletions
diff --git a/sys-utils/losetup.8.adoc b/sys-utils/losetup.8.adoc index f51710af87..cecc09618d 100644 --- a/sys-utils/losetup.8.adoc +++ b/sys-utils/losetup.8.adoc @@ -12,31 +12,27 @@ losetup - set up and control loop devices == SYNOPSIS -Get info: - -*losetup* [_loopdev_] +Set up a loop device: -*losetup* *-l* [*-a*] +*losetup* [options] *-f*|_loopdev file_ -*losetup* *-j* _file_ [*-o* _offset_] +Get info: -Detach a loop device: +*losetup* [*-l*] [*-a*|_loopdev_] -*losetup* *-d* _loopdev_ ... +*losetup* *-j* _file_ [*-o* _offset_] -Detach all associated loop devices: +Recalibrate the size of a loop device: -*losetup* *-D* - -Set up a loop device: +*losetup* *-c* _loopdev_ -*losetup* [*-o* _offset_] [*--sizelimit* _size_] [*--sector-size* _size_] [*--loop-ref* _name_] [*-Pr*] [*--show*] *-f*|_loopdev file_ +Detach loop devices: -Resize a loop device: +*losetup* *-d* _loopdev_ ... -*losetup* *-c* _loopdev_ +*losetup* *-D* -Remove a loop device: +Prevent loop devices from getting listed: *losetup* *--remove* _loopdev_ ... @@ -106,9 +102,6 @@ Set up a read-only loop device. *--direct-io*[**=on**|*off*]:: Enable or disable direct I/O for the backing file. The default is *off*. Specifying either *--direct-io* or *--direct-io=on* will enable it. But, *--direct-io=off* can be provided to explicitly turn it off. -*-v*, *--verbose*:: -Verbose mode. - *-l*, *--list*:: If a loop device or the *-a* option is specified, print the default columns for either the specified loop device or all loop devices; the default is to print info about all devices. See also *--output*, *--noheadings*, *--raw*, and *--json*. diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c index c2eec5600b..7da0ebbd00 100644 --- a/sys-utils/losetup.c +++ b/sys-utils/losetup.c @@ -501,7 +501,6 @@ static void __attribute__((__noreturn__)) usage(void) fputs(_(" --direct-io[=<on|off>] open backing file with O_DIRECT\n"), out); fputs(_(" --loop-ref <string> loop device reference\n"), out); fputs(_(" --show print device name after setup (with -f)\n"), out); - fputs(_(" -v, --verbose verbose mode\n"), out); /* output options */ fputs(USAGE_SEPARATOR, out); @@ -730,7 +729,6 @@ int main(int argc, char **argv) { "raw", no_argument, NULL, OPT_RAW }, { "loop-ref", required_argument, NULL, OPT_REF, }, { "show", no_argument, NULL, OPT_SHOW }, - { "verbose", no_argument, NULL, 'v' }, { "version", no_argument, NULL, 'V' }, { "remove", no_argument, NULL, OPT_REMOVE }, { NULL, 0, NULL, 0 } @@ -739,7 +737,7 @@ int main(int argc, char **argv) static const ul_excl_t excl[] = { /* rows and cols in ASCII order */ { 'D','a','c','d','f','j',OPT_REMOVE }, { 'D','c','d','f','l',OPT_REMOVE }, - { 'D','c','d','f','O',OPT_REMOVE }, + { 'D','O','c','d','f',OPT_REMOVE }, { 'J',OPT_RAW }, { 0 } }; @@ -829,8 +827,6 @@ int main(int argc, char **argv) if (use_dio) lo_flags |= LO_FLAGS_DIRECT_IO; break; - case 'v': - break; case OPT_SIZELIMIT: /* --sizelimit */ sizelimit = strtosize_or_err(optarg, _("failed to parse size")); flags |= LOOPDEV_FL_SIZELIMIT; |
