merged with upstream

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2009-11-02 23:29:51 +01:00
commit 6174923799
30 changed files with 527 additions and 230 deletions

View file

@ -62,7 +62,10 @@ grub_stop_floppy (void)
void
grub_exit (void)
{
grub_fatal ("grub_exit() is not implemented.\n");
/* We can't use grub_fatal() in this function. This would create an infinite
loop, since grub_fatal() calls grub_abort() which in turn calls grub_exit(). */
while (1)
grub_cpu_idle ();
}
void

View file

@ -223,12 +223,12 @@ grub_strncmp (const char *s1, const char *s2, grub_size_t n)
char *
grub_strchr (const char *s, int c)
{
while (*s)
do
{
if (*s == c)
return (char *) s;
s++;
}
while (*s++);
return 0;
}
@ -236,14 +236,14 @@ grub_strchr (const char *s, int c)
char *
grub_strrchr (const char *s, int c)
{
char *p = 0;
char *p = NULL;
while (*s)
do
{
if (*s == c)
p = (char *) s;
s++;
}
while (*s++);
return p;
}