diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-10-14 13:20:50 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-10-14 13:20:50 +0000 |
commit | a93a37b08dc0fea3fc1711a494b1ed52ead0d3be (patch) | |
tree | b6a48dfe074d722e8a10119028ac86b3a56f015d /src/util/disk.c | |
parent | c0e67586c60169b865aaeeba91bad91d21a00e87 (diff) | |
download | gnunet-a93a37b08dc0fea3fc1711a494b1ed52ead0d3be.tar.gz gnunet-a93a37b08dc0fea3fc1711a494b1ed52ead0d3be.zip |
-need to do mkdir before testing UNIXPATH, not sure how this worked before
Diffstat (limited to 'src/util/disk.c')
-rw-r--r-- | src/util/disk.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/util/disk.c b/src/util/disk.c index 92c32e093..d0065734d 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -140,9 +140,9 @@ translate_unix_perms (enum GNUNET_DISK_AccessPermissions perm) | |||
140 | * Iterate over all files in the given directory and | 140 | * Iterate over all files in the given directory and |
141 | * accumulate their size. | 141 | * accumulate their size. |
142 | * | 142 | * |
143 | * @param cls closure of type "struct GetFileSizeData" | 143 | * @param cls closure of type `struct GetFileSizeData` |
144 | * @param fn current filename we are looking at | 144 | * @param fn current filename we are looking at |
145 | * @return GNUNET_SYSERR on serious errors, otherwise GNUNET_OK | 145 | * @return #GNUNET_SYSERR on serious errors, otherwise #GNUNET_OK |
146 | */ | 146 | */ |
147 | static int | 147 | static int |
148 | getSizeRec (void *cls, const char *fn) | 148 | getSizeRec (void *cls, const char *fn) |
@@ -187,7 +187,7 @@ getSizeRec (void *cls, const char *fn) | |||
187 | * Checks whether a handle is invalid | 187 | * Checks whether a handle is invalid |
188 | * | 188 | * |
189 | * @param h handle to check | 189 | * @param h handle to check |
190 | * @return GNUNET_YES if invalid, GNUNET_NO if valid | 190 | * @return #GNUNET_YES if invalid, #GNUNET_NO if valid |
191 | */ | 191 | */ |
192 | int | 192 | int |
193 | GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h) | 193 | GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h) |
@@ -204,7 +204,7 @@ GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h) | |||
204 | * | 204 | * |
205 | * @param fh open file handle | 205 | * @param fh open file handle |
206 | * @param size where to write size of the file | 206 | * @param size where to write size of the file |
207 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 207 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on error |
208 | */ | 208 | */ |
209 | int | 209 | int |
210 | GNUNET_DISK_file_handle_size (struct GNUNET_DISK_FileHandle *fh, | 210 | GNUNET_DISK_file_handle_size (struct GNUNET_DISK_FileHandle *fh, |
@@ -237,7 +237,7 @@ GNUNET_DISK_file_handle_size (struct GNUNET_DISK_FileHandle *fh, | |||
237 | * @param h handle of an open file | 237 | * @param h handle of an open file |
238 | * @param offset position to move to | 238 | * @param offset position to move to |
239 | * @param whence specification to which position the offset parameter relates to | 239 | * @param whence specification to which position the offset parameter relates to |
240 | * @return the new position on success, GNUNET_SYSERR otherwise | 240 | * @return the new position on success, #GNUNET_SYSERR otherwise |
241 | */ | 241 | */ |
242 | off_t | 242 | off_t |
243 | GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle * h, off_t offset, | 243 | GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle * h, off_t offset, |
@@ -282,13 +282,15 @@ GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle * h, off_t offset, | |||
282 | * of all sizes of files in the directory) | 282 | * of all sizes of files in the directory) |
283 | * @param include_symbolic_links should symbolic links be | 283 | * @param include_symbolic_links should symbolic links be |
284 | * included? | 284 | * included? |
285 | * @param single_file_mode GNUNET_YES to only get size of one file | 285 | * @param single_file_mode #GNUNET_YES to only get size of one file |
286 | * and return GNUNET_SYSERR for directories. | 286 | * and return #GNUNET_SYSERR for directories. |
287 | * @return GNUNET_SYSERR on error, GNUNET_OK on success | 287 | * @return #GNUNET_SYSERR on error, #GNUNET_OK on success |
288 | */ | 288 | */ |
289 | int | 289 | int |
290 | GNUNET_DISK_file_size (const char *filename, uint64_t * size, | 290 | GNUNET_DISK_file_size (const char *filename, |
291 | int include_symbolic_links, int single_file_mode) | 291 | uint64_t * size, |
292 | int include_symbolic_links, | ||
293 | int single_file_mode) | ||
292 | { | 294 | { |
293 | struct GetFileSizeData gfsd; | 295 | struct GetFileSizeData gfsd; |
294 | int ret; | 296 | int ret; |
@@ -632,7 +634,7 @@ GNUNET_DISK_directory_test (const char *fil, int is_readable) | |||
632 | * (of a file that exists and that is not a directory). | 634 | * (of a file that exists and that is not a directory). |
633 | * | 635 | * |
634 | * @param fil filename to check | 636 | * @param fil filename to check |
635 | * @return #GNUNET_YES if yes, GNUNET_NO if not a file, #GNUNET_SYSERR if something | 637 | * @return #GNUNET_YES if yes, #GNUNET_NO if not a file, #GNUNET_SYSERR if something |
636 | * else (will print an error message in that case, too). | 638 | * else (will print an error message in that case, too). |
637 | */ | 639 | */ |
638 | int | 640 | int |