/[grub]/grub/stage2/builtins.c
ViewVC logotype

Diff of /grub/stage2/builtins.c

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

revision 1.132 by okuji, Wed May 22 06:58:23 2002 UTC revision 1.133 by okuji, Fri May 24 13:53:57 2002 UTC
# Line 3099  print_root_device (void) Line 3099  print_root_device (void)
3099    current_drive = saved_drive;    current_drive = saved_drive;
3100    print_fsys_type ();    print_fsys_type ();
3101  }  }
3102          
3103  static int  static int
3104  root_func (char *arg, int flags)  real_root_func (char *arg, int attempt_mount)
3105  {  {
3106    int hdbias = 0;    int hdbias = 0;
3107    char *biasptr;    char *biasptr;
# Line 3120  root_func (char *arg, int flags) Line 3120  root_func (char *arg, int flags)
3120      return 1;      return 1;
3121    
3122    /* Ignore ERR_FSYS_MOUNT.  */    /* Ignore ERR_FSYS_MOUNT.  */
3123    if (! open_device () && errnum != ERR_FSYS_MOUNT)    if (attempt_mount)
3124      return 1;      {
3125          if (! open_device () && errnum != ERR_FSYS_MOUNT)
3126            return 1;
3127        }
3128    
3129    /* Clear ERRNUM.  */    /* Clear ERRNUM.  */
3130    errnum = 0;    errnum = 0;
# Line 3135  root_func (char *arg, int flags) Line 3138  root_func (char *arg, int flags)
3138    bootdev = set_bootdev (hdbias);    bootdev = set_bootdev (hdbias);
3139    
3140    /* Print the type of the filesystem.  */    /* Print the type of the filesystem.  */
3141    print_fsys_type ();    if (attempt_mount)
3142        print_fsys_type ();
3143    
3144    return 0;    return 0;
3145  }  }
3146    
3147    static int
3148    root_func (char *arg, int flags)
3149    {
3150      return real_root_func (arg, 1);
3151    }
3152    
3153  static struct builtin builtin_root =  static struct builtin builtin_root =
3154  {  {
3155    "root",    "root",
# Line 3163  static struct builtin builtin_root = Line 3173  static struct builtin builtin_root =
3173  static int  static int
3174  rootnoverify_func (char *arg, int flags)  rootnoverify_func (char *arg, int flags)
3175  {  {
3176    /* If ARG is empty, just print the current root device.  */    return real_root_func (arg, 0);
   if (! *arg)  
     {  
       print_root_device ();  
       return 0;  
     }  
     
   if (! set_device (arg))  
     return 1;  
   
   saved_partition = current_partition;  
   saved_drive = current_drive;  
   current_drive = -1;  
   return 0;  
3177  }  }
3178    
3179  static struct builtin builtin_rootnoverify =  static struct builtin builtin_rootnoverify =

Legend:
Removed from v.1.132  
changed lines
  Added in v.1.133

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