summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2010-10-13 10:09:53 -0400
committerSteve Dickson <steved@redhat.com>2010-10-13 10:26:09 -0400
commitc117b7a1f29db65d139824ba5bab2a58bf5609e2 (patch)
tree717b77e3279911c625ad59d4c7269c8258d86560
parent8c217b9623c8304608196aeb2f7360abfdf987c8 (diff)
downloadnfs-utils-c117b7a1f29db65d139824ba5bab2a58bf5609e2.tar.gz
nfs-utils-c117b7a1f29db65d139824ba5bab2a58bf5609e2.tar.xz
nfs-utils-c117b7a1f29db65d139824ba5bab2a58bf5609e2.zip
nfs-utils: Move common code into support
There are several source files and headers present in the ./utils/idmapd directory which are also usable in a doimapd daemon. Because of this we move that support into the support directory such that it can be shared by both daemons. Signed-off-by: Jim Rees <rees@umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--support/include/nfslib.h6
-rw-r--r--support/nfs/Makefile.am2
-rw-r--r--support/nfs/atomicio.c (renamed from utils/idmapd/atomicio.c)0
-rw-r--r--support/nfs/strlcat.c (renamed from utils/idmapd/strlcat.c)0
-rw-r--r--support/nfs/strlcpy.c (renamed from utils/idmapd/strlcpy.c)0
-rw-r--r--utils/idmapd/Makefile.am4
-rw-r--r--utils/idmapd/idmapd.c4
7 files changed, 7 insertions, 9 deletions
diff --git a/support/include/nfslib.h b/support/include/nfslib.h
index 3db5bec..53ece0e 100644
--- a/support/include/nfslib.h
+++ b/support/include/nfslib.h
@@ -163,6 +163,12 @@ void closeall(int min);
int svctcp_socket (u_long __number, int __reuse);
int svcudp_socket (u_long __number);
+/* Misc shared code prototypes */
+size_t strlcat(char *, const char *, size_t);
+size_t strlcpy(char *, const char *, size_t);
+ssize_t atomicio(ssize_t (*f) (int, void*, size_t),
+ int, void *, size_t);
+
#define UNUSED(x) UNUSED_ ## x __attribute__((unused))
diff --git a/support/nfs/Makefile.am b/support/nfs/Makefile.am
index 60400b2..05c2fc4 100644
--- a/support/nfs/Makefile.am
+++ b/support/nfs/Makefile.am
@@ -5,7 +5,7 @@ libnfs_a_SOURCES = exports.c rmtab.c xio.c rpcmisc.c rpcdispatch.c \
xlog.c xcommon.c wildmat.c nfsclient.c \
nfsexport.c getfh.c nfsctl.c rpc_socket.c getport.c \
svc_socket.c cacheio.c closeall.c nfs_mntent.c conffile.c \
- svc_create.c
+ svc_create.c atomicio.c strlcpy.c strlcat.c
MAINTAINERCLEANFILES = Makefile.in
diff --git a/utils/idmapd/atomicio.c b/support/nfs/atomicio.c
index 1fb1ff9..1fb1ff9 100644
--- a/utils/idmapd/atomicio.c
+++ b/support/nfs/atomicio.c
diff --git a/utils/idmapd/strlcat.c b/support/nfs/strlcat.c
index daedd7a..daedd7a 100644
--- a/utils/idmapd/strlcat.c
+++ b/support/nfs/strlcat.c
diff --git a/utils/idmapd/strlcpy.c b/support/nfs/strlcpy.c
index a2653ee..a2653ee 100644
--- a/utils/idmapd/strlcpy.c
+++ b/support/nfs/strlcpy.c
diff --git a/utils/idmapd/Makefile.am b/utils/idmapd/Makefile.am
index 4218048..4328e41 100644
--- a/utils/idmapd/Makefile.am
+++ b/utils/idmapd/Makefile.am
@@ -11,12 +11,8 @@ EXTRA_DIST = \
idmapd.conf
idmapd_SOURCES = \
- atomicio.c \
idmapd.c \
- strlcat.c \
- strlcpy.c \
\
- cfg.h \
nfs_idmap.h \
queue.h
diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c
index b76607a..76a56ef 100644
--- a/utils/idmapd/idmapd.c
+++ b/utils/idmapd/idmapd.c
@@ -158,10 +158,6 @@ static int nfsdopenone(struct idmap_client *);
static void nfsdreopen_one(struct idmap_client *);
static void nfsdreopen(void);
-size_t strlcat(char *, const char *, size_t);
-size_t strlcpy(char *, const char *, size_t);
-ssize_t atomicio(ssize_t (*f) (int, void*, size_t),
- int, void *, size_t);
void mydaemon(int, int);
void release_parent(void);