It needs to include linux-dev-lookup.h from local directory where
linux-dev-lookup.c is also located, to be able to use this as
a stand-alone library, which is useful for debugging purpose.
In fact, most of the files under oslib/ directory do things this way.
It also doesn't need to include os/os.h as it has no dependency.
--
# cat ./test10.c
#include <stdio.h>
#include "oslib/linux-dev-lookup.h"
int main(void) {
/* just to see if it compiles */
blktrace_lookup_device(NULL, NULL, 0, 0);
return 0;
}
# gcc -Wall -g ./test10.c oslib/linux-dev-lookup.c
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
#include <stdio.h>
#include <unistd.h>
-#include "../os/os.h"
-#include "oslib/linux-dev-lookup.h"
+#include "linux-dev-lookup.h"
int blktrace_lookup_device(const char *redirect, char *path, unsigned int maj,
unsigned int min)