/* cat.c - command to show the contents of a file */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2003,2005,2007,2008 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
GRUB_MOD_LICENSE ("GPLv3+");
{
{0, 0, 0, 0, 0, 0}
};
static grub_err_t
{
int dos = 0;
int key = 0;
dos = 1;
if (argc != 1)
if (! file)
return grub_errno;
&& key != GRUB_TERM_ESC)
{
int i;
for (i = 0; i < size; i++)
{
unsigned char c = buf[i];
grub_printf ("%c", c);
{
grub_printf ("\n");
i++;
}
else
{
grub_printf ("<%x>", (int) c);
}
}
while (grub_checkkey () >= 0 &&
;
}
grub_xputs ("\n");
grub_refresh ();
return 0;
}
{
options);
}
{
}