mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 16:49:23 +00:00
cleanup the function cat and update the manual.
This commit is contained in:
1 parent
07b947e669
commit
ce8fc4e5a0
3 files changed
+85
-20
No files matched your search
+3
-10
@@ -131,20 +131,13 @@ static struct builtin builtin_boot =
|
||||
static int
|
||||
cat_func (char *arg, int flags)
|
||||
{
|
||||
int len;
|
||||
char *ptr;
|
||||
char c;
|
||||
|
||||
if (! grub_open (arg))
|
||||
return 1;
|
||||
|
||||
len = grub_read ((char *) RAW_ADDR (0x100000), -1);
|
||||
if (errnum)
|
||||
return 1;
|
||||
|
||||
ptr = (char *) RAW_ADDR (0x100000);
|
||||
|
||||
while (len--)
|
||||
grub_putchar (*ptr++);
|
||||
while (grub_read (&c, 1))
|
||||
grub_putchar (c);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user