Mercurial > trustbridge
comparison common/listutil.c @ 181:bea93c8651b7
Merged
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Tue, 25 Mar 2014 17:56:56 +0100 |
parents | b0579d4fa186 |
children | 881ce5126f07 |
comparison
equal
deleted
inserted
replaced
180:344b8a79ad2e | 181:bea93c8651b7 |
---|---|
20 #include <polarssl/pk.h> | 20 #include <polarssl/pk.h> |
21 #include <polarssl/base64.h> | 21 #include <polarssl/base64.h> |
22 #include <polarssl/sha256.h> | 22 #include <polarssl/sha256.h> |
23 #pragma GCC diagnostic pop | 23 #pragma GCC diagnostic pop |
24 | 24 |
25 #define MAX_FILESIZE MAX_LINE_LENGTH * MAX_LINES | 25 #define MAX_FILESIZE (MAX_LINE_LENGTH * MAX_LINES) |
26 | 26 |
27 /** | 27 /** |
28 * @brief Read a file into memory. | 28 * @brief Read a file into memory. |
29 * | 29 * |
30 * The caller needs to free data | 30 * The caller needs to free data |
190 if (ret == READ_FILE_TOO_LARGE) { | 190 if (ret == READ_FILE_TOO_LARGE) { |
191 return TooLarge; | 191 return TooLarge; |
192 } | 192 } |
193 if (ret == READ_FILE_UNREADABLE) { | 193 if (ret == READ_FILE_UNREADABLE) { |
194 /* TODO: work with errno ? */ | 194 /* TODO: work with errno ? */ |
195 /* errsv = errno; */ | |
196 /* perror("read_and_verify_list(), READ_FILE_UNREADABLE:"); */ | |
195 return SeekFailed; | 197 return SeekFailed; |
196 } | 198 } |
197 if (ret == READ_FILE_READ_FAILED) { | 199 if (ret == READ_FILE_READ_FAILED) { |
198 /* TODO: work with ferror() or feof() ? */ | 200 /* TODO: work with ferror() or feof() ? */ |
199 return ReadFailed; | 201 return ReadFailed; |