diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-02-12 21:39:44 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-02-12 21:39:44 +0000 |
commit | 30e7c05075f373810a4057ecf673cb01381e6e94 (patch) | |
tree | 4562789b1e2156e66131f3450501ee57332c6f16 /src/common/util.h | |
parent | 0c40a080a493c9ffc76c78e9795f64d3a194a36c (diff) | |
download | tor-30e7c05075f373810a4057ecf673cb01381e6e94.tar.gz tor-30e7c05075f373810a4057ecf673cb01381e6e94.zip |
r11774@catbus: nickm | 2007-02-12 16:31:47 -0500
Handle errors on opening cached-routers* more uniformly and sanely: log not-found errors at level INFO, and all other errors at level WARN. Needs testing on win32.
svn:r9569
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/util.h b/src/common/util.h index 5b6dafdaa2..9d29a420eb 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -189,8 +189,13 @@ int write_chunks_to_file(const char *fname, const struct smartlist_t *chunks, int append_bytes_to_file(const char *fname, const char *str, size_t len, int bin); +/** Flag for read_file_to_str: open the file in binary mode. */ +#define RFTS_BIN 1 +/** Flag for read_file_to_str: it's okay if the file doesn't exist */ +#define RFTS_IGNORE_MISSING 2 + struct stat; -char *read_file_to_str(const char *filename, int bin, struct stat *stat_out) +char *read_file_to_str(const char *filename, int flags, struct stat *stat_out) ATTR_MALLOC; char *parse_line_from_str(char *line, char **key_out, char **value_out); char *expand_filename(const char *filename); |