/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2004,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>
#ifdef GRUB_UTIL
#endif
/*
* Checks that disk->partition contains part. This function assumes that the
* start of part is relative to the start of disk->partition. Returns 1 if
* disk->partition is null.
*/
static int
const grub_partition_t part)
{
return 1;
{
char *partname;
#ifdef GRUB_UTIL
grub_util_warn (_("Discarding improperly nested partition (%s,%s,%s%d)"),
#endif
return 0;
}
return 1;
}
static grub_partition_t
{
grub_partition_t p = 0;
const grub_partition_t partition)
{
return 0;
return 0;
p = (grub_partition_t) grub_malloc (sizeof (*p));
if (! p)
return 1;
grub_memcpy (p, partition, sizeof (*p));
return 1;
}
if (grub_errno)
goto fail;
return p;
fail:
grub_free (p);
return 0;
}
{
const char *ptr;
{
int num;
ptr++;
partname_end = ptr;
curpart = 0;
/* Use the first partition map type found. */
{
if (partname_end != partname &&
continue;
if (curpart)
break;
if (grub_errno == GRUB_ERR_BAD_PART_TABLE)
{
/* Continue to next partition map type. */
continue;
}
break;
}
if (! curpart)
{
while (part)
{
}
return 0;
}
break;
ptr++;
}
return part;
}
int
const grub_partition_t partition))
{
int ret = 0;
const grub_partition_t partition)
{
struct grub_partition p = *partition;
return 0;
{
ret = 1;
return 1;
}
if (p.start != 0)
{
{
if (err)
if (ret)
break;
}
}
return ret;
}
{
{
if (err)
if (ret)
break;
}
}
return ret;
}
char *
{
char *out = 0;
int curlen = 0;
{
/* Even on 64-bit machines this buffer is enough to hold
longest number. */
int strl;
if (curlen)
{
}
else
{
}
}
return out;
}