+2010-09-20 Colin Watson <cjwatson@ubuntu.com>
+
+ * util/grub-editenv.c (argp_parser): Don't pass translated strings
+ as printf format strings; the translations might contain '%' which
+ could cause a crash.
+ (main): Likewise.
+ * util/grub-fstest.c (argp_parser): Likewise.
+ * util/grub-setup.c (argp_parser): Likewise.
+ (main): Likewise.
+
2010-09-20 Vladimir Serbinenko <phcoder@gmail.com>
Use argp in grub-fstest.
break;
case ARGP_KEY_NO_ARGS:
- fprintf (stderr, _("You need to specify at least one command.\n"));
+ fprintf (stderr, "%s",
+ _("You need to specify at least one command.\n"));
argp_usage (state);
break;
/* Parse our arguments */
if (argp_parse (&argp, argc, argv, 0, &index, 0) != 0)
{
- fprintf (stderr, _("Error in parsing command line arguments\n"));
+ fprintf (stderr, "%s", _("Error in parsing command line arguments\n"));
exit(1);
}
num_disks = grub_strtoul (arg, NULL, 0);
if (num_disks < 1)
{
- fprintf (stderr, _("Invalid disk count.\n"));
+ fprintf (stderr, "%s", _("Invalid disk count.\n"));
argp_usage (state);
}
if (args_count != 0)
{
- fprintf (stderr, _("Disk count must precede disks list.\n"));
+ fprintf (stderr, "%s", _("Disk count must precede disks list.\n"));
argp_usage (state);
}
return 0;
case ARGP_KEY_END:
if (args_count < num_disks)
{
- fprintf (stderr, _("No command is specified.\n"));
+ fprintf (stderr, "%s", _("No command is specified.\n"));
argp_usage (state);
}
if (args_count - 1 - num_disks < nparm)
{
- fprintf (stderr, _("Not enough parameters to command.\n"));
+ fprintf (stderr, "%s", _("Not enough parameters to command.\n"));
argp_usage (state);
}
return 0;
{
if (arg[0] != '/')
{
- fprintf (stderr, _("Must use absolute path.\n"));
+ fprintf (stderr, "%s", _("Must use absolute path.\n"));
argp_usage (state);
}
if (args_count == 0)
break;
case ARGP_KEY_NO_ARGS:
- fprintf (stderr, _("No device is specified.\n"));
+ fprintf (stderr, "%s", _("No device is specified.\n"));
argp_usage (state);
break;
/* Parse our arguments */
if (argp_parse (&argp, argc, argv, 0, 0, &arguments) != 0)
{
- fprintf (stderr, _("Error in parsing command line arguments\n"));
+ fprintf (stderr, "%s", _("Error in parsing command line arguments\n"));
exit(1);
}