From f28bc208ac98a9a05ff73f7c6c57262b33281d97 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 18 Oct 2015 20:40:12 +0200 Subject: fix around flag to string printf format --- pgfuse.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pgfuse.c b/pgfuse.c index 5ae1078..e99fc7f 100644 --- a/pgfuse.c +++ b/pgfuse.c @@ -306,7 +306,18 @@ static char *flags_to_string( int flags ) s = (char *)malloc( 100 ); if( s == NULL ) return ""; - 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 " : "", -- cgit v1.2.3-54-g00ecf