mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
2002-05-24 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/builtins.c (real_root_func): New function. (root_func): Just call real_root_func. (rootnoverify_func): Likewise.
This commit is contained in:
1 parent
58a5878421
commit
4339b22d7a
2 files changed
+22
-19
No files matched your search
@@ -1,3 +1,9 @@
|
||||
2002-05-24 Yoshinori K. Okuji <okuji@enbug.org>
|
||||
|
||||
* stage2/builtins.c (real_root_func): New function.
|
||||
(root_func): Just call real_root_func.
|
||||
(rootnoverify_func): Likewise.
|
||||
|
||||
2002-05-23 Yoshinori K. Okuji <okuji@enbug.org>
|
||||
|
||||
* configure.in (AM_INIT_AUTOMAKE): Changed the version number to
|
||||
|
||||
+16
-19
@@ -3099,9 +3099,9 @@ print_root_device (void)
|
||||
current_drive = saved_drive;
|
||||
print_fsys_type ();
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
root_func (char *arg, int flags)
|
||||
real_root_func (char *arg, int attempt_mount)
|
||||
{
|
||||
int hdbias = 0;
|
||||
char *biasptr;
|
||||
@@ -3120,8 +3120,11 @@ root_func (char *arg, int flags)
|
||||
return 1;
|
||||
|
||||
/* Ignore ERR_FSYS_MOUNT. */
|
||||
if (! open_device () && errnum != ERR_FSYS_MOUNT)
|
||||
return 1;
|
||||
if (attempt_mount)
|
||||
{
|
||||
if (! open_device () && errnum != ERR_FSYS_MOUNT)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Clear ERRNUM. */
|
||||
errnum = 0;
|
||||
@@ -3135,11 +3138,18 @@ root_func (char *arg, int flags)
|
||||
bootdev = set_bootdev (hdbias);
|
||||
|
||||
/* Print the type of the filesystem. */
|
||||
print_fsys_type ();
|
||||
if (attempt_mount)
|
||||
print_fsys_type ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
root_func (char *arg, int flags)
|
||||
{
|
||||
return real_root_func (arg, 1);
|
||||
}
|
||||
|
||||
static struct builtin builtin_root =
|
||||
{
|
||||
"root",
|
||||
@@ -3163,20 +3173,7 @@ static struct builtin builtin_root =
|
||||
static int
|
||||
rootnoverify_func (char *arg, int flags)
|
||||
{
|
||||
/* If ARG is empty, just print the current root device. */
|
||||
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;
|
||||
return real_root_func (arg, 0);
|
||||
}
|
||||
|
||||
static struct builtin builtin_rootnoverify =
|
||||
|
||||
Reference in new issue
Block a user