Minor restructure

This commit is contained in:
topjohnwu 2016-12-09 15:57:10 +08:00
parent c9157cc13b
commit 0ccc92dc1e
7 changed files with 7 additions and 6 deletions

View File

@ -12,7 +12,7 @@ include $(BUILD_EXECUTABLE)
include $(CLEAR_VARS) include $(CLEAR_VARS)
LOCAL_MODULE := bootimgtools LOCAL_MODULE := bootimgtools
LOCAL_MODULE_TAGS := optional LOCAL_MODULE_TAGS := optional
LOCAL_SRC_FILES := bootimgtools.c extract.c repack.c hexpatch.c LOCAL_SRC_FILES := bootimgtools/main.c bootimgtools/extract.c bootimgtools/repack.c bootimgtools/hexpatch.c
LOCAL_CFLAGS += -std=gnu11 LOCAL_CFLAGS += -std=gnu11
include $(BUILD_EXECUTABLE) include $(BUILD_EXECUTABLE)

View File

@ -9,7 +9,7 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include "bootimgtools.h" #include "bootimg.h"
void dump(uint8_t *ptr, size_t size, char* filename) { void dump(uint8_t *ptr, size_t size, char* filename) {
unlink(filename); unlink(filename);

View File

@ -7,7 +7,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include "bootimgtools.h" #include "bootimg.h"
int hex2int(char c) { int hex2int(char c) {
int first = c / 16 - 3; int first = c / 16 - 3;

View File

@ -1,7 +1,7 @@
#include <getopt.h> #include <getopt.h>
#include <stdio.h> #include <stdio.h>
#include "bootimgtools.h" #include "bootimg.h"
/******************** /********************
Patch Boot Image Patch Boot Image

View File

@ -9,7 +9,7 @@
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include "bootimgtools.h" #include "bootimg.h"
off_t file_size(char *filename) { off_t file_size(char *filename) {
struct stat st; struct stat st;

View File

@ -150,7 +150,8 @@ void quit_pthread(int sig) {
pthread_exit(NULL); pthread_exit(NULL);
} }
void *monitor_list(void *listpath) { void *monitor_list(void *path) {
char* listpath = (char*) path;
signal(SIGQUIT, quit_pthread); signal(SIGQUIT, quit_pthread);
int inotifyFd = -1; int inotifyFd = -1;