2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
* util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Rename one instance of disk to dsk to avoid shadowing. (find_free_slot): Fix prototype. * util/getroot.c (grub_util_is_dmraid): Make static. * include/grub/time.h (grub_get_rtc) [GRUB_MACHINE_EMU || GRUB_UTIL]: Add missing prototype. * util/sdl.c (grub_video_sdl_set_viewport): Remove.
This commit is contained in:
parent
f88d801b17
commit
74e4934e1c
5 changed files with 11 additions and 29 deletions
|
@ -5,9 +5,14 @@
|
|||
* util/grub-emu.c (ENABLE_RELOCATABLE): New definition.
|
||||
(grub_arch_modules_addr): Return 0 and not NULL.
|
||||
* util/misc.c (ENABLE_RELOCATABLE): New definition.
|
||||
(xstrdup): USe newstr instead of dup.
|
||||
(xstrdup): Use newstr instead of dup.
|
||||
* util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Rename one instance
|
||||
of disk to dsk to avoid shadowing.
|
||||
(find_free_slot): Fix prototype.
|
||||
* util/getroot.c (grub_util_is_dmraid): Make static.
|
||||
* include/grub/time.h (grub_get_rtc) [GRUB_MACHINE_EMU || GRUB_UTIL]:
|
||||
Add missing prototype.
|
||||
* util/sdl.c (grub_video_sdl_set_viewport): Remove.
|
||||
|
||||
2010-02-07 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
#if defined (GRUB_MACHINE_EMU) || defined (GRUB_UTIL)
|
||||
#define GRUB_TICKS_PER_SECOND 100000
|
||||
/* Return the real time in ticks. */
|
||||
grub_uint32_t EXPORT_FUNC (grub_get_rtc) (void);
|
||||
#else
|
||||
#include <grub/machine/time.h>
|
||||
#endif
|
||||
|
|
|
@ -460,7 +460,8 @@ grub_guess_root_device (const char *dir)
|
|||
|
||||
return os_dev;
|
||||
}
|
||||
int
|
||||
|
||||
static int
|
||||
grub_util_is_dmraid (const char *os_dev)
|
||||
{
|
||||
if (! strncmp (os_dev, "/dev/mapper/nvidia_", 19))
|
||||
|
|
|
@ -137,7 +137,7 @@ find_grub_drive (const char *name)
|
|||
}
|
||||
|
||||
static int
|
||||
find_free_slot ()
|
||||
find_free_slot (void)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
|
26
util/sdl.c
26
util/sdl.c
|
@ -179,32 +179,6 @@ grub_video_sdl_set_palette (unsigned int start, unsigned int count,
|
|||
return grub_video_fb_set_palette (start, count, palette_data);
|
||||
}
|
||||
|
||||
grub_err_t
|
||||
grub_video_sdl_set_viewport (unsigned int x, unsigned int y,
|
||||
unsigned int width, unsigned int height)
|
||||
{
|
||||
/* Make sure viewport is withing screen dimensions. If viewport was set
|
||||
to be out of the region, mark its size as zero. */
|
||||
if (x > (unsigned) window->w)
|
||||
{
|
||||
x = 0;
|
||||
width = 0;
|
||||
}
|
||||
|
||||
if (y > (unsigned) window->h)
|
||||
{
|
||||
y = 0;
|
||||
height = 0;
|
||||
}
|
||||
|
||||
if (x + width > (unsigned) window->w)
|
||||
width = window->w - x;
|
||||
|
||||
if (y + height > (unsigned) window->h)
|
||||
height = window->h - y;
|
||||
return grub_video_fb_set_viewport (x, y, width, height);
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
grub_video_sdl_swap_buffers (void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue