Skip to content

Commit

Permalink
fix up OS X after dynamic volume changes
Browse files Browse the repository at this point in the history
Note that contrib is not needed to be in toplevel Makefile as
its not a separate target, rather stuff is "pulled in" from there.

Signed-off-by: Csaba Henk <[email protected]>
Signed-off-by: Anand V. Avati <[email protected]>

BUG: 971 (dynamic volume management)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
  • Loading branch information
csabahenk authored and gluster-ant committed Jul 8, 2010
1 parent caa45fd commit 7999124
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
EXTRA_DIST = autogen.sh COPYING INSTALL README AUTHORS THANKS NEWS glusterfs.spec

SUBDIRS = argp-standalone libglusterfs rpc xlators glusterfsd $(FUSERMOUNT_SUBDIR) doc extras contrib
SUBDIRS = argp-standalone libglusterfs rpc xlators glusterfsd $(FUSERMOUNT_SUBDIR) doc extras

CLEANFILES =

Expand Down
3 changes: 1 addition & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ AC_CONFIG_FILES([Makefile
extras/benchmarking/Makefile
extras/volgen/Makefile
extras/volgen/glusterfs-volgen
contrib/Makefile
contrib/fuse-util/Makefile
xlators/features/access-control/Makefile
xlators/features/access-control/src/Makefile
Expand Down Expand Up @@ -230,7 +229,7 @@ AC_ARG_ENABLE([fusermount],

BUILD_FUSERMOUNT="no"
if test "x$enable_fusermount" = "xyes"; then
FUSERMOUNT_SUBDIR="contrib"
FUSERMOUNT_SUBDIR="contrib/fuse-util"
BUILD_FUSERMOUNT="yes"
AC_DEFINE(GF_FUSERMOUNT, 1, [Use our own fusermount])
fi
Expand Down
3 changes: 0 additions & 3 deletions contrib/Makefile.am

This file was deleted.

9 changes: 2 additions & 7 deletions glusterfsd/src/glusterfsd.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,12 +651,7 @@ generate_uuid ()

localtime_r (&tv.tv_sec, &now);
strftime (now_str, 32, "%Y/%m/%d-%H:%M:%S", &now);
snprintf (tmp_str, 1024, "%s-%d-%s:%"
#ifdef GF_DARWIN_HOST_OS
PRId32,
#else
"ld",
#endif
snprintf (tmp_str, 1024, "%s-%d-%s:%" GF_PRI_SUSECONDS,
hostname, getpid(), now_str, tv.tv_usec);

return gf_strdup (tmp_str);
Expand Down Expand Up @@ -1149,7 +1144,7 @@ daemonize (glusterfs_ctx_t *ctx)
if (cmd_args->debug_mode)
goto postfork;

daemon (0, 0);
os_daemon (0, 0);

postfork:
ret = glusterfs_pidfile_update (ctx);
Expand Down
2 changes: 1 addition & 1 deletion libglusterfs/src/graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ fill_uuid (char *uuid, int size)

localtime_r (&tv.tv_sec, &now);
strftime (now_str, 32, "%Y/%m/%d-%H:%M:%S", &now);
snprintf (uuid, size, "%s-%d-%s:%ld",
snprintf (uuid, size, "%s-%d-%s:%"GF_PRI_SUSECONDS,
hostname, getpid(), now_str, tv.tv_usec);

return;
Expand Down
7 changes: 1 addition & 6 deletions libglusterfs/src/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,7 @@ _gf_log (const char *domain, const char *file, const char *function, int line,

strftime (timestr, 256, "%Y-%m-%d %H:%M:%S", tm);
snprintf (timestr + strlen (timestr), 256 - strlen (timestr),
#ifdef GF_DARWIN_HOST_OS
".%"PRId32,
#else
".%ld",
#endif
tv.tv_usec);
".%"GF_PRI_SUSECONDS, tv.tv_usec);

basename = strrchr (file, '/');
if (basename)
Expand Down
2 changes: 2 additions & 0 deletions libglusterfs/src/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
#define GF_PRI_FSBLK "u"
#define GF_PRI_DEV PRId32
#define GF_PRI_NLINK PRIu16
#define GF_PRI_SUSECONDS PRId32
#else
#define GF_PRI_FSBLK PRIu64
#define GF_PRI_DEV PRIu64
#define GF_PRI_NLINK PRIu32
#define GF_PRI_SUSECONDS "ld"
#endif
#define GF_PRI_BLKSIZE PRId32
#define GF_PRI_SIZET "zu"
Expand Down

0 comments on commit 7999124

Please sign in to comment.