nfs-utils: Move common code into support
Subsystems (2)
PATCH 1/1 nfs-utils: Move common code into support
This is a re-worked version of David P. Quigley's patch sent to the list on 22 Jun 2010. I just made it apply against current source.
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.
---
support/include/nfslib.h | 6 ++++++
support/nfs/Makefile.am | 2 +-
{utils/idmapd => support/nfs}/atomicio.c | 0
{utils/idmapd => support/nfs}/strlcat.c | 0
{utils/idmapd => support/nfs}/strlcpy.c | 0
utils/idmapd/Makefile.am | 4 ----
utils/idmapd/idmapd.c | 4 ----
7 files changed, 7 insertions(+), 9 deletions(-)
rename {utils/idmapd => support/nfs}/atomicio.c (100%)
rename {utils/idmapd => support/nfs}/strlcat.c (100%)
rename {utils/idmapd => support/nfs}/strlcpy.c (100%)support/include/nfslib.h +6 -0
@@ -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))
support/nfs/Makefile.am +1 -1
@@ -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
support/nfs/atomicio.c renamed from utils/idmapd/atomicio.c +0 -0
support/nfs/strlcat.c renamed from utils/idmapd/strlcat.c +0 -0
support/nfs/strlcpy.c renamed from utils/idmapd/strlcpy.c +0 -0
utils/idmapd/Makefile.am +0 -4
@@ -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
utils/idmapd/idmapd.c +0 -4
@@ -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 );
Signature · 1 line
1.7.0.4
Quoted 7 lines · Jim Rees
This is a re-worked version of David P. Quigley's patch sent to the list on 22 Jun 2010. I just made it apply against current source.
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.
Committed...
steved.