textual: harmonize some loop-device error messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
This commit is contained in:
parent
cd3ef11ffd
commit
136b23efde
|
@ -603,12 +603,12 @@ int main(int argc, char **argv)
|
||||||
if (act != A_CREATE &&
|
if (act != A_CREATE &&
|
||||||
(sizelimit || lo_flags || showdev))
|
(sizelimit || lo_flags || showdev))
|
||||||
errx(EXIT_FAILURE,
|
errx(EXIT_FAILURE,
|
||||||
_("the options %s are allowed to loop device setup only"),
|
_("the options %s are allowed during loop device setup only"),
|
||||||
"--{sizelimit,read-only,show}");
|
"--{sizelimit,read-only,show}");
|
||||||
|
|
||||||
if ((flags & LOOPDEV_FL_OFFSET) &&
|
if ((flags & LOOPDEV_FL_OFFSET) &&
|
||||||
act != A_CREATE && (act != A_SHOW || !file))
|
act != A_CREATE && (act != A_SHOW || !file))
|
||||||
errx(EXIT_FAILURE, _("the option --offset is not allowed in this context."));
|
errx(EXIT_FAILURE, _("the option --offset is not allowed in this context"));
|
||||||
|
|
||||||
if (outarg && string_add_to_idarray(outarg, columns, ARRAY_SIZE(columns),
|
if (outarg && string_add_to_idarray(outarg, columns, ARRAY_SIZE(columns),
|
||||||
&ncolumns, column_name_to_id) < 0)
|
&ncolumns, column_name_to_id) < 0)
|
||||||
|
@ -624,7 +624,7 @@ int main(int argc, char **argv)
|
||||||
* loopcxt struct.
|
* loopcxt struct.
|
||||||
*/
|
*/
|
||||||
if (!hasdev && (res = loopcxt_find_unused(&lc))) {
|
if (!hasdev && (res = loopcxt_find_unused(&lc))) {
|
||||||
warnx(_("not found unused device"));
|
warnx(_("cannot find an unused loop device"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (flags & LOOPDEV_FL_OFFSET)
|
if (flags & LOOPDEV_FL_OFFSET)
|
||||||
|
@ -642,7 +642,7 @@ int main(int argc, char **argv)
|
||||||
if (res == 0)
|
if (res == 0)
|
||||||
break; /* success */
|
break; /* success */
|
||||||
if (errno != EBUSY) {
|
if (errno != EBUSY) {
|
||||||
warn(_("%s: failed to setup loop device"),
|
warn(_("%s: failed to set up loop device"),
|
||||||
hasdev && loopcxt_get_fd(&lc) < 0 ?
|
hasdev && loopcxt_get_fd(&lc) < 0 ?
|
||||||
loopcxt_get_device(&lc) : file);
|
loopcxt_get_device(&lc) : file);
|
||||||
break;
|
break;
|
||||||
|
@ -671,7 +671,7 @@ int main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
case A_FIND_FREE:
|
case A_FIND_FREE:
|
||||||
if (loopcxt_find_unused(&lc))
|
if (loopcxt_find_unused(&lc))
|
||||||
warn(_("find unused loop device failed"));
|
warn(_("cannot find an unused loop device"));
|
||||||
else
|
else
|
||||||
printf("%s\n", loopcxt_get_device(&lc));
|
printf("%s\n", loopcxt_get_device(&lc));
|
||||||
break;
|
break;
|
||||||
|
@ -687,7 +687,7 @@ int main(int argc, char **argv)
|
||||||
else
|
else
|
||||||
res = printf_loopdev(&lc);
|
res = printf_loopdev(&lc);
|
||||||
if (res)
|
if (res)
|
||||||
warn(_("%s"), loopcxt_get_device(&lc));
|
warn("%s", loopcxt_get_device(&lc));
|
||||||
break;
|
break;
|
||||||
case A_SET_CAPACITY:
|
case A_SET_CAPACITY:
|
||||||
res = loopcxt_set_capacity(&lc);
|
res = loopcxt_set_capacity(&lc);
|
||||||
|
|
Loading…
Reference in New Issue