* 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>
#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
return os_dev;
}
-int
+
+static int
grub_util_is_dmraid (const char *os_dev)
{
if (! strncmp (os_dev, "/dev/mapper/nvidia_", 19))
}
static int
-find_free_slot ()
+find_free_slot (void)
{
unsigned int i;
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)
{