mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
add geometry command
This commit is contained in:
1 parent
4d1186c003
commit
d52edd8638
2 files changed
+34
No files matched your search
@@ -1,3 +1,9 @@
|
|||||||
|
1999-08-09 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
|
* stage2/cmdline.c (commands): Added geometry.
|
||||||
|
(enter_cmdline): If CUR_HEAP has the string "geometry", print
|
||||||
|
out the information about a drive that the argument represents.
|
||||||
|
|
||||||
1999-08-09 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
1999-08-09 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||||
|
|
||||||
* stage2/stage2.c (run_menu): Terminate the string PASSWORD
|
* stage2/stage2.c (run_menu): Terminate the string PASSWORD
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ char commands[] =
|
|||||||
" Possible commands are: \"pause= ...\", \"uppermem= <kbytes>\", \"root= <device>\",
|
" Possible commands are: \"pause= ...\", \"uppermem= <kbytes>\", \"root= <device>\",
|
||||||
\"rootnoverify= <device>\", \"chainloader= <file>\", \"kernel= <file> ...\",
|
\"rootnoverify= <device>\", \"chainloader= <file>\", \"kernel= <file> ...\",
|
||||||
\"testload= <file>\", \"read= <addr>\", \"displaymem\", \"impsprobe\",
|
\"testload= <file>\", \"read= <addr>\", \"displaymem\", \"impsprobe\",
|
||||||
|
\"geometry= <drive>\",
|
||||||
\"fstest\", \"debug\", \"module= <file> ...\", \"modulenounzip= <file> ...\",
|
\"fstest\", \"debug\", \"module= <file> ...\", \"modulenounzip= <file> ...\",
|
||||||
\"color= <normal> [<highlight>]\", \"makeactive\", \"boot\", \"quit\" and
|
\"color= <normal> [<highlight>]\", \"makeactive\", \"boot\", \"quit\" and
|
||||||
\"install= <stage1_file> [d] <dest_dev> <file> <addr> [p] [<config_file>]\"\n";
|
\"install= <stage1_file> [d] <dest_dev> <file> <addr> [p] [<config_file>]\"\n";
|
||||||
@@ -661,6 +662,33 @@ returnit:
|
|||||||
grub_printf (" The quit command is ignored in Stage2\n");
|
grub_printf (" The quit command is ignored in Stage2\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
else if (substring ("geometry", cur_heap) < 1)
|
||||||
|
{
|
||||||
|
set_device (cur_cmdline);
|
||||||
|
|
||||||
|
if (! errnum)
|
||||||
|
{
|
||||||
|
struct geometry geom;
|
||||||
|
|
||||||
|
if (get_diskinfo (current_drive, &geom))
|
||||||
|
errnum = ERR_NO_DISK;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
char *msg;
|
||||||
|
|
||||||
|
if (geom.flags & BIOSDISK_FLAG_LBA_EXTENSION)
|
||||||
|
msg = "LBA";
|
||||||
|
else
|
||||||
|
msg = "CHS";
|
||||||
|
|
||||||
|
grub_printf ("drive 0x%x: C/H/S = %d/%d/%d, "
|
||||||
|
"The number of sectors = %d, %s\n",
|
||||||
|
current_drive,
|
||||||
|
geom.cylinders, geom.heads, geom.sectors,
|
||||||
|
geom.total_sectors, msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else if (*cur_heap && *cur_heap != ' ')
|
else if (*cur_heap && *cur_heap != ' ')
|
||||||
errnum = ERR_UNRECOGNIZED;
|
errnum = ERR_UNRECOGNIZED;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user