|
|
|
@ -229,6 +229,13 @@ test_parse (char **args, int *argn, int argc)
|
|
|
|
|
(*argn) += 3;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if (grub_strcmp (args[*argn + 1], "-EQ") == 0)
|
|
|
|
|
{
|
|
|
|
|
update_val (grub_strtoull (args[*argn], 0, 0)
|
|
|
|
|
== grub_strtoull (args[*argn + 2], 0, 0), &ctx);
|
|
|
|
|
(*argn) += 3;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (grub_strcmp (args[*argn + 1], "-ge") == 0)
|
|
|
|
|
{
|
|
|
|
@ -237,6 +244,13 @@ test_parse (char **args, int *argn, int argc)
|
|
|
|
|
(*argn) += 3;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if (grub_strcmp (args[*argn + 1], "-GE") == 0)
|
|
|
|
|
{
|
|
|
|
|
update_val (grub_strtoull (args[*argn], 0, 0)
|
|
|
|
|
>= grub_strtoull (args[*argn + 2], 0, 0), &ctx);
|
|
|
|
|
(*argn) += 3;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (grub_strcmp (args[*argn + 1], "-gt") == 0)
|
|
|
|
|
{
|
|
|
|
@ -245,6 +259,13 @@ test_parse (char **args, int *argn, int argc)
|
|
|
|
|
(*argn) += 3;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if (grub_strcmp (args[*argn + 1], "-GT") == 0)
|
|
|
|
|
{
|
|
|
|
|
update_val (grub_strtoull (args[*argn], 0, 0)
|
|
|
|
|
> grub_strtoull (args[*argn + 2], 0, 0), &ctx);
|
|
|
|
|
(*argn) += 3;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (grub_strcmp (args[*argn + 1], "-le") == 0)
|
|
|
|
|
{
|
|
|
|
@ -253,6 +274,13 @@ test_parse (char **args, int *argn, int argc)
|
|
|
|
|
(*argn) += 3;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if (grub_strcmp (args[*argn + 1], "-LE") == 0)
|
|
|
|
|
{
|
|
|
|
|
update_val (grub_strtoull (args[*argn], 0, 0)
|
|
|
|
|
<= grub_strtoull (args[*argn + 2], 0, 0), &ctx);
|
|
|
|
|
(*argn) += 3;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (grub_strcmp (args[*argn + 1], "-lt") == 0)
|
|
|
|
|
{
|
|
|
|
@ -261,6 +289,13 @@ test_parse (char **args, int *argn, int argc)
|
|
|
|
|
(*argn) += 3;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if (grub_strcmp (args[*argn + 1], "-LT") == 0)
|
|
|
|
|
{
|
|
|
|
|
update_val (grub_strtoull (args[*argn], 0, 0)
|
|
|
|
|
< grub_strtoull (args[*argn + 2], 0, 0), &ctx);
|
|
|
|
|
(*argn) += 3;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (grub_strcmp (args[*argn + 1], "-ne") == 0)
|
|
|
|
|
{
|
|
|
|
@ -269,6 +304,13 @@ test_parse (char **args, int *argn, int argc)
|
|
|
|
|
(*argn) += 3;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
if (grub_strcmp (args[*argn + 1], "-NE") == 0)
|
|
|
|
|
{
|
|
|
|
|
update_val (grub_strtoull (args[*argn], 0, 0)
|
|
|
|
|
!= grub_strtoull (args[*argn + 2], 0, 0), &ctx);
|
|
|
|
|
(*argn) += 3;
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* GRUB extension: compare numbers skipping prefixes.
|
|
|
|
|
Useful for comparing versions. E.g. vmlinuz-2 -plt vmlinuz-11. */
|
|
|
|
|