Whamcloud - gitweb
ext2fs: check if Lustre filesystem is mounted
[tools/e2fsprogs.git] / misc / util.c
index f906339..1d33883 100644 (file)
@@ -9,8 +9,12 @@
  * %End-Header%
  */
 
+#ifndef _LARGEFILE_SOURCE
 #define _LARGEFILE_SOURCE
+#endif
+#ifndef _LARGEFILE64_SOURCE
 #define _LARGEFILE64_SOURCE
+#endif
 
 #include "config.h"
 #include <fcntl.h>
@@ -21,6 +25,9 @@
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
 #endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 #ifdef HAVE_LINUX_MAJOR_H
 #include <linux/major.h>
 #endif
@@ -37,7 +44,7 @@
 #include "e2p/e2p.h"
 #include "ext2fs/ext2_fs.h"
 #include "ext2fs/ext2fs.h"
-#include "nls-enable.h"
+#include "support/nls-enable.h"
 #include "blkid/blkid.h"
 #include "util.h"
 
@@ -75,7 +82,7 @@ char *get_progname(char *argv_zero)
 
 static jmp_buf alarm_env;
 
-static void alarm_signal(int signal)
+static void alarm_signal(int signal EXT2FS_ATTR((unused)))
 {
        longjmp(alarm_env, 1);
 }
@@ -94,11 +101,11 @@ void proceed_question(int delay)
                        return;
                }
                signal(SIGALRM, alarm_signal);
-               printf(_("Proceed anyway (or wait %d seconds) ? (y,n) "),
+               printf(_("Proceed anyway (or wait %d seconds to proceed) ? (y,N) "),
                       delay);
                alarm(delay);
        } else
-               fputs(_("Proceed anyway? (y,n) "), stdout);
+               fputs(_("Proceed anyway? (y,N) "), stdout);
        buf[0] = 0;
        if (!fgets(buf, sizeof(buf), stdin) ||
            strchr(short_yes, buf[0]) == 0) {