Configure word length

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-07-18 15:07:59 +02:00
parent 91d135a12c
commit fd5b663793
5 changed files with 19 additions and 22 deletions

View file

@ -187,18 +187,7 @@ grub_cmd_serial (grub_extcmd_t cmd, int argc, char **args)
config.speed = grub_strtoul (state[2].arg, 0, 0);
if (state[3].set)
{
if (! grub_strcmp (state[3].arg, "5"))
config.word_len = UART_5BITS_WORD;
else if (! grub_strcmp (state[3].arg, "6"))
config.word_len = UART_6BITS_WORD;
else if (! grub_strcmp (state[3].arg, "7"))
config.word_len = UART_7BITS_WORD;
else if (! grub_strcmp (state[3].arg, "8"))
config.word_len = UART_8BITS_WORD;
else
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad word length");
}
config.word_len = grub_strtoul (state[3].arg, 0, 0);
if (state[4].set)
{