~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to grub-core/hook/datehook.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-01-11 17:11:44 UTC
  • mfrom: (1.17.12 upstream)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 100.
  • Revision ID: james.westby@ubuntu.com-20110111171144-c4c3hc0jslqa1bxe
Tags: 1.99~20110111-1
* New Bazaar snapshot.
  - Don't check amount of low memory, as reportedly INT 12h can be broken
    and if low memory is too low we wouldn't have gotten into
    grub_machine_init anyway (closes: #588293, LP: #513528).
  - Submenu default support (LP: #691878).
  - Fix optimisation-dependent grub-mklayout crash (closes: #609584).
* branch_butter.patch: Don't free an uninitialised pointer if /proc is
  unmounted (LP: #697493).
* Add a po/LINGUAS file listing the translations we've synced from the TP
  (closes: #609671).

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
 
87
87
GRUB_MOD_INIT(datehook)
88
88
{
89
 
  int i;
 
89
  unsigned i;
90
90
 
91
 
  for (i = 0; i < 7; i++)
92
 
    grub_register_variable_hook (grub_datetime_names[i],
93
 
                                 grub_read_hook_datetime, 0);
 
91
  for (i = 0; i < ARRAY_SIZE (grub_datetime_names); i++)
 
92
    {
 
93
      grub_register_variable_hook (grub_datetime_names[i],
 
94
                                   grub_read_hook_datetime, 0);
 
95
      grub_env_export (grub_datetime_names[i]);
 
96
    }
94
97
}
95
98
 
96
99
GRUB_MOD_FINI(datehook)
97
100
{
98
 
  int i;
 
101
  unsigned i;
99
102
 
100
 
  for (i = 0; i < 7; i++)
 
103
  for (i = 0; i < ARRAY_SIZE (grub_datetime_names); i++)
101
104
    {
102
105
      grub_register_variable_hook (grub_datetime_names[i], 0, 0);
103
106
      grub_env_unset (grub_datetime_names[i]);