summaryrefslogtreecommitdiff
path: root/src/basic/fileio.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-06-21 14:18:04 +0200
committerLennart Poettering <lennart@poettering.net>2021-07-08 09:29:53 +0200
commit7b0da71d4976066f53dffa250d659d725f2d486c (patch)
tree4721e2ba698868eb5333077d32e87479783c4ced /src/basic/fileio.h
parentc1631ee124a30abfb9c71e2a1534b8afffc3b6a7 (diff)
downloadsystemd-7b0da71d4976066f53dffa250d659d725f2d486c.tar.gz
fileio: optionally allow interpreting file size as limit
Diffstat (limited to 'src/basic/fileio.h')
-rw-r--r--src/basic/fileio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/basic/fileio.h b/src/basic/fileio.h
index c28b17fef5..af797cfafd 100644
--- a/src/basic/fileio.h
+++ b/src/basic/fileio.h
@@ -39,6 +39,7 @@ typedef enum {
READ_FULL_FILE_UNHEX = 1 << 2, /* hex decode what we read */
READ_FULL_FILE_WARN_WORLD_READABLE = 1 << 3, /* if regular file, log at LOG_WARNING level if access mode above 0700 */
READ_FULL_FILE_CONNECT_SOCKET = 1 << 4, /* if socket inode, connect to it and read off it */
+ READ_FULL_FILE_FAIL_WHEN_LARGER = 1 << 5, /* fail loading if file is larger than specified size */
} ReadFullFileFlags;
int fopen_unlocked(const char *path, const char *options, FILE **ret);