/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2003,2005,2006,2007,2008,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/>.
*/
#include <config-util.h>
#include <config.h>
#include <errno.h>
#include <error.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#ifdef __sun__
# include <libdevinfo.h>
#ifdef GRUB_UTIL
#endif
#endif
#ifdef HAVE_DEVICE_MAPPER
# include <libdevmapper.h>
#endif
#ifdef HAVE_SYS_PARAM_H
#endif
#ifdef HAVE_SYS_MOUNT_H
#endif
#ifdef HAVE_SYS_MNTTAB_H
#endif
#ifdef HAVE_SYS_MKDEV_H
#endif
int verbosity;
void
{
}
void
{
if (verbosity > 0)
{
}
}
void
{
exit (1);
}
void *
{
void *p;
if (! p)
grub_util_error (_("out of memory"));
return p;
}
void *
{
if (! ptr)
grub_util_error (_("out of memory"));
return ptr;
}
char *
{
char *newstr;
return newstr;
}
#ifndef HAVE_VASPRINTF
int
{
/* Should be large enough. */
}
#endif
#ifndef HAVE_ASPRINTF
int
{
int status;
return status;
}
#endif
char *
{
char *result;
{
grub_util_error (_("out of memory"));
return NULL;
}
return result;
}
void
grub_exit (void)
{
exit (1);
}
grub_get_time_ms (void)
{
gettimeofday (&tv, 0);
}
grub_get_rtc (void)
{
gettimeofday (&tv, 0);
* GRUB_TICKS_PER_SECOND / 1000000));
}
char *
{
char *ret;
#ifdef __MINGW32__
return NULL;
return NULL;
#else
#endif
return ret;
}
#ifdef HAVE_DEVICE_MAPPER
const char *f __attribute__ ((unused)),
...)
{
}
int
grub_device_mapper_supported (void)
{
if (supported == -1)
{
/* Suppress annoying log messages. */
if (dmt)
/* Restore the original logger. */
}
return supported;
}
#endif /* HAVE_DEVICE_MAPPER */
static char *
{
return NULL;
if (version_type == NULL)
return NULL;
/*
* Loop through the various version entries looking for the requested one.
* Keep looping after finding the first occurrence because the last present
* entry overrides the previous ones.
*/
{
char *p;
if (!p)
continue;
*p++ = '\0';
/* Is this the version we want? */
continue;
while (*p && isspace (*p))
p++;
if (! *p)
continue;
}
return version;
}
int
{
int vers_from_file;
char *modinfo;
{
return -1;
}
{
errno = 0;
return 0;
}
return 1;
}
#endif