~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
  • mto: (17.6.24 experimental)
  • mto: This revision was merged to the branch mainline in revision 100.
  • Revision ID: james.westby@ubuntu.com-20110111171144-o2h6luxzei5fivmf
Tags: upstream-1.99~20110111
ImportĀ upstreamĀ versionĀ 1.99~20110111

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]);