diff options
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | config.h | 3 | ||||
-rw-r--r-- | pgfuse.c | 4 |
3 files changed, 7 insertions, 3 deletions
@@ -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 @@ -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 @@ -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 ); |