From: brian Date: Thu, 10 Jul 2008 21:29:54 +0000 (+0000) Subject: Need to include mount_utils.h in the _SOURCES for the tools that use it. X-Git-Tag: v1_9_50~221 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=c1a4af4abc5e313fe364f8d1f2b58e89679d2b8b Need to include mount_utils.h in the _SOURCES for the tools that use it. Compile fixes from adilger. --- diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am index 4066a9a..aa02674 100644 --- a/lustre/utils/Makefile.am +++ b/lustre/utils/Makefile.am @@ -80,11 +80,11 @@ llog_reader_DEPENDENCIES := $(LIBPTLCTL) lr_reader_SOURCES = lr_reader.c -mount_lustre_SOURCES = mount_lustre.c mount_utils.c +mount_lustre_SOURCES = mount_lustre.c mount_utils.c mount_utils.h mount_lustre_LDADD := $(LIBPTLCTL) mount_lustre_DEPENDENCIES := $(LIBPTLCTL) -mkfs_lustre_SOURCES = mkfs_lustre.c mount_utils.c +mkfs_lustre_SOURCES = mkfs_lustre.c mount_utils.c mount_utils.h mkfs_lustre_CPPFLAGS = -UTUNEFS $(AM_CPPFLAGS) mkfs_lustre_LDADD := libiam.a $(LIBPTLCTL) mkfs_lustre_DEPENDENCIES := $(LIBPTLCTL) libiam.a diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index 25de036..b6a7f26 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -50,7 +50,7 @@ #include #include #include -#include +#include "mount_utils.h" #ifndef PATH_MAX #define PATH_MAX 4096 diff --git a/lustre/utils/mount_lustre.c b/lustre/utils/mount_lustre.c index 455f8bc..0ac707c 100644 --- a/lustre/utils/mount_lustre.c +++ b/lustre/utils/mount_lustre.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include "mount_utils.h" #define MAX_HW_SECTORS_KB_PATH "queue/max_hw_sectors_kb" #define MAX_SECTORS_KB_PATH "queue/max_sectors_kb" diff --git a/lustre/utils/mount_utils.c b/lustre/utils/mount_utils.c index 17d00d7..0ee4974 100644 --- a/lustre/utils/mount_utils.c +++ b/lustre/utils/mount_utils.c @@ -10,8 +10,8 @@ extern char *progname; extern int verbose; -#define vprint if (verbose > 0) printf -#define verrprint if (verbose >= 0) printf +#define vprint(fmt, arg...) if (verbose > 0) printf(fmt, ##arg) +#define verrprint(fmt, arg...) if (verbose >= 0) fprintf(stderr, fmt, ##arg) void fatal(void) { @@ -73,8 +73,7 @@ int get_mountdata(char *dev, struct lustre_disk_data *mo_ldd) /* Make a temporary directory to hold Lustre data files. */ if (!mkdtemp(tmpdir)) { - verrprint(stderr, "%s: Can't create temporary " - "directory %s: %s\n", + verrprint("%s: Can't create temporary directory %s: %s\n", progname, tmpdir, strerror(errno)); return errno; } diff --git a/lustre/utils/mount_utils.h b/lustre/utils/mount_utils.h index 600b6b4..3311b0f 100644 --- a/lustre/utils/mount_utils.h +++ b/lustre/utils/mount_utils.h @@ -6,6 +6,8 @@ #ifndef _MOUNT_UTILS_H_ #define _MOUNT_UTILS_H_ +#include + void fatal(void); int run_command(char *, int); int get_mountdata(char *, struct lustre_disk_data *);