Whamcloud - gitweb
Need to include mount_utils.h in the _SOURCES for the tools that use it.
authorbrian <brian>
Thu, 10 Jul 2008 21:29:54 +0000 (21:29 +0000)
committerbrian <brian>
Thu, 10 Jul 2008 21:29:54 +0000 (21:29 +0000)
Compile fixes from adilger.

lustre/utils/Makefile.am
lustre/utils/mkfs_lustre.c
lustre/utils/mount_lustre.c
lustre/utils/mount_utils.c
lustre/utils/mount_utils.h

index 4066a9a..aa02674 100644 (file)
@@ -80,11 +80,11 @@ llog_reader_DEPENDENCIES := $(LIBPTLCTL)
 
 lr_reader_SOURCES = lr_reader.c
 
 
 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)
 
 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
 mkfs_lustre_CPPFLAGS = -UTUNEFS $(AM_CPPFLAGS)
 mkfs_lustre_LDADD := libiam.a $(LIBPTLCTL)
 mkfs_lustre_DEPENDENCIES := $(LIBPTLCTL) libiam.a
index 25de036..b6a7f26 100644 (file)
@@ -50,7 +50,7 @@
 #include <lustre_param.h>
 #include <lnet/lnetctl.h>
 #include <lustre_ver.h>
 #include <lustre_param.h>
 #include <lnet/lnetctl.h>
 #include <lustre_ver.h>
-#include <mount_utils.h>
+#include "mount_utils.h"
 
 #ifndef PATH_MAX
 #define PATH_MAX 4096
 
 #ifndef PATH_MAX
 #define PATH_MAX 4096
index 455f8bc..0ac707c 100644 (file)
@@ -38,7 +38,7 @@
 #include <glob.h>
 #include <ctype.h>
 #include <limits.h>
 #include <glob.h>
 #include <ctype.h>
 #include <limits.h>
-#include <mount_utils.h>
+#include "mount_utils.h"
 
 #define MAX_HW_SECTORS_KB_PATH  "queue/max_hw_sectors_kb"
 #define MAX_SECTORS_KB_PATH     "queue/max_sectors_kb"
 
 #define MAX_HW_SECTORS_KB_PATH  "queue/max_hw_sectors_kb"
 #define MAX_SECTORS_KB_PATH     "queue/max_sectors_kb"
index 17d00d7..0ee4974 100644 (file)
@@ -10,8 +10,8 @@
 extern char *progname;
 extern int verbose;
 
 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)
 {
 
 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)) {
 
         /* 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;
         }
                         progname, tmpdir, strerror(errno));
                 return errno;
         }
index 600b6b4..3311b0f 100644 (file)
@@ -6,6 +6,8 @@
 #ifndef _MOUNT_UTILS_H_
 #define _MOUNT_UTILS_H_
 
 #ifndef _MOUNT_UTILS_H_
 #define _MOUNT_UTILS_H_
 
+#include <lustre_disk.h>
+
 void fatal(void);
 int run_command(char *, int);
 int get_mountdata(char *, struct lustre_disk_data *);
 void fatal(void);
 int run_command(char *, int);
 int get_mountdata(char *, struct lustre_disk_data *);