Re: `losetup --remove` is confusing, and misuse silently fails
Karel Zak <[email protected]> Mon, 3 Nov 2025 13:49:03 +0100
| Newsgroups | org.kernel.vger.util-linux |
|---|---|
| Message-ID | <dexp4ooy65b2la7ujbpnp5itphzzriwg57uz2cvkt4grn3b7bv@7nzd6wye2vjt> |
On Tue, Oct 21, 2025 at 03:49:01PM +0200, Benno Schulenberg wrote:
> > # ./losetup --remove --detach loop0
> > losetup: mutually exclusive arguments: --detach-all --all --set-capacity --detach --find --associated --remove
>
> Nnn... My next report was going to be about this. :)
:-)
> About too verbose
> and therefore confusing feedback. The user did not specify --detach-all,
> nor --all, nor --set-capacity, nor --find, nor --associated. Thus it is
> confusing to see them mentioned in the error message.
>
> It would be much nicer if the routine that checks for conflicting options
> would just print the first two incompatible ones of the options that were
> actually given. For example:
>
> # ./losetup --remove --find --all
> losetup: options --remove and --find cannot be combined
Implemented:
https://github.com/util-linux/util-linux/pull/3835
Karel
--
Karel Zak <[email protected]>
http://karelzak.blogspot.com