/* testload.c - load the same file in multiple ways */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2003,2005,2006,2007,2009,2010 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+");
static grub_err_t
{
char *buf;
{
grub_xputs (".");
grub_refresh ();
}
if (argc < 1)
if (! file)
return grub_errno;
if (size == 0)
{
return GRUB_ERR_NONE;
}
if (! buf)
goto fail;
goto fail;
grub_printf (" Done.\n");
/* Read sequentially again. */
grub_file_seek (file, 0);
{
goto fail;
{
goto fail;
}
}
grub_printf (" Done.\n");
/* Read backwards and compare. */
while (pos > 0)
{
goto fail;
{
int i;
for (i = 0; i < GRUB_DISK_SECTOR_SIZE; i++)
{
if ((i & 15) == 15)
grub_printf ("\n");
}
if (i)
grub_refresh ();
goto fail;
}
}
grub_printf (" Done.\n");
return GRUB_ERR_NONE;
fail:
if (!grub_errno)
return grub_errno;
}
{
cmd =
N_("FILE"),
N_("Load the same file in multiple ways."));
}
{
}