diff options
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r-- | src/include/gnunet_disk_lib.h | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index 5732a27d6..f5fae80c9 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h | |||
@@ -292,9 +292,8 @@ int GNUNET_DISK_file_test (const char *fil); | |||
292 | * @param whence specification to which position the offset parameter relates to | 292 | * @param whence specification to which position the offset parameter relates to |
293 | * @return the new position on success, GNUNET_SYSERR otherwise | 293 | * @return the new position on success, GNUNET_SYSERR otherwise |
294 | */ | 294 | */ |
295 | off_t | 295 | off_t GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, |
296 | GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, | 296 | off_t offset, enum GNUNET_DISK_Seek whence); |
297 | off_t offset, enum GNUNET_DISK_Seek whence); | ||
298 | 297 | ||
299 | 298 | ||
300 | /** | 299 | /** |
@@ -309,8 +308,8 @@ GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, | |||
309 | * included? | 308 | * included? |
310 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 309 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
311 | */ | 310 | */ |
312 | int GNUNET_DISK_file_size (const char *filename, | 311 | int GNUNET_DISK_file_size (const char *filename, uint64_t * size, |
313 | uint64_t * size, int includeSymLinks); | 312 | int includeSymLinks); |
314 | 313 | ||
315 | 314 | ||
316 | /** | 315 | /** |
@@ -328,8 +327,8 @@ int GNUNET_DISK_file_size (const char *filename, | |||
328 | * @param ino set to the inode ID | 327 | * @param ino set to the inode ID |
329 | * @return GNUNET_OK on success | 328 | * @return GNUNET_OK on success |
330 | */ | 329 | */ |
331 | int GNUNET_DISK_file_get_identifiers (const char *filename, | 330 | int GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev, |
332 | uint64_t * dev, uint64_t * ino); | 331 | uint64_t * ino); |
333 | 332 | ||
334 | 333 | ||
335 | /** | 334 | /** |
@@ -372,8 +371,7 @@ struct GNUNET_DISK_FileHandle *GNUNET_DISK_file_open (const char *fn, | |||
372 | * @param inherit_write 1 to make write handle inheritable, 0 otherwise (NT only) | 371 | * @param inherit_write 1 to make write handle inheritable, 0 otherwise (NT only) |
373 | * @return handle to the new pipe, NULL on error | 372 | * @return handle to the new pipe, NULL on error |
374 | */ | 373 | */ |
375 | struct GNUNET_DISK_PipeHandle *GNUNET_DISK_pipe (int blocking, | 374 | struct GNUNET_DISK_PipeHandle *GNUNET_DISK_pipe (int blocking, int inherit_read, |
376 | int inherit_read, | ||
377 | int inherit_write); | 375 | int inherit_write); |
378 | 376 | ||
379 | 377 | ||
@@ -391,9 +389,8 @@ int GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p); | |||
391 | * @param end which end of the pipe to close | 389 | * @param end which end of the pipe to close |
392 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise | 390 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise |
393 | */ | 391 | */ |
394 | int | 392 | int GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p, |
395 | GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p, | 393 | enum GNUNET_DISK_PipeEnd end); |
396 | enum GNUNET_DISK_PipeEnd end); | ||
397 | 394 | ||
398 | /** | 395 | /** |
399 | * Close an open file. | 396 | * Close an open file. |
@@ -462,9 +459,7 @@ ssize_t GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h, | |||
462 | * @param mode file permissions | 459 | * @param mode file permissions |
463 | * @return number of bytes written on success, GNUNET_SYSERR on error | 460 | * @return number of bytes written on success, GNUNET_SYSERR on error |
464 | */ | 461 | */ |
465 | ssize_t GNUNET_DISK_fn_write (const char *fn, | 462 | ssize_t GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n, |
466 | const void *buffer, | ||
467 | size_t n, | ||
468 | enum GNUNET_DISK_AccessPermissions mode); | 463 | enum GNUNET_DISK_AccessPermissions mode); |
469 | 464 | ||
470 | 465 | ||
@@ -541,8 +536,8 @@ int GNUNET_DISK_directory_iterator_next (struct GNUNET_DISK_DirectoryIterator | |||
541 | * @param callback the method to call for each file | 536 | * @param callback the method to call for each file |
542 | * @param callback_cls closure for callback | 537 | * @param callback_cls closure for callback |
543 | */ | 538 | */ |
544 | void GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority | 539 | void GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority prio, |
545 | prio, const char *dirName, | 540 | const char *dirName, |
546 | GNUNET_DISK_DirectoryIteratorCallback | 541 | GNUNET_DISK_DirectoryIteratorCallback |
547 | callback, void *callback_cls); | 542 | callback, void *callback_cls); |
548 | 543 | ||
@@ -599,9 +594,8 @@ int GNUNET_DISK_directory_create (const char *dir); | |||
599 | * @param excl GNUNET_YES for an exclusive lock | 594 | * @param excl GNUNET_YES for an exclusive lock |
600 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 595 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
601 | */ | 596 | */ |
602 | int | 597 | int GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart, |
603 | GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart, | 598 | off_t lockEnd, int excl); |
604 | off_t lockEnd, int excl); | ||
605 | 599 | ||
606 | 600 | ||
607 | /** | 601 | /** |
@@ -611,9 +605,8 @@ GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart, | |||
611 | * @param unlockEnd absolute position until where to unlock | 605 | * @param unlockEnd absolute position until where to unlock |
612 | * @return GNUNET_OK on success, GNUNET_SYSERR on error | 606 | * @return GNUNET_OK on success, GNUNET_SYSERR on error |
613 | */ | 607 | */ |
614 | int | 608 | int GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh, |
615 | GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh, | 609 | off_t unlockStart, off_t unlockEnd); |
616 | off_t unlockStart, off_t unlockEnd); | ||
617 | 610 | ||
618 | 611 | ||
619 | /** | 612 | /** |