summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--config.h3
-rw-r--r--pgfuse.c4
3 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 585463c..21bf9c0 100644
--- a/Makefile
+++ b/Makefile
@@ -69,8 +69,7 @@ test: pgfuse testfsync testpgsql
-stat mnt/dir/dir3
-stat mnt/dir/dir2/clink
# show filesystem stats (statvfs)
- df -k mnt
- df -i mnt
+ -stat -f mnt
fusermount -u mnt
pgfuse: pgfuse.o pgsql.o
diff --git a/config.h b/config.h
index 8be2589..273c165 100644
--- a/config.h
+++ b/config.h
@@ -18,6 +18,9 @@
#ifndef CONFIG_H
#define CONFIG_H
+/* version of PgFuse */
+#define PGFUSE_VERSION "0.0.1"
+
/* standard block size, rather a simulation currently */
#define STANDARD_BLOCK_SIZE 512
diff --git a/pgfuse.c b/pgfuse.c
index e688c38..4453d66 100644
--- a/pgfuse.c
+++ b/pgfuse.c
@@ -1214,14 +1214,16 @@ int main( int argc, char *argv[] )
if( pgfuse.print_help ) {
/* print our options */
print_usage( basename( argv[0] ) );
+ fflush( stdout );
/* print options of FUSE itself */
argv[1] = "-ho";
argv[2] = "mountpoint";
+ dup2( STDOUT_FILENO, STDERR_FILENO ); /* force fuse help to stdout */
fuse_main( 2, argv, &pgfuse_oper, NULL);
exit( EXIT_SUCCESS );
}
if( pgfuse.print_version ) {
- fprintf( stderr, "0.0.1\n" );
+ printf( "%s\n", PGFUSE_VERSION );
exit( EXIT_SUCCESS );
}
exit( EXIT_FAILURE );