BUILD_CPU := $(shell uname -m)
BUILD_OS := $(shell uname -o)
-KERNELHDR := ../include # mtd-utils private headers
-DESTDIR := /usr/local # default installation
-SBINDIR := bin # default directory for binaries
+KERNELHDR := ../include
+DESTDIR := /usr/local
+SBINDIR := bin
CC := $(CROSS)gcc
CFLAGS := -I./inc -I./src -I$(KERNELHDR) -O2 -g -Wall -Werror \
goto err;
}
- if (strcmp(args.file_out_data, "") != 0) {
+ if (args.file_out_data) {
fp_out_data = fopen(args.file_out_data, "wb");
if (fp_out_data == NULL) {
err_sys("Cannot open file %s for output\n",
}
}
- if (strcmp(args.file_out_oob, "") != 0) {
+ if (args.file_out_oob) {
fp_out_oob = fopen(args.file_out_oob, "wb");
if (fp_out_oob == NULL) {
err_sys("Cannot open file %s for output\n",
if (rc != 0) {
err_msg("Error during conversion. rc: %d\n", rc);
- remove(args.file_out_data);
- remove(args.file_out_oob);
+ if (args.file_out_data)
+ remove(args.file_out_data);
+ if (args.file_out_oob)
+ remove(args.file_out_oob);
}
return rc;
}