diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2015-10-18 20:40:12 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2015-10-18 20:40:12 +0200 |
commit | f28bc208ac98a9a05ff73f7c6c57262b33281d97 (patch) | |
tree | 01b64a1560110847b6b7ed658b4b53a2f369f6b8 | |
parent | c147d84219585cf25a53759cd2d73f435108be91 (diff) | |
download | pgfuse-f28bc208ac98a9a05ff73f7c6c57262b33281d97.tar.gz pgfuse-f28bc208ac98a9a05ff73f7c6c57262b33281d97.tar.bz2 |
fix around flag to string printf format
-rw-r--r-- | pgfuse.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -306,7 +306,18 @@ static char *flags_to_string( int flags ) s = (char *)malloc( 100 ); if( s == NULL ) return "<memory allocation failed>"; - snprintf( s, 100, "access_mode=%s, flags=%s%s%s%s%s%s%s", + snprintf( s, 100, "access_mode=%s, flags=%s%s%s%s" +#ifdef O_NOFOLLOW +"%s" +#endif +#ifdef O_CLOEXEC +"%s" +#endif +#ifdef O_DIRECTORY +"%s" +#endif + "%s", + ( flags & O_EXCL ) ? "O_EXCL " : "", mode_s, ( flags & O_CREAT ) ? "O_CREAT " : "", ( flags & O_TRUNC ) ? "O_TRUNC " : "", |