/* blocklist.c - print the block list of a file */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2006,2007 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/>.
*/
#include <grub/partition.h>
GRUB_MOD_LICENSE ("GPLv3+");
static grub_err_t
{
unsigned long start_sector = 0;
unsigned num_sectors = 0;
int num_entries = 0;
unsigned length);
unsigned length)
{
if (num_sectors > 0)
{
{
num_sectors++;
return;
}
num_sectors = 0;
}
{
num_sectors++;
}
else
}
{
if (num_entries++)
grub_printf (",");
if (num > 0)
}
if (argc < 1)
if (! file)
return grub_errno;
return grub_error (GRUB_ERR_BAD_DEVICE,
"this command is available only for disk devices");
;
if (num_sectors > 0)
return grub_errno;
}
{
}
{
}