Skip to contentSkip to conversation

- "version" parameter

PATCH In review Vladimir Testov 1 participant 1 message Apr 11, 2013

lore
Share & tools
lore
#0 lore raw

cover - "version" parameter

There are plenty of misbehaviours of "bootmenu list" component which I would like to correct.
Many of following patches can break backward compatibility.
So I suggest to make a new parameter of a "bootmenu list" - "version". It equal 0 by default.
If some behaviour would change since version 2.XY then we can use XY as start point for some new behaviour and save previous behaviour at the same time.

So if version is 0 - every behavour is just the same as was before. If version is 1 - the behaviour can change a little. (1 - for future release of 2.01 version)

or it could be 201 version, 202 version etc.

Signature · 4 lines
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru
grub-core/gfxmenu/gui_list.c +6 -0
diff -Naur grub-2.00/grub-core/gfxmenu/gui_list.c grub-new/grub-core/gfxmenu/gui_list.c
@@ -31,6 +31,7 @@
   grub_gui_container_t parent;
   grub_video_rect_t bounds;
   char *id;
+  int list_version;
   int visible;
 
   int icon_width;
@@ -519,6 +520,10 @@
       grub_free (self->theme_dir);
       self->theme_dir = value ? grub_strdup (value) : 0;
     }
+  else if (grub_strcmp (name, "version") == 0)
+    {
+      self->list_version = grub_strtol (value, 0, 10);
+    }
   else if (grub_strcmp (name, "id") == 0)
     {
       grub_free (self->id);
@@ -574,6 +579,7 @@
   self->list.ops = &list_ops;
   self->list.component.ops = &list_comp_ops;
 
+  self->list_version = 0;
   self->visible = 1;
 
   default_font = grub_font_get ("Unknown Regular 16");