[PATCH 9/9] Make oslib/linux-dev-lookup.c a stand-alone library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tomohiro Kusumi <tkusumi@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 oslib/linux-dev-lookup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/oslib/linux-dev-lookup.c b/oslib/linux-dev-lookup.c
index 2bbd14a..5fbccd3 100644
--- a/oslib/linux-dev-lookup.c
+++ b/oslib/linux-dev-lookup.c
@@ -5,8 +5,7 @@
 #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)
-- 
2.9.3

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux