[PATCH v2 4/7] move parseopt to lib/

Antony Pavlov antonynpavlov at gmail.com
Sun Jan 14 13:22:49 PST 2018


Signed-off-by: Antony Pavlov <antonynpavlov at gmail.com>
---
 fs/Makefile                | 2 +-
 fs/fs.c                    | 3 +--
 fs/nfs.c                   | 3 +--
 {fs => include}/parseopt.h | 0
 lib/Makefile               | 1 +
 {fs => lib}/parseopt.c     | 0
 6 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/fs/Makefile b/fs/Makefile
index b3f929f506..8e3fd78e92 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -4,7 +4,7 @@ obj-$(CONFIG_FS_RAMFS)	+= ramfs.o
 obj-y			+= devfs-core.o
 obj-$(CONFIG_FS_DEVFS)	+= devfs.o
 obj-$(CONFIG_FS_FAT)	+= fat/
-obj-y	+= fs.o parseopt.o
+obj-y	+= fs.o
 obj-$(CONFIG_FS_UBIFS)	+= ubifs/
 obj-$(CONFIG_FS_TFTP)	+= tftp.o
 obj-$(CONFIG_FS_OMAP4_USBBOOT)	+= omap4_usbbootfs.o
diff --git a/fs/fs.c b/fs/fs.c
index f61ee091b5..ccb4943669 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -35,8 +35,7 @@
 #include <libgen.h>
 #include <block.h>
 #include <libfile.h>
-
-#include "parseopt.h"
+#include <parseopt.h>
 
 char *mkmodestr(unsigned long mode, char *str)
 {
diff --git a/fs/nfs.c b/fs/nfs.c
index 97f01cfb34..75cd127eeb 100644
--- a/fs/nfs.c
+++ b/fs/nfs.c
@@ -36,8 +36,7 @@
 #include <linux/sizes.h>
 #include <byteorder.h>
 #include <globalvar.h>
-
-#include "parseopt.h"
+#include <parseopt.h>
 
 #define SUNRPC_PORT     111
 
diff --git a/fs/parseopt.h b/include/parseopt.h
similarity index 100%
rename from fs/parseopt.h
rename to include/parseopt.h
diff --git a/lib/Makefile b/lib/Makefile
index 1be1742499..8f7ef4e4ed 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -59,3 +59,4 @@ obj-y			+= reed_solomon/
 obj-$(CONFIG_RATP)	+= ratp.o
 obj-y			+= list_sort.o
 obj-y			+= int_sqrt.o
+obj-y			+= parseopt.o
diff --git a/fs/parseopt.c b/lib/parseopt.c
similarity index 100%
rename from fs/parseopt.c
rename to lib/parseopt.c
-- 
2.15.1




More information about the barebox mailing list