/* bsdlabel.c - Read BSD style partition tables. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2004,2005,2006,2007,2008,2009 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>
#include <grub/bsdlabel.h>
#include <grub/msdos_partition.h>
GRUB_MOD_LICENSE ("GPLv3+");
#ifdef GRUB_UTIL
#endif
static grub_err_t
struct grub_partition_map *pmap,
const grub_partition_t partition))
{
struct grub_partition p;
/* Read the BSD label. */
return grub_errno;
/* Check if it is valid. */
/* A kludge to determine a base of be.offset. */
{
+ sizeof (struct grub_partition_bsd_entry)
return grub_errno;
}
for (p.number = 0;
{
continue;
return grub_errno;
if (p.len == 0)
continue;
{
#ifdef GRUB_UTIL
char *partname;
/* disk->partition != NULL as 0 < delta */
: "";
grub_util_warn (_("Discarding improperly nested partition (%s,%s,%s%d)"),
#endif
continue;
}
return grub_errno;
}
return GRUB_ERR_NONE;
}
static grub_err_t
const grub_partition_t partition))
{
}
it actually describes the whole disk.
*/
static grub_err_t
struct grub_partition_map *pmap,
const grub_partition_t partition))
{
int count = 0;
const grub_partition_t partition);
const grub_partition_t partition)
{
return 0;
if (err == GRUB_ERR_NONE)
{
count++;
return 1;
}
if (err == GRUB_ERR_BAD_PART_TABLE)
{
return 0;
}
grub_print_error ();
return 0;
}
== 0)
{
if (err)
return err;
if (!count)
}
return GRUB_ERR_NONE;
}
static grub_err_t
const grub_partition_t partition))
{
hook);
}
static grub_err_t
const grub_partition_t partition))
{
hook);
}
{
.name = "bsd",
};
{
.name = "openbsd",
};
{
.name = "netbsd",
};
{
}
{
}