/[grub]/grub2/kern/powerpc/ieee1275/init.c
ViewVC logotype

Diff of /grub2/kern/powerpc/ieee1275/init.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by hollisb, Sun May 1 03:45:36 2005 UTC revision 1.18 by hollisb, Tue May 17 02:25:19 2005 UTC
# Line 113  grub_set_prefix (void) Line 113  grub_set_prefix (void)
113  void  void
114  grub_machine_init (void)  grub_machine_init (void)
115  {  {
116      char args[256];
117      grub_ieee1275_phandle_t chosen;
118      int actual;
119    extern char _start;    extern char _start;
120    
121    grub_console_init ();    grub_console_init ();
# Line 132  grub_machine_init (void) Line 135  grub_machine_init (void)
135    grub_set_prefix ();    grub_set_prefix ();
136    
137    grub_ofdisk_init ();    grub_ofdisk_init ();
138    
139      /* Process commandline.  */
140      grub_ieee1275_finddevice ("/chosen", &chosen);
141      if (grub_ieee1275_get_property (chosen, "bootargs", &args,
142                                      sizeof args, &actual) == 0
143          && actual > 1)
144        {
145          int i = 0;
146    
147          while (i < actual)
148            {
149              char *command = &args[i];
150              char *end;
151              char *val;
152    
153              end = grub_strchr (command, ';');
154              if (end == 0)
155                i = actual; /* No more commands after this one.  */
156              else
157                {
158                  *end = '\0';
159                  i += end - command + 1;
160                  while (grub_isspace(args[i]))
161                    i++;
162                }
163    
164              /* Process command.  */
165              val = grub_strchr (command, '=');
166              if (val)
167                {
168                  *val = '\0';
169                  grub_env_set (command, val + 1);
170                }
171            }
172        }
173  }  }
174    
175  void  void

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26