Merge grub-file into mainline
This commit is contained in:
commit
e4ff66281a
9 changed files with 29 additions and 16 deletions
13
ChangeLog
13
ChangeLog
|
@ -1,3 +1,16 @@
|
||||||
|
2010-03-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
Don't use __FILE__.
|
||||||
|
|
||||||
|
* genmk.rb: Add -DGRUB_FILE to all C targets.
|
||||||
|
* fs/reiserfs.c: Replace __FILE__ with GRUB_FILE.
|
||||||
|
* include/grub/list.h: Likewise.
|
||||||
|
* include/grub/misc.h: Likewise.
|
||||||
|
* include/grub/mm.h: Likewise.
|
||||||
|
* include/grub/test.h: Likewise.
|
||||||
|
* kern/mm.c: Likewise.
|
||||||
|
* lib/libgcrypt_wrap/cipher_wrap.h: Likewise.
|
||||||
|
|
||||||
2010-03-26 Vladimir Serbinenko <phcoder@gmail.com>
|
2010-03-26 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Sunpc partitions support.
|
Sunpc partitions support.
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
|
|
||||||
static grub_dl_t my_mod;
|
static grub_dl_t my_mod;
|
||||||
|
|
||||||
#define assert(boolean) real_assert (boolean, __FILE__, __LINE__)
|
#define assert(boolean) real_assert (boolean, GRUB_FILE, __LINE__)
|
||||||
static inline void
|
static inline void
|
||||||
real_assert (int boolean, const char *file, const int line)
|
real_assert (int boolean, const char *file, const int line)
|
||||||
{
|
{
|
||||||
|
|
10
genmk.rb
10
genmk.rb
|
@ -91,7 +91,7 @@ endif
|
||||||
dir = File.dirname(src)
|
dir = File.dirname(src)
|
||||||
|
|
||||||
"#{obj}: #{src} $(#{src}_DEPENDENCIES)
|
"#{obj}: #{src} $(#{src}_DEPENDENCIES)
|
||||||
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -MD -c -o $@ $<
|
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -DGRUB_FILE=\\\"#{src}\\\" -MD -c -o $@ $<
|
||||||
-include #{dep}
|
-include #{dep}
|
||||||
|
|
||||||
"
|
"
|
||||||
|
@ -171,7 +171,7 @@ endif
|
||||||
$(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ #{objs_str}
|
$(TARGET_CC) $(#{prefix}_LDFLAGS) $(TARGET_LDFLAGS) -Wl,-r,-d -o $@ #{objs_str}
|
||||||
|
|
||||||
#{mod_obj}: #{mod_src}
|
#{mod_obj}: #{mod_src}
|
||||||
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(#{prefix}_CFLAGS) -c -o $@ $<
|
$(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) $(#{prefix}_CFLAGS) -DGRUB_FILE=\\\"#{mod_src}\\\" -c -o $@ $<
|
||||||
|
|
||||||
#{mod_src}: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
|
#{mod_src}: $(builddir)/moddep.lst $(srcdir)/genmodsrc.sh
|
||||||
sh $(srcdir)/genmodsrc.sh '#{mod_name}' $< > $@ || (rm -f $@; exit 1)
|
sh $(srcdir)/genmodsrc.sh '#{mod_name}' $< > $@ || (rm -f $@; exit 1)
|
||||||
|
@ -205,7 +205,7 @@ endif
|
||||||
dir = File.dirname(src)
|
dir = File.dirname(src)
|
||||||
|
|
||||||
"#{obj}: #{src} $(#{src}_DEPENDENCIES)
|
"#{obj}: #{src} $(#{src}_DEPENDENCIES)
|
||||||
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -MD -c -o $@ $<
|
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -DGRUB_FILE=\\\"#{src}\\\" -MD -c -o $@ $<
|
||||||
-include #{dep}
|
-include #{dep}
|
||||||
|
|
||||||
clean-module-#{extra_target}.#{@rule_count}:
|
clean-module-#{extra_target}.#{@rule_count}:
|
||||||
|
@ -307,7 +307,7 @@ MOSTLYCLEAN_UTILITY_TARGETS += mostlyclean-utility-#{@name}.#{@rule_count}
|
||||||
dir = File.dirname(src)
|
dir = File.dirname(src)
|
||||||
|
|
||||||
"#{obj}: #{src} $(#{src}_DEPENDENCIES)
|
"#{obj}: #{src} $(#{src}_DEPENDENCIES)
|
||||||
$(CC) -I#{dir} -I$(srcdir)/#{dir} $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(#{prefix}_CFLAGS) -MD -c -o $@ $<
|
$(CC) -I#{dir} -I$(srcdir)/#{dir} $(CPPFLAGS) $(CFLAGS) -DGRUB_UTIL=1 $(#{prefix}_CFLAGS) -DGRUB_FILE=\\\"#{src}\\\" -MD -c -o $@ $<
|
||||||
-include #{dep}
|
-include #{dep}
|
||||||
|
|
||||||
"
|
"
|
||||||
|
@ -354,7 +354,7 @@ endif
|
||||||
dir = File.dirname(src)
|
dir = File.dirname(src)
|
||||||
|
|
||||||
"#{obj}: #{src} $(#{src}_DEPENDENCIES)
|
"#{obj}: #{src} $(#{src}_DEPENDENCIES)
|
||||||
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -MD -c -o $@ $<
|
$(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -DGRUB_FILE=\\\"#{src}\\\" -MD -c -o $@ $<
|
||||||
|
|
||||||
-include #{dep}
|
-include #{dep}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ grub_bad_type_cast_real (int line, const char *file)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define grub_bad_type_cast() grub_bad_type_cast_real(__LINE__, __FILE__)
|
#define grub_bad_type_cast() grub_bad_type_cast_real(__LINE__, GRUB_FILE)
|
||||||
|
|
||||||
#define GRUB_FIELD_MATCH(ptr, type, field) \
|
#define GRUB_FIELD_MATCH(ptr, type, field) \
|
||||||
((char *) &(ptr)->field == (char *) &((type) (ptr))->field)
|
((char *) &(ptr)->field == (char *) &((type) (ptr))->field)
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
#define ARRAY_SIZE(array) (sizeof (array) / sizeof (array[0]))
|
#define ARRAY_SIZE(array) (sizeof (array) / sizeof (array[0]))
|
||||||
#define COMPILE_TIME_ASSERT(cond) switch (0) { case 1: case !(cond): ; }
|
#define COMPILE_TIME_ASSERT(cond) switch (0) { case 1: case !(cond): ; }
|
||||||
|
|
||||||
#define grub_dprintf(condition, fmt, args...) grub_real_dprintf(__FILE__, __LINE__, condition, fmt, ## args)
|
#define grub_dprintf(condition, fmt, args...) grub_real_dprintf(GRUB_FILE, __LINE__, condition, fmt, ## args)
|
||||||
/* XXX: If grub_memmove is too slow, we must implement grub_memcpy. */
|
/* XXX: If grub_memmove is too slow, we must implement grub_memcpy. */
|
||||||
#define grub_memcpy(d,s,n) grub_memmove ((d), (s), (n))
|
#define grub_memcpy(d,s,n) grub_memmove ((d), (s), (n))
|
||||||
|
|
||||||
|
|
|
@ -44,19 +44,19 @@ void grub_mm_dump_free (void);
|
||||||
void grub_mm_dump (unsigned lineno);
|
void grub_mm_dump (unsigned lineno);
|
||||||
|
|
||||||
#define grub_malloc(size) \
|
#define grub_malloc(size) \
|
||||||
grub_debug_malloc (__FILE__, __LINE__, size)
|
grub_debug_malloc (GRUB_FILE, __LINE__, size)
|
||||||
|
|
||||||
#define grub_zalloc(size) \
|
#define grub_zalloc(size) \
|
||||||
grub_debug_zalloc (__FILE__, __LINE__, size)
|
grub_debug_zalloc (GRUB_FILE, __LINE__, size)
|
||||||
|
|
||||||
#define grub_realloc(ptr,size) \
|
#define grub_realloc(ptr,size) \
|
||||||
grub_debug_realloc (__FILE__, __LINE__, ptr, size)
|
grub_debug_realloc (GRUB_FILE, __LINE__, ptr, size)
|
||||||
|
|
||||||
#define grub_memalign(align,size) \
|
#define grub_memalign(align,size) \
|
||||||
grub_debug_memalign (__FILE__, __LINE__, align, size)
|
grub_debug_memalign (GRUB_FILE, __LINE__, align, size)
|
||||||
|
|
||||||
#define grub_free(ptr) \
|
#define grub_free(ptr) \
|
||||||
grub_debug_free (__FILE__, __LINE__, ptr)
|
grub_debug_free (GRUB_FILE, __LINE__, ptr)
|
||||||
|
|
||||||
void *EXPORT_FUNC(grub_debug_malloc) (const char *file, int line,
|
void *EXPORT_FUNC(grub_debug_malloc) (const char *file, int line,
|
||||||
grub_size_t size);
|
grub_size_t size);
|
||||||
|
|
|
@ -54,7 +54,7 @@ void grub_test_nonzero (int cond, const char *file,
|
||||||
|
|
||||||
/* Macro to fill in location details and an optional error message. */
|
/* Macro to fill in location details and an optional error message. */
|
||||||
#define grub_test_assert(cond, ...) \
|
#define grub_test_assert(cond, ...) \
|
||||||
grub_test_nonzero(cond, __FILE__, __FUNCTION__, __LINE__, \
|
grub_test_nonzero(cond, GRUB_FILE, __FUNCTION__, __LINE__, \
|
||||||
## __VA_ARGS__, \
|
## __VA_ARGS__, \
|
||||||
"assert failed: %s", #cond)
|
"assert failed: %s", #cond)
|
||||||
|
|
||||||
|
|
|
@ -388,7 +388,7 @@ grub_free (void *ptr)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
grub_printf ("%s:%d: q=%p, q->size=0x%x, q->magic=0x%x\n",
|
grub_printf ("%s:%d: q=%p, q->size=0x%x, q->magic=0x%x\n",
|
||||||
__FILE__, __LINE__, q, q->size, q->magic);
|
GRUB_FILE, __LINE__, q, q->size, q->magic);
|
||||||
q = q->next;
|
q = q->next;
|
||||||
}
|
}
|
||||||
while (q != r->first);
|
while (q != r->first);
|
||||||
|
|
|
@ -59,7 +59,7 @@ typedef union {
|
||||||
double g;
|
double g;
|
||||||
} PROPERLY_ALIGNED_TYPE;
|
} PROPERLY_ALIGNED_TYPE;
|
||||||
|
|
||||||
#define gcry_assert(x) grub_assert_real(__FILE__, __LINE__, x)
|
#define gcry_assert(x) grub_assert_real(GRUB_FILE, __LINE__, x)
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
grub_assert_real (const char *file, int line, int cond)
|
grub_assert_real (const char *file, int line, int cond)
|
||||||
|
|
Loading…
Reference in a new issue