errno = 0;
sc = fdisk_new_script_from_file(cf->cxt, buf);
if (!sc && errno)
- ui_warn(_("Cannot open: %s"), buf);
+ ui_warn(_("Cannot open %s"), buf);
else if (!sc)
ui_warnx(_("Failed to parse script file %s"), buf);
else if (fdisk_apply_script(cf->cxt, sc) != 0)
DBG(UI, ul_debug("writing dump into: '%s'", buf));
f = fopen(buf, "w");
if (!f) {
- ui_warn(_("Cannot open: %s"), buf);
+ ui_warn(_("Cannot open %s"), buf);
rc = -errno;
goto done;
}
itr = fdisk_new_iter(FDISK_ITER_FORWARD);
if (!itr) {
- fdisk_warn(cxt, _("faild to allocate iterator"));
+ fdisk_warn(cxt, _("failed to allocate iterator"));
goto done;
}
out = scols_new_table();
if (!out) {
- fdisk_warn(cxt, _("faild to allocate output table"));
+ fdisk_warn(cxt, _("failed to allocate output table"));
goto done;
}
struct libscols_line *ln = scols_table_new_line(out, NULL);
if (!ln) {
- fdisk_warn(cxt, _("faild to allocate output line"));
+ fdisk_warn(cxt, _("failed to allocate output line"));
goto done;
}
errno = 0;
sc = fdisk_new_script_from_file(cxt, filename);
if (!sc && errno)
- fdisk_warn(cxt, _("Cannot open: %s"), filename);
+ fdisk_warn(cxt, _("Cannot open %s"), filename);
else if (!sc)
fdisk_warnx(cxt, _("Failed to parse script file %s"), filename);
else if (fdisk_apply_script(cxt, sc) != 0)
rc = fdisk_script_read_context(sc, NULL);
if (rc) {
- fdisk_warnx(cxt, _("Failed to read disk layout into script."));
+ fdisk_warnx(cxt, _("Failed to transform disk layout into script"));
goto done;
}
f = fopen(filename, "w");
if (!f) {
- fdisk_warn(cxt, _("Cannot open: %s"), filename);
+ fdisk_warn(cxt, _("Cannot open %s"), filename);
goto done;
}
int rc = 0;
if (sf->noact)
- fdisk_info(sf->cxt, _("The partition table unchanged (--no-act)."));
+ fdisk_info(sf->cxt, _("The partition table is unchanged (--no-act)."));
else {
rc = fdisk_write_disklabel(sf->cxt);
if (!rc) {
fdisk_enable_listonly(sf->cxt, 1);
if (fdisk_assign_device(sf->cxt, devname, 1)) {
- warn(_("cannot open: %s"), devname);
+ warn(_("cannot open %s"), devname);
return 1;
}
fd = open(dev, O_RDONLY);
if (fd < 0) {
if (!silent)
- warn(_("cannot open: %s"), dev);
+ warn(_("cannot open %s"), dev);
return -errno;
}
fdisk_enable_listonly(sf->cxt, 1);
if (fdisk_assign_device(sf->cxt, devname, 1)) {
- warn(_("cannot open: %s"), devname);
+ warn(_("cannot open %s"), devname);
return 1;
}
n = fdisk_get_npartitions(sf->cxt);
if (partno > n)
- errx(EXIT_FAILURE, _("%s: partition %zu: partition table contains %zu "
- "partitions only."), devname, partno, n);
+ errx(EXIT_FAILURE, _("%s: partition %zu: partition table contains "
+ "only %zu partitions"), devname, partno, n);
if (!fdisk_is_partition_used(sf->cxt, partno - 1))
- errx(EXIT_FAILURE, _("%s: partition %zu: partition unnused"),
+ errx(EXIT_FAILURE, _("%s: partition %zu: partition is unused"),
devname, partno);
}
if (partno >= 0) {
size_t n;
if (!fdisk_has_label(sf->cxt))
- errx(EXIT_FAILURE, _("%s: cannot modify partition %d, "
- "not found partition table."),
+ errx(EXIT_FAILURE, _("%s: cannot modify partition %d: "
+ "no partition table was found"),
devname, partno);
n = fdisk_get_npartitions(sf->cxt);
if ((size_t) partno > n)
- errx(EXIT_FAILURE, _("%s: cannot modify partition %d, "
- "partition table contains %zu "
- "partitions only."),
+ errx(EXIT_FAILURE, _("%s: cannot modify partition %d: "
+ "partition table contains only %zu "
+ "partitions"),
devname, partno, n);
created = 1;
next_partno = partno;
if (!fdisk_partition_has_start(pa) &&
!fdisk_partition_start_is_default(pa)) {
- fdisk_info(sf->cxt, _("Ignore partition %zu"), next_partno + 1);
+ fdisk_info(sf->cxt, _("Ignoring partition %zu."), next_partno + 1);
continue;
}
if (!created) { /* create a new disklabel */
break;
case 'u':
if (*optarg != 'S')
- errx(EXIT_FAILURE, _("unssupported unit '%c'"), *optarg);
+ errx(EXIT_FAILURE, _("unsupported unit '%c'"), *optarg);
break;
case 'v':
printf(_("%s from %s\n"), program_invocation_short_name,
}
if (bit < 0) {
- fdisk_warnx(cxt, _("unssuported GPT attribute bit '%s'"), p);
+ fdisk_warnx(cxt, _("unsupported GPT attribute bit '%s'"), p);
return -EINVAL;
}
if (stdin != jfd)
fclose(jfd);
if (ret)
- errx(EXIT_FAILURE, _("journald entry could not be wrote"));
+ errx(EXIT_FAILURE, _("journald entry could not be written"));
return EXIT_SUCCESS;
}
#endif
" <file> name of file to be used\n"), out);
fputs(_("\nAvailable discard policy types (for --discard):\n"
- " once : only single-time area discards are issued\n"
- " pages : freed pages are discarded before they are reused\n"
- " If no policy is selected, both discard types are enabled (default).\n"), out);
+ " once : only single-time area discards are issued\n"
+ " pages : freed pages are discarded before they are reused\n"
+ "If no policy is selected, both discard types are enabled (default).\n"), out);
fputs(_("\nAvailable columns (for --show):\n"), out);
for (i = 0; i < ARRAY_SIZE(infos); i++)
fputs(_(" -f, --fork fork before launching <program>\n"), out);
fputs(_(" --mount-proc[=<dir>] mount proc filesystem first (implies --mount)\n"), out);
fputs(_(" -r, --map-root-user map current user to root (implies --user)\n"), out);
- fputs(_(" -s, --setgroups <allow|deny> control setgroups syscall in user namespaces\n"), out);
+ fputs(_(" -s, --setgroups allow|deny control the setgroups syscall in user namespaces\n"), out);
fputs(USAGE_SEPARATOR, out);
fputs(USAGE_HELP, out);
if (maproot) {
if (setgrpcmd == SETGROUPS_ALLOW)
errx(EXIT_FAILURE, _("options --setgroups=allow and "
- "--map-root-user are mutually exclusive."));
+ "--map-root-user are mutually exclusive"));
/* since Linux 3.19 unprivileged writing of /proc/self/gid_map
* has s been disabled unless /proc/self/setgroups is written
if (!op->osrelease) {
fd = open(_PATH_OS_RELEASE, O_RDONLY);
if (fd == -1) {
- log_warn(_("cannot open: %s: %m"), _PATH_OS_RELEASE);
+ log_warn(_("cannot open %s: %m"), _PATH_OS_RELEASE);
return NULL;
}
int fd = open(AGETTY_RELOAD_FILENAME, O_CREAT|O_CLOEXEC|O_WRONLY, 0700);
if (fd < 0)
- err(EXIT_FAILURE, _("cannot open: %s"), AGETTY_RELOAD_FILENAME);
+ err(EXIT_FAILURE, _("cannot open %s"), AGETTY_RELOAD_FILENAME);
if (futimens(fd, NULL) < 0 || close(fd) < 0)
- err(EXIT_FAILURE, _("cannot touch file: %s"),
+ err(EXIT_FAILURE, _("cannot touch file %s"),
AGETTY_RELOAD_FILENAME);
#else
/* very unusual */