diff --git a/Makefile b/Makefile index b67b0f8a..8d8c0da4 100644 --- a/Makefile +++ b/Makefile @@ -6,4 +6,4 @@ all: make-bcache bcache-test clean: rm -f make-bcache bcache-test *.o -bcache-test: LDFLAGS += -lm -lssl +bcache-test: LDFLAGS += -lm -lssl -lcrypto diff --git a/bcache-test.c b/bcache-test.c index ab9c77eb..aa963a94 100644 --- a/bcache-test.c +++ b/bcache-test.c @@ -102,6 +102,9 @@ int main(int argc, char **argv) void *buf1 = NULL, *buf2 = NULL; struct pagestuff *pages, *p; unsigned char c[16]; + char *test; + + printf("strchr: %p\n", strchr); RC4_KEY writedata; RC4_set_key(&writedata, 16, bcache_magic); @@ -133,6 +136,8 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } + test = strchr(argv[i], ':'); + fd1 = open(argv[i], (destructive ? O_RDWR : O_RDONLY)|direct); if (!csum) fd2 = open(argv[i + 1], (destructive ? O_RDWR : O_RDONLY)|direct);