On Tue, Aug 25, 2009 at 10:37:33PM +0200, Vladimir 'phcoder' Serbinenko wrote: > + if (cmd->state[OPENBSD_ROOT_ARG].set) > + { > + const char *arg = cmd->state[OPENBSD_ROOT_ARG].arg; > + int unit, part; > + if (*(arg++) != 'w' || *(arg++) != 'd') > + return grub_error (GRUB_ERR_BAD_ARGUMENT, > + "Only device specifications of form " > + "wd<number><lowercase letter> are supported."); > + > + unit = grub_strtoul (arg, (char **) &arg, 10); > + if (! (arg && *arg >= 'a' && *arg <= 'z')) > + return grub_error (GRUB_ERR_BAD_ARGUMENT, > + "Only device specifications of form " > + "wd<number><letter> are supported.");
Looks like the first error string could be used for both cases, saving a few bytes. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all." _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel