summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile9
-rwxr-xr-xsrc/ddhardrescue.c14
-rw-r--r--src/essais/test.c1
-rwxr-xr-xsrc/recover.c1
4 files changed, 17 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 6aa9d44..d49717f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,10 @@
BIN=ddhardrescue
-CFLAGS=-Iinc -Wall -g -pg
+CFLAGS=-Iinc -Wall -Werror -Wfatal-errors -g -pg
LIBS=-lpanel -lncurses -lpthread
-
#FIXME : liste des dépendances = tous les .c trouvés. C'est nul.
+
+all: $(BIN)
$(BIN): bin/$(BIN)
bin/$(BIN): obj/$(BIN).o $(patsubst src/%.c,obj/%.o,$(wildcard src/*.c))
@@ -22,5 +23,9 @@ Makefile src/%.c inc/%.h: ;
clean:
-rm -f obj/*.o deps/*.d bin/*
+cont:
+ while true; do clear; date; LANG=C make; echo "make returns '$$?'";\
+ inotifywait -e modify -r . --exclude '(~$$|\.swp$$)' 2>/dev/null; done
+
include $(patsubst src/%.c,deps/%.d,$(wildcard src/*.c))
diff --git a/src/ddhardrescue.c b/src/ddhardrescue.c
index 486ea41..9f0f0f8 100755
--- a/src/ddhardrescue.c
+++ b/src/ddhardrescue.c
@@ -9,14 +9,11 @@
#include "recover.h"
#include "utils.h"
+
int end=0;
+//FIXME remove me, only for tests
unsigned long c=0;
-struct threadArgs {
- struct progArgs *progArgs;
- struct slices_manage_t *slices;
-};
-
typedef enum { E_BOUND, E_TYPE } sliceEventKind_t;
typedef struct {
@@ -25,6 +22,11 @@ typedef struct {
void (*slices_listener)(sliceEventKind_t eventKind, slices_t *slices, slice_t *slice);
} slices_manage_t;
+struct threadArgs {
+ struct progArgs *progArgs;
+ slices_manage_t *slices;
+};
+
void sigHookAbrt() {
end=1;
@@ -115,6 +117,8 @@ int main(int argc, char **argv) {
free(toFree);
}
free(slices.data);
+
+ return 0;
}
void * procWorker(void *a) {
diff --git a/src/essais/test.c b/src/essais/test.c
index f8ce2b7..3a3e73f 100644
--- a/src/essais/test.c
+++ b/src/essais/test.c
@@ -1,6 +1,5 @@
#include <ncurses.h>
-
WINDOW *create_newwin(int height, int width, int starty, int startx)
{ WINDOW *local_win;
diff --git a/src/recover.c b/src/recover.c
index dc88877..ce098c2 100755
--- a/src/recover.c
+++ b/src/recover.c
@@ -2,6 +2,7 @@
#include <stdio.h>
#include "recover.h"
+
extern unsigned long c;
slices_t *recover(char *src, char *dst, char *ddOpts, address_t beginSector, address_t endSector/*, int depth*/) {