* conf/autofs/autofs_solaris_v1.h: redefine
authorErez Zadok <ezk@cs.sunysb.edu>
Fri, 7 Oct 2005 22:28:12 +0000 (22:28 +0000)
committerErez Zadok <ezk@cs.sunysb.edu>
Fri, 7 Oct 2005 22:28:12 +0000 (22:28 +0000)
autofs_strdup_space_hack as a macro to str3cat(NULL,(s)," ","").
This works everywhere and we avoid linking problems, inline
functions, etc.

* conf/autofs/autofs_solaris_v1.c (autofs_mount_fs): remove
autofs_strdup_space_hack() function altogether.

ChangeLog
conf/autofs/autofs_solaris_v1.c
conf/autofs/autofs_solaris_v1.h

index 49a574b113401a90088985af828554a9225fa6eb..b78e261cc1cbea93623c2211545cf0ad2d0a777b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2005-10-07  Erez Zadok  <ezk@cs.sunysb.edu>
 
+       * conf/autofs/autofs_solaris_v1.h: redefine
+       autofs_strdup_space_hack as a macro to str3cat(NULL,(s)," ","").
+       This works everywhere and we avoid linking problems, inline
+       functions, etc.
+
+       * conf/autofs/autofs_solaris_v1.c (autofs_mount_fs): remove
+       autofs_strdup_space_hack() function altogether.
+
        * m4/macros/os_cflags.m4: remove hack that hardcodes pte_t=u_int.
 
        * configure.in: test for <sys/immu.h> header.
index 855f60a1ee08f80259cfb8019d215152e2409a23..11b44219811d47590b839cc5f561ec0aa154a485 100644 (file)
@@ -474,23 +474,6 @@ destroy_autofs_service(void)
 }
 
 
-/*
- * autofs hack: append a space to the directory name
- * to stop the kernel->daemon recursion.
- *
- * Returns malloc'ed space which needs to be freed by the caller.
- */
-static char *
-autofs_strdup_space_hack(char *s)
-{
-  size_t l = strlen(s) + 2;
-  char *tmp = xmalloc(l);
-  xstrlcpy(tmp, s, l);
-  xstrlcat(tmp, " ", l);
-  return tmp;
-}
-
-
 int
 autofs_mount_fs(am_node *mp, mntfs *mf)
 {
index d1f9781c6f1b798c16d00b0d10ff6410caa1909f..1b2b79b4c74f991ec1e131044886b85f02330c41 100644 (file)
 typedef autofs_args_t autofs_fh_t;
 
 #define NEED_AUTOFS_SPACE_HACK
+/*
+ * autofs hack: append a space to the directory name
+ * to stop the kernel->daemon recursion.
+ *
+ * Returns malloc'ed space which needs to be freed by the caller.
+ */
+#define autofs_strdup_space_hack(s) str3cat(NULL, (s), " ", "")
 
 #define AUTOFS_AUTO_FS_FLAGS   (FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS | FS_ON_AUTOFS)
 #define AUTOFS_DIRECT_FS_FLAGS (FS_DIRECT | FS_NOTIMEOUT | FS_BACKGROUND | FS_AMQINFO | FS_DIRECTORY | FS_AUTOFS)