Re: `losetup --remove` is confusing, and misuse silently fails
Benno Schulenberg <[email protected]> Fri, 7 Nov 2025 12:21:40 +0100
| Newsgroups | org.kernel.vger.util-linux |
|---|---|
| Message-ID | <[email protected]> |
Op 07-11-2025 om 11:16 schreef Karel Zak:
> On Mon, Nov 03, 2025 at 03:42:50PM +0100, Benno Schulenberg wrote:
>> For translatability, the above should be like:
>>
>> fprintf(stderr, _("%s: options %s and %s cannot be combined"), ...);
>
> Yes, I know. The problem is that we need an extra buffer in the case
> of the short-only option. I have updated the pull request to make it
> more elegant. Now it uses:
>
> errx(OPTUTILS_EXIT_CODE,
> _("options %s%s and %s%s cannot be combined"),
> ....
That wil work. Thanks!
In the commit message it says for NEW:
$ losetup --remove --detach loop0
losetup: options --detach and --remove cannot be combined.
But the actual error message is:
losetup: options --remove and --detach cannot be combined
(the options in the order as on the command line and without a period).
Benno
OpenPGP_signature.asc
(application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE----- wsF5BAABCAAjFiEEFo5vQpe/16ea/USWUUu+Lrjhlh8FAmkN1kQFAwAAAAAACgkQUUu+Lrjhlh8l jw/+NkLj13WWqj/UYQqindrGclxNfQjAOX5pkrDwoDNJYmfJ92iWh7vgji9BmL+OBD3MrXwAGG9x ZnYUpGOoSHVdLcoc2gQj6HiJbg/70xFO7yOBuS8e2C3Aaq9uWL3Ew/lFD69raXpD2dGOCJzJwThD FF4Eb2LCOaUX08ja9K9LpIwiYj4ZImeazt9K1un3PWDquCuQ7NMQRrRuX3L+QvSYOY7YIsS7EG7V vtodepYRGT63jxVelByO9/L61KeASgw6dagx1KbNOKxTAuvxfNEHS2+E4EyvDqF5lQsBM6XYT5yU OBMdEbN8YDgiX74wnr25Zeu+jwa/Lh3e73Grl1D36nbV2bbc4nDmHfSWhfL9V/TBPkVHADgbSAMH 9KbyfoVUzIVp6DAQSETXQ4oD2JyOnt4/aSGUokpahRn0UK7vzt5998hUR5ExDhH8RytptwngoThV +zwGnlScFD0lZIYsylqofA45meL4BsnnU840+uoxANb0kSx1ywJF00s1YWo0FbNG8YGAMGpLyUvv YamjAS5Qk+T8n+MW5H1MAhTPFzOvpLdIPmI2vRm5IeR0naA3KeXgftm6+ukJlyhDEh7pVLtGo47m HvcLy1Wz5emNSneLXrRlejhfSPpKa+BiFiI28JIqs+cwjbutBqwmGZtPmuMiF1F4L3tvRcKIywSw K4w= =CmWt -----END PGP SIGNATURE-----