merge mainline into newreloc
This commit is contained in:
commit
13f58ea31f
59 changed files with 1342 additions and 11023 deletions
|
@ -96,23 +96,8 @@ void grub_dl_unload_all (void);
|
|||
#else
|
||||
#define GRUB_NO_MODULES 0
|
||||
#endif
|
||||
#if GRUB_NO_MODULES
|
||||
static inline int
|
||||
grub_dl_ref (grub_dl_t mod)
|
||||
{
|
||||
(void) mod;
|
||||
return 0;
|
||||
}
|
||||
static inline int
|
||||
grub_dl_unref (grub_dl_t mod)
|
||||
{
|
||||
(void) mod;
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
int EXPORT_FUNC(grub_dl_ref) (grub_dl_t mod);
|
||||
int EXPORT_FUNC(grub_dl_unref) (grub_dl_t mod);
|
||||
#endif
|
||||
void EXPORT_FUNC(grub_dl_iterate) (int (*hook) (grub_dl_t mod));
|
||||
grub_dl_t EXPORT_FUNC(grub_dl_get) (const char *name);
|
||||
grub_err_t grub_dl_register_symbol (const char *name, void *addr,
|
||||
|
|
50
include/grub/emu/misc.h
Normal file
50
include/grub/emu/misc.h
Normal file
|
@ -0,0 +1,50 @@
|
|||
#ifndef GRUB_EMU_MISC_H
|
||||
#define GRUB_EMU_MISC_H 1
|
||||
|
||||
#include <grub/symbol.h>
|
||||
#include <grub/types.h>
|
||||
|
||||
#ifdef __CYGWIN__
|
||||
# include <sys/fcntl.h>
|
||||
# include <sys/cygwin.h>
|
||||
# include <limits.h>
|
||||
# define DEV_CYGDRIVE_MAJOR 98
|
||||
#endif
|
||||
|
||||
#ifdef __NetBSD__
|
||||
/* NetBSD uses /boot for its boot block. */
|
||||
# define DEFAULT_DIRECTORY "/grub"
|
||||
#else
|
||||
# define DEFAULT_DIRECTORY "/boot/grub"
|
||||
#endif
|
||||
|
||||
#define DEFAULT_DEVICE_MAP DEFAULT_DIRECTORY "/device.map"
|
||||
|
||||
extern int verbosity;
|
||||
extern const char *program_name;
|
||||
|
||||
void grub_init_all (void);
|
||||
void grub_fini_all (void);
|
||||
|
||||
char *grub_make_system_path_relative_to_its_root (const char *path);
|
||||
|
||||
void * EXPORT_FUNC(xmalloc) (grub_size_t size);
|
||||
void * EXPORT_FUNC(xrealloc) (void *ptr, grub_size_t size);
|
||||
char * EXPORT_FUNC(xstrdup) (const char *str);
|
||||
char * EXPORT_FUNC(xasprintf) (const char *fmt, ...);
|
||||
|
||||
void EXPORT_FUNC(grub_util_warn) (const char *fmt, ...);
|
||||
void EXPORT_FUNC(grub_util_info) (const char *fmt, ...);
|
||||
void EXPORT_FUNC(grub_util_error) (const char *fmt, ...) __attribute__ ((noreturn));
|
||||
|
||||
#ifndef HAVE_VASPRINTF
|
||||
int EXPORT_FUNC(vasprintf) (char **buf, const char *fmt, va_list ap);
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ASPRINTF
|
||||
int EXPORT_FUNC(asprintf) (char **buf, const char *fmt, ...);
|
||||
#endif
|
||||
|
||||
char * EXPORT_FUNC(xasprintf) (const char *fmt, ...);
|
||||
|
||||
#endif /* GRUB_EMU_MISC_H */
|
|
@ -22,10 +22,15 @@
|
|||
#include <grub/video.h>
|
||||
#include <grub/bitmap.h>
|
||||
#include <grub/gfxmenu_view.h>
|
||||
#include <grub/mm.h>
|
||||
|
||||
#ifndef GRUB_GUI_H
|
||||
#define GRUB_GUI_H 1
|
||||
|
||||
/* The component ID identifying GUI components to be updated as the timeout
|
||||
status changes. */
|
||||
#define GRUB_GFXMENU_TIMEOUT_COMPONENT_ID "__timeout__"
|
||||
|
||||
/* A representation of a color. Unlike grub_video_color_t, this
|
||||
representation is independent of any video mode specifics. */
|
||||
typedef struct grub_gui_color
|
||||
|
@ -79,6 +84,46 @@ struct grub_gui_progress_ops
|
|||
void (*set_state) (void *self, int visible, int start, int current, int end);
|
||||
};
|
||||
|
||||
typedef void (*grub_gfxmenu_set_state_t) (void *self, int visible, int start,
|
||||
int current, int end);
|
||||
|
||||
struct grub_gfxmenu_timeout_notify
|
||||
{
|
||||
struct grub_gfxmenu_timeout_notify *next;
|
||||
grub_gfxmenu_set_state_t set_state;
|
||||
grub_gui_component_t self;
|
||||
};
|
||||
|
||||
extern struct grub_gfxmenu_timeout_notify *grub_gfxmenu_timeout_notifications;
|
||||
|
||||
static inline grub_err_t
|
||||
grub_gfxmenu_timeout_register (grub_gui_component_t self,
|
||||
grub_gfxmenu_set_state_t set_state)
|
||||
{
|
||||
struct grub_gfxmenu_timeout_notify *ne = grub_malloc (sizeof (*ne));
|
||||
if (!ne)
|
||||
return grub_errno;
|
||||
ne->set_state = set_state;
|
||||
ne->self = self;
|
||||
ne->next = grub_gfxmenu_timeout_notifications;
|
||||
grub_gfxmenu_timeout_notifications = ne;
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static inline void
|
||||
grub_gfxmenu_timeout_unregister (grub_gui_component_t self)
|
||||
{
|
||||
struct grub_gfxmenu_timeout_notify **p, *q;
|
||||
|
||||
for (p = &grub_gfxmenu_timeout_notifications, q = *p;
|
||||
q; p = &(q->next), q = q->next)
|
||||
if (q->self == self)
|
||||
{
|
||||
*p = q->next;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
typedef signed grub_fixed_signed_t;
|
||||
#define GRUB_FIXED_1 0x10000
|
||||
|
||||
|
|
|
@ -28,26 +28,7 @@
|
|||
#include <config.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/symbol.h>
|
||||
|
||||
#ifdef __NetBSD__
|
||||
/* NetBSD uses /boot for its boot block. */
|
||||
# define DEFAULT_DIRECTORY "/grub"
|
||||
#else
|
||||
# define DEFAULT_DIRECTORY "/boot/grub"
|
||||
#endif
|
||||
|
||||
#define DEFAULT_DEVICE_MAP DEFAULT_DIRECTORY "/device.map"
|
||||
|
||||
extern char *progname;
|
||||
extern int verbosity;
|
||||
|
||||
void EXPORT_FUNC(grub_util_warn) (const char *fmt, ...);
|
||||
void EXPORT_FUNC(grub_util_info) (const char *fmt, ...);
|
||||
void EXPORT_FUNC(grub_util_error) (const char *fmt, ...) __attribute__ ((noreturn));
|
||||
|
||||
void *xmalloc (size_t size);
|
||||
void *xrealloc (void *ptr, size_t size);
|
||||
char *xstrdup (const char *str);
|
||||
#include <grub/emu/misc.h>
|
||||
|
||||
char *grub_util_get_path (const char *dir, const char *file);
|
||||
size_t grub_util_get_fp_size (FILE *fp);
|
||||
|
@ -59,20 +40,6 @@ void grub_util_write_image (const char *img, size_t size, FILE *out);
|
|||
void grub_util_write_image_at (const void *img, size_t size, off_t offset,
|
||||
FILE *out);
|
||||
|
||||
#ifndef HAVE_VASPRINTF
|
||||
|
||||
int vasprintf (char **buf, const char *fmt, va_list ap);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ASPRINTF
|
||||
|
||||
int asprintf (char **buf, const char *fmt, ...);
|
||||
|
||||
#endif
|
||||
|
||||
char *xasprintf (const char *fmt, ...);
|
||||
|
||||
#ifdef __MINGW32__
|
||||
|
||||
#define fseeko fseeko64
|
||||
|
|
|
@ -181,7 +181,8 @@ typedef enum grub_video_driver_id
|
|||
GRUB_VIDEO_DRIVER_VBE,
|
||||
GRUB_VIDEO_DRIVER_EFI_UGA,
|
||||
GRUB_VIDEO_DRIVER_EFI_GOP,
|
||||
GRUB_VIDEO_DRIVER_SM712
|
||||
GRUB_VIDEO_DRIVER_SM712,
|
||||
GRUB_VIDEO_DRIVER_VGA
|
||||
} grub_video_driver_id_t;
|
||||
|
||||
struct grub_video_adapter
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue