Merge branch 'master' into next
This commit is contained in:
commit
6b8503baab
2
Makefile
2
Makefile
|
@ -825,7 +825,7 @@ prepare prepare-all: prepare0
|
|||
# Leave this as default for preprocessing barebox.lds.S, which is now
|
||||
# done in arch/$(ARCH)/kernel/Makefile
|
||||
|
||||
export CPPFLAGS_barebox.lds += -P -C -U$(ARCH)
|
||||
export CPPFLAGS_barebox.lds += -C -U$(ARCH)
|
||||
|
||||
# FIXME: The asm symlink changes when $(ARCH) changes. That's
|
||||
# hard to detect, but I suppose "make mrproper" is a good idea
|
||||
|
|
|
@ -121,7 +121,7 @@ endif
|
|||
|
||||
TEXT_BASE = $(CONFIG_TEXT_BASE)
|
||||
|
||||
CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -P
|
||||
CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
|
||||
|
||||
ifndef CONFIG_MODULES
|
||||
# Add cleanup flags
|
||||
|
|
|
@ -53,7 +53,7 @@ static int do_bootz(struct command *cmdtp, int argc, char *argv[])
|
|||
|
||||
if (!usemap) {
|
||||
header = &__header;
|
||||
ret = read(fd, header, sizeof(header));
|
||||
ret = read(fd, header, sizeof(*header));
|
||||
if (ret < sizeof(*header)) {
|
||||
printf("could not read %s\n", argv[1]);
|
||||
goto err_out;
|
||||
|
@ -89,10 +89,10 @@ static int do_bootz(struct command *cmdtp, int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
memcpy(zimage, &header, sizeof(header));
|
||||
memcpy(zimage, header, sizeof(*header));
|
||||
|
||||
ret = read(fd, zimage + sizeof(header), end - sizeof(header));
|
||||
if (ret < end - sizeof(header)) {
|
||||
ret = read(fd, zimage + sizeof(*header), end - sizeof(*header));
|
||||
if (ret < end - sizeof(*header)) {
|
||||
printf("could not read %s\n", argv[1]);
|
||||
goto err_out1;
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ cpu-$(CONFIG_BF561) := bf561
|
|||
|
||||
TEXT_BASE = $(CONFIG_TEXT_BASE)
|
||||
|
||||
CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -P
|
||||
CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
|
||||
CFLAGS += -D__blackfin__
|
||||
# -Ttext $(TEXT_BASE)
|
||||
KALLSYMS += --symbol-prefix=_
|
||||
|
|
|
@ -14,7 +14,7 @@ cpu-$(CONFIG_ARCH_MPC5200) := mpc5xxx
|
|||
|
||||
TEXT_BASE = $(CONFIG_TEXT_BASE)
|
||||
|
||||
CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -P
|
||||
CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
|
||||
|
||||
# Add cleanup flags
|
||||
ifndef CONFIG_MODULES
|
||||
|
|
|
@ -10,7 +10,6 @@ lds-y := $(BOARD)/barebox.lds
|
|||
|
||||
TEXT_BASE = $(CONFIG_TEXT_BASE)
|
||||
|
||||
CPPFLAGS += -P
|
||||
CFLAGS += -Dmalloc=barebox_malloc \
|
||||
-Dfree=barebox_free -Drealloc=barebox_realloc \
|
||||
-Dread=barebox_read -Dwrite=barebox_write \
|
||||
|
|
|
@ -8,7 +8,6 @@ else
|
|||
CPPFLAGS = $(patsubst %,-I$(srctree)/%include,$(machdirs))
|
||||
endif
|
||||
|
||||
CPPFLAGS += -P
|
||||
CFLAGS := -Wall
|
||||
NOSTDINC_FLAGS :=
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ machine-y := i386
|
|||
|
||||
TEXT_BASE = $(CONFIG_TEXT_BASE)
|
||||
|
||||
CPPFLAGS += -march=i386 -m32 -DTEXT_BASE=$(TEXT_BASE) -P
|
||||
CPPFLAGS += -march=i386 -m32 -DTEXT_BASE=$(TEXT_BASE)
|
||||
LDFLAGS += -m elf_i386
|
||||
|
||||
ifndef CONFIG_MODULES
|
||||
|
|
18
fs/fs.c
18
fs/fs.c
|
@ -293,9 +293,13 @@ static int path_check_prereq(const char *path, unsigned int flags)
|
|||
struct stat s;
|
||||
unsigned int m;
|
||||
|
||||
errno = 0;
|
||||
|
||||
if (stat(path, &s)) {
|
||||
if (flags & S_UB_DOES_NOT_EXIST)
|
||||
return 0;
|
||||
if (flags & S_UB_DOES_NOT_EXIST) {
|
||||
errno = 0;
|
||||
goto out;
|
||||
}
|
||||
errno = -ENOENT;
|
||||
goto out;
|
||||
}
|
||||
|
@ -305,8 +309,10 @@ static int path_check_prereq(const char *path, unsigned int flags)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (flags == S_UB_EXISTS)
|
||||
return 0;
|
||||
if (flags == S_UB_EXISTS) {
|
||||
errno = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
m = s.st_mode;
|
||||
|
||||
|
@ -325,7 +331,6 @@ static int path_check_prereq(const char *path, unsigned int flags)
|
|||
goto out;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
out:
|
||||
return errno;
|
||||
}
|
||||
|
@ -346,8 +351,9 @@ int chdir(const char *pathname)
|
|||
|
||||
strcpy(cwd, p);
|
||||
|
||||
free(p);
|
||||
out:
|
||||
free(p);
|
||||
|
||||
return errno;
|
||||
}
|
||||
EXPORT_SYMBOL(chdir);
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
*/
|
||||
|
||||
/* serial stuff */
|
||||
void serial_printf(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
|
||||
void serial_printf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2)));
|
||||
|
||||
/* stdin */
|
||||
int tstc(void);
|
||||
|
@ -30,12 +30,12 @@ static inline void putchar(char c)
|
|||
console_putc(CONSOLE_STDOUT, c);
|
||||
}
|
||||
|
||||
int printf(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
|
||||
int printf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2)));
|
||||
int vprintf(const char *fmt, va_list args);
|
||||
int sprintf(char *buf, const char *fmt, ...) __attribute__ ((format(printf, 2, 3)));
|
||||
int snprintf(char *buf, size_t size, const char *fmt, ...) __attribute__ ((format(printf, 3, 4)));
|
||||
int sprintf(char *buf, const char *fmt, ...) __attribute__ ((format(__printf__, 2, 3)));
|
||||
int snprintf(char *buf, size_t size, const char *fmt, ...) __attribute__ ((format(__printf__, 3, 4)));
|
||||
int vsprintf(char *buf, const char *fmt, va_list args);
|
||||
char *asprintf(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
|
||||
char *asprintf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2)));
|
||||
char *vasprintf(const char *fmt, va_list ap);
|
||||
int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
|
||||
int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
|
||||
|
@ -54,7 +54,7 @@ int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);
|
|||
#define stderr 2
|
||||
#define MAX_FILES 128
|
||||
|
||||
void fprintf(int file, const char *fmt, ...) __attribute__ ((format(printf, 2, 3)));
|
||||
void fprintf(int file, const char *fmt, ...) __attribute__ ((format(__printf__, 2, 3)));
|
||||
int fputs(int file, const char *s);
|
||||
int fputc(int file, const char c);
|
||||
int ftstc(int file);
|
||||
|
|
|
@ -244,7 +244,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(always)
|
|||
# Linker scripts preprocessor (.lds.S -> .lds)
|
||||
# ---------------------------------------------------------------------------
|
||||
quiet_cmd_cpp_lds_S = LDS $@
|
||||
cmd_cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ -o $@ $<
|
||||
cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -D__ASSEMBLY__ -o $@ $<
|
||||
|
||||
%.lds: %.lds.S FORCE
|
||||
$(call if_changed_dep,cpp_lds_S)
|
||||
|
|
|
@ -1300,7 +1300,7 @@ static void read_symbols(char *modname)
|
|||
* following helper, then compare to the file on disk and
|
||||
* only update the later if anything changed */
|
||||
|
||||
void __attribute__((format(printf, 2, 3))) buf_printf(struct buffer *buf,
|
||||
void __attribute__((format(__printf__, 2, 3))) buf_printf(struct buffer *buf,
|
||||
const char *fmt, ...)
|
||||
{
|
||||
char tmp[SZ];
|
||||
|
|
|
@ -94,7 +94,7 @@ struct buffer {
|
|||
int size;
|
||||
};
|
||||
|
||||
void __attribute__((format(printf, 2, 3)))
|
||||
void __attribute__((format(__printf__, 2, 3)))
|
||||
buf_printf(struct buffer *buf, const char *fmt, ...);
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue