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; |
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; |
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", |
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 = |