#include <talloc/talloc.h>
#include <url/url.h>
#include <util/util.h>
+#include <i18n/i18n.h>
#include "device-handler.h"
#include "boot.h"
char *buf)
{
char *line, *name, *val, *sep;
- char *saveptr;
+ char *saveptr = NULL;
for (;; buf = NULL) {
return;
update_status(task->status_fn, task->status_arg, BOOT_STATUS_INFO,
- "running boot hooks");
+ _("running boot hooks"));
boot_hook_setenv(task);
update_status(task->status_fn, task->status_arg,
BOOT_STATUS_ERROR,
- "Couldn't load %s", name);
+ _("Couldn't load %s"), name);
return -1;
}
run_boot_hooks(task);
update_status(task->status_fn, task->status_arg, BOOT_STATUS_INFO,
- "performing kexec_load");
+ _("performing kexec_load"));
rc = kexec_load(task);
if (rc) {
update_status(task->status_fn, task->status_arg,
- BOOT_STATUS_ERROR, "kexec load failed");
+ BOOT_STATUS_ERROR, _("kexec load failed"));
}
no_load:
if (!rc) {
update_status(task->status_fn, task->status_arg,
BOOT_STATUS_INFO,
- "performing kexec reboot");
+ _("performing kexec reboot"));
rc = kexec_reboot(task);
if (rc) {
update_status(task->status_fn, task->status_arg,
BOOT_STATUS_ERROR,
- "kexec reboot failed");
+ _("kexec reboot failed"));
}
}
}
if (!*result) {
update_status(task->status_fn, task->status_arg,
BOOT_STATUS_ERROR,
- "Error loading %s", name);
+ _("Error loading %s"), name);
return -1;
}
return 0;
else if (cmd && cmd->boot_image_file)
boot_desc = cmd->boot_image_file;
else
- boot_desc = "(unknown)";
+ boot_desc = _("(unknown)");
update_status(status_fn, status_arg, BOOT_STATUS_INFO,
- "Booting %s.", boot_desc);
+ _("Booting %s."), boot_desc);
if (cmd && cmd->boot_image_file) {
image = pb_url_parse(opt, cmd->boot_image_file);
} else {
pb_log("%s: no image specified\n", __func__);
update_status(status_fn, status_arg, BOOT_STATUS_INFO,
- "Boot failed: no image specified");
+ _("Boot failed: no image specified"));
return NULL;
}
task->cancelled = true;
update_status(task->status_fn, task->status_arg, BOOT_STATUS_INFO,
- "Boot cancelled");
+ _("Boot cancelled"));
cleanup_cancellations(task, NULL);
}