diff -Ncwr dmidecode-2.9.orig/Makefile.brv dmidecode-2.9/Makefile.brv *** dmidecode-2.9.orig/Makefile.brv 1970-01-01 09:00:00.000000000 +0900 --- dmidecode-2.9/Makefile.brv 2007-09-27 20:14:37.000000000 +0900 *************** *** 0 **** --- 1,107 ---- + # + # @(#)Makefile + # GNU make 用 + # + # make の方法 + # ・make + # リリース用の正式版を作成 + # ・make mode=debug + # デバッグ用に作成 + # ・make clean + # make で作成した全てのファイルを削除 + # ・make install + # 規定の場所にインストール + # + + # ソースの依存関係ファイル (自動生成) + DEPS = Dependencies + DEPENDENCIES_OUTPUT := $(DEPS) + + # 標準ルール + include $(BD)/unix/etc/makerules + + #----------------------------------------------------------------------------- + TARGET1 = dmidecode + TARGET2 = biosdecode + TARGET3 = ownership + TARGET4 = vpddecode + + # ソースファイルのサーチパス + S = ../src + VPATH = $S + HEADER += $(S) + + # ソースファイル + SRC1 = dmidecode.c dmiopt.c dmioem.c util.c + SRC2 = biosdecode.c util.c + SRC3 = ownership.c util.c + SRC4 = vpddecode.c vpdopt.c util.c + + OBJ1 = $(addsuffix .o, $(basename $(SRC1))) + OBJ2 = $(addsuffix .o, $(basename $(SRC2))) + OBJ3 = $(addsuffix .o, $(basename $(SRC3))) + OBJ4 = $(addsuffix .o, $(basename $(SRC4))) + + WC_SRC1 = $(filter %.C, $(SRC1)) + WC_SRC2 = $(filter %.C, $(SRC2)) + WC_SRC3 = $(filter %.C, $(SRC3)) + WC_SRC4 = $(filter %.C, $(SRC4)) + + # 追加ライブラリ + LOADLIBES = -lapp + + # コンパイルオプション + CFLAGS = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \ + -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef + + #----------------------------------------------------------------------------- + .PHONY: all install clean + + ALL = $(TARGET1) $(addsuffix .map, $(TARGET1)) \ + $(TARGET2) $(addsuffix .map, $(TARGET2)) \ + $(TARGET3) $(addsuffix .map, $(TARGET3)) \ + $(TARGET4) $(addsuffix .map, $(TARGET4)) + + all: $(ALL) + $(BD)/etc/bzcomp -v -s $(TARGET1) + $(BD)/etc/bzcomp -v -s $(TARGET2) + $(BD)/etc/bzcomp -v -s $(TARGET3) + $(BD)/etc/bzcomp -v -s $(TARGET4) + + $(TARGET1): $(OBJ1) + $(LINK.o) $(LDOBJS) $^ $(LOADLIBES) $(LDLIBS) $(OUTPUT_OPTION) + $(TARGET2): $(OBJ2) + $(LINK.o) $(LDOBJS) $^ $(LOADLIBES) $(LDLIBS) $(OUTPUT_OPTION) + $(TARGET3): $(OBJ3) + $(LINK.o) $(LDOBJS) $^ $(LOADLIBES) $(LDLIBS) $(OUTPUT_OPTION) + $(TARGET4): $(OBJ4) + $(LINK.o) $(LDOBJS) $^ $(LOADLIBES) $(LDLIBS) $(OUTPUT_OPTION) + + clean: + $(RM) $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4) \ + $(WC_SRC1:%.C=%.c) $(WC_SRC2:%.C=%.c) \ + $(WC_SRC3:%.C=%.c) $(WC_SRC4:%.C=%.c) \ + $(ALL) $(DEPS) + + install: $(addprefix $(EXE_INSTALLDIR)/, $(ALL)) + + $(TARGET:%=$(EXE_INSTALLDIR)/%): $(EXE_INSTALLDIR)/%: % + $(EXE_INSTALL_STRIP) + + # ソースの依存関係 + $(WC_SRC1:%.C=%.c): + $(WC_SRC2:%.C=%.c): + $(WC_SRC3:%.C=%.c): + $(WC_SRC4:%.C=%.c): + + $(OBJ1): + $(OBJ2): + $(OBJ3): + $(OBJ4): + + ifdef DEPENDENCIES_OUTPUT + $(DEPS): ; touch $(DEPS) + else + $(DEPS): $(SRC) ; $(MAKEDEPS) $@ $? + endif + include $(DEPS) diff -Ncwr dmidecode-2.9.orig/biosdecode.c dmidecode-2.9/biosdecode.c *** dmidecode-2.9.orig/biosdecode.c 2007-02-26 21:02:13.000000000 +0900 --- dmidecode-2.9/biosdecode.c 2007-09-27 20:19:05.000000000 +0900 *************** *** 58,64 **** #include #include #include ! #include #include "version.h" #include "config.h" --- 58,64 ---- #include #include #include ! //#include #include "version.h" #include "config.h" *************** *** 503,509 **** static int fjkeyinf_decode(const u8 *p, size_t len) { ! (void) len; int i; printf("Fujitsu application panel present.\n"); --- 503,509 ---- static int fjkeyinf_decode(const u8 *p, size_t len) { ! // (void) len; int i; printf("Fujitsu application panel present.\n"); *************** *** 556,561 **** --- 556,562 ---- /* Return -1 on error, 0 on success */ static int parse_command_line(int argc, char * const argv[]) { + #if 0 int option; const char *optstring = "d:hV"; struct option longopts[]={ *************** *** 580,585 **** --- 581,587 ---- case '?': return -1; } + #endif return 0; } diff -Ncwr dmidecode-2.9.orig/dmiopt.c dmidecode-2.9/dmiopt.c *** dmidecode-2.9.orig/dmiopt.c 2007-02-12 05:10:59.000000000 +0900 --- dmidecode-2.9/dmiopt.c 2007-09-27 20:17:32.000000000 +0900 *************** *** 22,28 **** #include #include #include ! #include #include "config.h" #include "types.h" --- 22,28 ---- #include #include #include ! //#include #include "config.h" #include "types.h" *************** *** 214,219 **** --- 214,220 ---- /* Return -1 on error, 0 on success */ int parse_command_line(int argc, char * const argv[]) { + #if 0 int option; const char *optstring = "d:hqs:t:uV"; struct option longopts[]={ *************** *** 269,274 **** --- 270,276 ---- } return -1; } + #endif if(opt.type!=NULL && opt.string!=NULL) { diff -Ncwr dmidecode-2.9.orig/ownership.c dmidecode-2.9/ownership.c *** dmidecode-2.9.orig/ownership.c 2005-08-25 17:40:03.000000000 +0900 --- dmidecode-2.9/ownership.c 2007-09-27 20:19:25.000000000 +0900 *************** *** 33,39 **** #include #include #include ! #include #include "version.h" #include "config.h" --- 33,39 ---- #include #include #include ! //#include #include "version.h" #include "config.h" *************** *** 111,116 **** --- 111,117 ---- /* Return -1 on error, 0 on success */ static int parse_command_line(int argc, char * const argv[]) { + #if 0 int option; const char *optstring = "d:hV"; struct option longopts[]={ *************** *** 135,140 **** --- 136,142 ---- case '?': return -1; } + #endif return 0; } diff -Ncwr dmidecode-2.9.orig/util.c dmidecode-2.9/util.c *** dmidecode-2.9.orig/util.c 2005-02-13 01:53:19.000000000 +0900 --- dmidecode-2.9/util.c 2007-09-27 20:23:13.000000000 +0900 *************** *** 96,101 **** --- 96,110 ---- */ void *mem_chunk(size_t base, size_t len, const char *devmem) { + #if 1 + void *p; + + p = malloc(len); + if (p != NULL) memcpy(p, (void *)(0x80000000 | base), len); + + return p; + + #else void *p; int fd; #ifdef USE_MMAP *************** *** 162,165 **** --- 171,175 ---- perror(devmem); return p; + #endif } diff -Ncwr dmidecode-2.9.orig/vpdopt.c dmidecode-2.9/vpdopt.c *** dmidecode-2.9.orig/vpdopt.c 2007-02-12 05:10:59.000000000 +0900 --- dmidecode-2.9/vpdopt.c 2007-09-27 20:19:47.000000000 +0900 *************** *** 22,28 **** #include #include #include ! #include #include "config.h" #include "util.h" --- 22,28 ---- #include #include #include ! //#include #include "config.h" #include "util.h" *************** *** 91,96 **** --- 91,97 ---- /* Return -1 on error, 0 on success */ int parse_command_line(int argc, char * const argv[]) { + #if 0 int option; const char *optstring = "d:hs:uV"; struct option longopts[]={ *************** *** 132,137 **** --- 133,139 ---- } return -1; } + #endif if((opt.flags & FLAG_DUMP) && opt.string!=NULL) {