summaryrefslogtreecommitdiff
path: root/src/include/gnunet_disk_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_disk_lib.h')
-rw-r--r--src/include/gnunet_disk_lib.h199
1 files changed, 94 insertions, 105 deletions
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h
index 367789722..f693615f1 100644
--- a/src/include/gnunet_disk_lib.h
+++ b/src/include/gnunet_disk_lib.h
@@ -11,12 +11,12 @@
11 WITHOUT ANY WARRANTY; without even the implied warranty of 11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Affero General Public License for more details. 13 Affero General Public License for more details.
14 14
15 You should have received a copy of the GNU Affero General Public License 15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19*/ 19 */
20/** 20/**
21 * @author Christian Grothoff 21 * @author Christian Grothoff
22 * 22 *
@@ -38,8 +38,7 @@ struct GNUNET_DISK_PipeHandle;
38/** 38/**
39 * Type of a handle. 39 * Type of a handle.
40 */ 40 */
41enum GNUNET_FILE_Type 41enum GNUNET_FILE_Type {
42{
43 /** 42 /**
44 * Handle represents an event. 43 * Handle represents an event.
45 */ 44 */
@@ -59,9 +58,7 @@ enum GNUNET_FILE_Type
59/** 58/**
60 * Handle used to access files (and pipes). 59 * Handle used to access files (and pipes).
61 */ 60 */
62struct GNUNET_DISK_FileHandle 61struct GNUNET_DISK_FileHandle {
63{
64
65#if WINDOWS 62#if WINDOWS
66 /** 63 /**
67 * File handle under W32. 64 * File handle under W32.
@@ -83,12 +80,10 @@ struct GNUNET_DISK_FileHandle
83 */ 80 */
84 OVERLAPPED *oOverlapWrite; 81 OVERLAPPED *oOverlapWrite;
85#else 82#else
86
87 /** 83 /**
88 * File handle on other OSes. 84 * File handle on other OSes.
89 */ 85 */
90 int fd; 86 int fd;
91
92#endif 87#endif
93}; 88};
94 89
@@ -113,9 +108,7 @@ extern "C"
113/** 108/**
114 * Specifies how a file should be opened. 109 * Specifies how a file should be opened.
115 */ 110 */
116enum GNUNET_DISK_OpenFlags 111enum GNUNET_DISK_OpenFlags {
117{
118
119 /** 112 /**
120 * Open the file for reading 113 * Open the file for reading
121 */ 114 */
@@ -155,8 +148,7 @@ enum GNUNET_DISK_OpenFlags
155/** 148/**
156 * Specifies what type of memory map is desired. 149 * Specifies what type of memory map is desired.
157 */ 150 */
158enum GNUNET_DISK_MapType 151enum GNUNET_DISK_MapType {
159{
160 /** 152 /**
161 * Read-only memory map. 153 * Read-only memory map.
162 */ 154 */
@@ -177,8 +169,7 @@ enum GNUNET_DISK_MapType
177/** 169/**
178 * File access permissions, UNIX-style. 170 * File access permissions, UNIX-style.
179 */ 171 */
180enum GNUNET_DISK_AccessPermissions 172enum GNUNET_DISK_AccessPermissions {
181{
182 /** 173 /**
183 * Nobody is allowed to do anything to the file. 174 * Nobody is allowed to do anything to the file.
184 */ 175 */
@@ -235,8 +226,7 @@ enum GNUNET_DISK_AccessPermissions
235 * Constants for specifying how to seek. Do not change values or order, 226 * Constants for specifying how to seek. Do not change values or order,
236 * some of the code depends on the specific numeric values! 227 * some of the code depends on the specific numeric values!
237 */ 228 */
238enum GNUNET_DISK_Seek 229enum GNUNET_DISK_Seek {
239{
240 /** 230 /**
241 * Seek an absolute position (from the start of the file). 231 * Seek an absolute position (from the start of the file).
242 */ 232 */
@@ -257,8 +247,7 @@ enum GNUNET_DISK_Seek
257/** 247/**
258 * Enumeration identifying the two ends of a pipe. 248 * Enumeration identifying the two ends of a pipe.
259 */ 249 */
260enum GNUNET_DISK_PipeEnd 250enum GNUNET_DISK_PipeEnd {
261{
262 /** 251 /**
263 * The reading-end of a pipe. 252 * The reading-end of a pipe.
264 */ 253 */
@@ -278,7 +267,7 @@ enum GNUNET_DISK_PipeEnd
278 * @return #GNUNET_YES if invalid, #GNUNET_NO if valid 267 * @return #GNUNET_YES if invalid, #GNUNET_NO if valid
279 */ 268 */
280int 269int
281GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h); 270GNUNET_DISK_handle_invalid(const struct GNUNET_DISK_FileHandle *h);
282 271
283 272
284/** 273/**
@@ -290,7 +279,7 @@ GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h);
290 * else (will print an error message in that case, too). 279 * else (will print an error message in that case, too).
291 */ 280 */
292int 281int
293GNUNET_DISK_file_test (const char *fil); 282GNUNET_DISK_file_test(const char *fil);
294 283
295 284
296/** 285/**
@@ -301,7 +290,7 @@ GNUNET_DISK_file_test (const char *fil);
301 * @param fil name of the file to back up 290 * @param fil name of the file to back up
302 */ 291 */
303void 292void
304GNUNET_DISK_file_backup (const char *fil); 293GNUNET_DISK_file_backup(const char *fil);
305 294
306 295
307/** 296/**
@@ -312,8 +301,8 @@ GNUNET_DISK_file_backup (const char *fil);
312 * @return the new position on success, GNUNET_SYSERR otherwise 301 * @return the new position on success, GNUNET_SYSERR otherwise
313 */ 302 */
314off_t 303off_t
315GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, off_t offset, 304GNUNET_DISK_file_seek(const struct GNUNET_DISK_FileHandle *h, off_t offset,
316 enum GNUNET_DISK_Seek whence); 305 enum GNUNET_DISK_Seek whence);
317 306
318 307
319/** 308/**
@@ -331,10 +320,10 @@ GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, off_t offset,
331 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success 320 * @return #GNUNET_SYSERR on error, #GNUNET_OK on success
332 */ 321 */
333int 322int
334GNUNET_DISK_file_size (const char *filename, 323GNUNET_DISK_file_size(const char *filename,
335 uint64_t *size, 324 uint64_t *size,
336 int include_symbolic_links, 325 int include_symbolic_links,
337 int single_file_mode); 326 int single_file_mode);
338 327
339 328
340/** 329/**
@@ -353,9 +342,9 @@ GNUNET_DISK_file_size (const char *filename,
353 * @return #GNUNET_OK on success 342 * @return #GNUNET_OK on success
354 */ 343 */
355int 344int
356GNUNET_DISK_file_get_identifiers (const char *filename, 345GNUNET_DISK_file_get_identifiers(const char *filename,
357 uint64_t *dev, 346 uint64_t *dev,
358 uint64_t *ino); 347 uint64_t *ino);
359 348
360 349
361/** 350/**
@@ -370,7 +359,7 @@ GNUNET_DISK_file_get_identifiers (const char *filename,
370 * file on disk in directory for temporary files 359 * file on disk in directory for temporary files
371 */ 360 */
372char * 361char *
373GNUNET_DISK_mktemp (const char *t); 362GNUNET_DISK_mktemp(const char *t);
374 363
375 364
376/** 365/**
@@ -383,7 +372,7 @@ GNUNET_DISK_mktemp (const char *t);
383 * @return NULL on error, otherwise name of freshly created directory 372 * @return NULL on error, otherwise name of freshly created directory
384 */ 373 */
385char * 374char *
386GNUNET_DISK_mkdtemp (const char *t); 375GNUNET_DISK_mkdtemp(const char *t);
387 376
388 377
389/** 378/**
@@ -399,9 +388,9 @@ GNUNET_DISK_mkdtemp (const char *t);
399 * @return IO handle on success, NULL on error 388 * @return IO handle on success, NULL on error
400 */ 389 */
401struct GNUNET_DISK_FileHandle * 390struct GNUNET_DISK_FileHandle *
402GNUNET_DISK_file_open (const char *fn, 391GNUNET_DISK_file_open(const char *fn,
403 enum GNUNET_DISK_OpenFlags flags, 392 enum GNUNET_DISK_OpenFlags flags,
404 enum GNUNET_DISK_AccessPermissions perm); 393 enum GNUNET_DISK_AccessPermissions perm);
405 394
406 395
407/** 396/**
@@ -412,8 +401,8 @@ GNUNET_DISK_file_open (const char *fn,
412 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 401 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
413 */ 402 */
414int 403int
415GNUNET_DISK_file_handle_size (struct GNUNET_DISK_FileHandle *fh, 404GNUNET_DISK_file_handle_size(struct GNUNET_DISK_FileHandle *fh,
416 off_t *size); 405 off_t *size);
417 406
418 407
419/** 408/**
@@ -426,10 +415,10 @@ GNUNET_DISK_file_handle_size (struct GNUNET_DISK_FileHandle *fh,
426 * @return handle to the new pipe, NULL on error 415 * @return handle to the new pipe, NULL on error
427 */ 416 */
428struct GNUNET_DISK_PipeHandle * 417struct GNUNET_DISK_PipeHandle *
429GNUNET_DISK_pipe (int blocking_read, 418GNUNET_DISK_pipe(int blocking_read,
430 int blocking_write, 419 int blocking_write,
431 int inherit_read, 420 int inherit_read,
432 int inherit_write); 421 int inherit_write);
433 422
434 423
435/** 424/**
@@ -443,9 +432,9 @@ GNUNET_DISK_pipe (int blocking_read,
443 * @return handle to the new pipe, NULL on error 432 * @return handle to the new pipe, NULL on error
444 */ 433 */
445struct GNUNET_DISK_PipeHandle * 434struct GNUNET_DISK_PipeHandle *
446GNUNET_DISK_pipe_from_fd (int blocking_read, 435GNUNET_DISK_pipe_from_fd(int blocking_read,
447 int blocking_write, 436 int blocking_write,
448 int fd[2]); 437 int fd[2]);
449 438
450 439
451/** 440/**
@@ -454,7 +443,7 @@ GNUNET_DISK_pipe_from_fd (int blocking_read,
454 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 443 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
455 */ 444 */
456int 445int
457GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p); 446GNUNET_DISK_pipe_close(struct GNUNET_DISK_PipeHandle *p);
458 447
459 448
460/** 449/**
@@ -465,8 +454,8 @@ GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p);
465 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 454 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
466 */ 455 */
467int 456int
468GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p, 457GNUNET_DISK_pipe_close_end(struct GNUNET_DISK_PipeHandle *p,
469 enum GNUNET_DISK_PipeEnd end); 458 enum GNUNET_DISK_PipeEnd end);
470 459
471 460
472/** 461/**
@@ -482,8 +471,8 @@ GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p,
482 * (or if that end is not present or is closed). 471 * (or if that end is not present or is closed).
483 */ 472 */
484struct GNUNET_DISK_FileHandle * 473struct GNUNET_DISK_FileHandle *
485GNUNET_DISK_pipe_detach_end (struct GNUNET_DISK_PipeHandle *p, 474GNUNET_DISK_pipe_detach_end(struct GNUNET_DISK_PipeHandle *p,
486 enum GNUNET_DISK_PipeEnd end); 475 enum GNUNET_DISK_PipeEnd end);
487 476
488/** 477/**
489 * Close an open file. 478 * Close an open file.
@@ -492,7 +481,7 @@ GNUNET_DISK_pipe_detach_end (struct GNUNET_DISK_PipeHandle *p,
492 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 481 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
493 */ 482 */
494int 483int
495GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h); 484GNUNET_DISK_file_close(struct GNUNET_DISK_FileHandle *h);
496 485
497 486
498/** 487/**
@@ -503,8 +492,8 @@ GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h);
503 * @return handle for the respective end 492 * @return handle for the respective end
504 */ 493 */
505const struct GNUNET_DISK_FileHandle * 494const struct GNUNET_DISK_FileHandle *
506GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p, 495GNUNET_DISK_pipe_handle(const struct GNUNET_DISK_PipeHandle *p,
507 enum GNUNET_DISK_PipeEnd n); 496 enum GNUNET_DISK_PipeEnd n);
508 497
509 498
510#if WINDOWS 499#if WINDOWS
@@ -516,7 +505,7 @@ GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p,
516 * @return GNUnet file handle corresponding to the W32 handle 505 * @return GNUnet file handle corresponding to the W32 handle
517 */ 506 */
518struct GNUNET_DISK_FileHandle * 507struct GNUNET_DISK_FileHandle *
519GNUNET_DISK_get_handle_from_w32_handle (HANDLE osfh); 508GNUNET_DISK_get_handle_from_w32_handle(HANDLE osfh);
520#endif 509#endif
521 510
522/** 511/**
@@ -529,9 +518,9 @@ GNUNET_DISK_get_handle_from_w32_handle (HANDLE osfh);
529 * @param require_gid_match #GNUNET_YES means 770 unless @a require_uid_match is set 518 * @param require_gid_match #GNUNET_YES means 770 unless @a require_uid_match is set
530 */ 519 */
531void 520void
532GNUNET_DISK_fix_permissions (const char *fn, 521GNUNET_DISK_fix_permissions(const char *fn,
533 int require_uid_match, 522 int require_uid_match,
534 int require_gid_match); 523 int require_gid_match);
535 524
536 525
537/** 526/**
@@ -541,7 +530,7 @@ GNUNET_DISK_fix_permissions (const char *fn,
541 * @return file handle corresponding to the descriptor 530 * @return file handle corresponding to the descriptor
542 */ 531 */
543struct GNUNET_DISK_FileHandle * 532struct GNUNET_DISK_FileHandle *
544GNUNET_DISK_get_handle_from_int_fd (int fno); 533GNUNET_DISK_get_handle_from_int_fd(int fno);
545 534
546 535
547/** 536/**
@@ -551,7 +540,7 @@ GNUNET_DISK_get_handle_from_int_fd (int fno);
551 * @return file handle corresponding to the descriptor 540 * @return file handle corresponding to the descriptor
552 */ 541 */
553struct GNUNET_DISK_FileHandle * 542struct GNUNET_DISK_FileHandle *
554GNUNET_DISK_get_handle_from_native (FILE *fd); 543GNUNET_DISK_get_handle_from_native(FILE *fd);
555 544
556 545
557/** 546/**
@@ -563,9 +552,9 @@ GNUNET_DISK_get_handle_from_native (FILE *fd);
563 * @return the number of bytes read on success, #GNUNET_SYSERR on failure 552 * @return the number of bytes read on success, #GNUNET_SYSERR on failure
564 */ 553 */
565ssize_t 554ssize_t
566GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h, 555GNUNET_DISK_file_read(const struct GNUNET_DISK_FileHandle *h,
567 void *result, 556 void *result,
568 size_t len); 557 size_t len);
569 558
570 559
571/** 560/**
@@ -579,9 +568,9 @@ GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h,
579 * @return the number of bytes read on success, #GNUNET_SYSERR on failure 568 * @return the number of bytes read on success, #GNUNET_SYSERR on failure
580 */ 569 */
581ssize_t 570ssize_t
582GNUNET_DISK_file_read_non_blocking (const struct GNUNET_DISK_FileHandle * h, 571GNUNET_DISK_file_read_non_blocking(const struct GNUNET_DISK_FileHandle * h,
583 void *result, 572 void *result,
584 size_t len); 573 size_t len);
585 574
586 575
587/** 576/**
@@ -593,9 +582,9 @@ GNUNET_DISK_file_read_non_blocking (const struct GNUNET_DISK_FileHandle * h,
593 * @return number of bytes read, #GNUNET_SYSERR on failure 582 * @return number of bytes read, #GNUNET_SYSERR on failure
594 */ 583 */
595ssize_t 584ssize_t
596GNUNET_DISK_fn_read (const char *fn, 585GNUNET_DISK_fn_read(const char *fn,
597 void *result, 586 void *result,
598 size_t len); 587 size_t len);
599 588
600 589
601/** 590/**
@@ -607,9 +596,9 @@ GNUNET_DISK_fn_read (const char *fn,
607 * @return number of bytes written on success, #GNUNET_SYSERR on error 596 * @return number of bytes written on success, #GNUNET_SYSERR on error
608 */ 597 */
609ssize_t 598ssize_t
610GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h, 599GNUNET_DISK_file_write(const struct GNUNET_DISK_FileHandle *h,
611 const void *buffer, 600 const void *buffer,
612 size_t n); 601 size_t n);
613 602
614 603
615/** 604/**
@@ -621,9 +610,9 @@ GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h,
621 * @return number of bytes written on success, #GNUNET_SYSERR on error 610 * @return number of bytes written on success, #GNUNET_SYSERR on error
622 */ 611 */
623ssize_t 612ssize_t
624GNUNET_DISK_file_write_blocking (const struct GNUNET_DISK_FileHandle *h, 613GNUNET_DISK_file_write_blocking(const struct GNUNET_DISK_FileHandle *h,
625 const void *buffer, 614 const void *buffer,
626 size_t n); 615 size_t n);
627 616
628 617
629/** 618/**
@@ -637,10 +626,10 @@ GNUNET_DISK_file_write_blocking (const struct GNUNET_DISK_FileHandle *h,
637 * @return number of bytes written on success, #GNUNET_SYSERR on error 626 * @return number of bytes written on success, #GNUNET_SYSERR on error
638 */ 627 */
639ssize_t 628ssize_t
640GNUNET_DISK_fn_write (const char *fn, 629GNUNET_DISK_fn_write(const char *fn,
641 const void *buffer, 630 const void *buffer,
642 size_t n, 631 size_t n,
643 enum GNUNET_DISK_AccessPermissions mode); 632 enum GNUNET_DISK_AccessPermissions mode);
644 633
645 634
646/** 635/**
@@ -651,8 +640,8 @@ GNUNET_DISK_fn_write (const char *fn,
651 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 640 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
652 */ 641 */
653int 642int
654GNUNET_DISK_file_copy (const char *src, 643GNUNET_DISK_file_copy(const char *src,
655 const char *dst); 644 const char *dst);
656 645
657 646
658/** 647/**
@@ -664,9 +653,9 @@ GNUNET_DISK_file_copy (const char *src,
664 * @return the number of files found, -1 on error 653 * @return the number of files found, -1 on error
665 */ 654 */
666int 655int
667GNUNET_DISK_directory_scan (const char *dir_name, 656GNUNET_DISK_directory_scan(const char *dir_name,
668 GNUNET_FileNameCallback callback, 657 GNUNET_FileNameCallback callback,
669 void *callback_cls); 658 void *callback_cls);
670 659
671 660
672/** 661/**
@@ -678,7 +667,7 @@ GNUNET_DISK_directory_scan (const char *dir_name,
678 * #GNUNET_NO if directory exists but is not writeable 667 * #GNUNET_NO if directory exists but is not writeable
679 */ 668 */
680int 669int
681GNUNET_DISK_directory_create_for_file (const char *filename); 670GNUNET_DISK_directory_create_for_file(const char *filename);
682 671
683 672
684/** 673/**
@@ -694,7 +683,7 @@ GNUNET_DISK_directory_create_for_file (const char *filename);
694 * does not exist or `stat`ed 683 * does not exist or `stat`ed
695 */ 684 */
696int 685int
697GNUNET_DISK_directory_test (const char *fil, int is_readable); 686GNUNET_DISK_directory_test(const char *fil, int is_readable);
698 687
699 688
700/** 689/**
@@ -705,7 +694,7 @@ GNUNET_DISK_directory_test (const char *fil, int is_readable);
705 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 694 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
706 */ 695 */
707int 696int
708GNUNET_DISK_directory_remove (const char *filename); 697GNUNET_DISK_directory_remove(const char *filename);
709 698
710 699
711/** 700/**
@@ -716,8 +705,8 @@ GNUNET_DISK_directory_remove (const char *filename);
716 * @param option option with the dir name to purge 705 * @param option option with the dir name to purge
717 */ 706 */
718void 707void
719GNUNET_DISK_purge_cfg_dir (const char *cfg_filename, 708GNUNET_DISK_purge_cfg_dir(const char *cfg_filename,
720 const char *option); 709 const char *option);
721 710
722 711
723/** 712/**
@@ -727,7 +716,7 @@ GNUNET_DISK_purge_cfg_dir (const char *cfg_filename,
727 * @returns #GNUNET_SYSERR on failure, #GNUNET_OK otherwise 716 * @returns #GNUNET_SYSERR on failure, #GNUNET_OK otherwise
728 */ 717 */
729int 718int
730GNUNET_DISK_directory_create (const char *dir); 719GNUNET_DISK_directory_create(const char *dir);
731 720
732 721
733/** 722/**
@@ -740,9 +729,9 @@ GNUNET_DISK_directory_create (const char *dir);
740 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 729 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
741 */ 730 */
742int 731int
743GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, 732GNUNET_DISK_file_lock(struct GNUNET_DISK_FileHandle *fh,
744 off_t lock_start, 733 off_t lock_start,
745 off_t lock_end, int excl); 734 off_t lock_end, int excl);
746 735
747 736
748/** 737/**
@@ -754,9 +743,9 @@ GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh,
754 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 743 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
755 */ 744 */
756int 745int
757GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh, 746GNUNET_DISK_file_unlock(struct GNUNET_DISK_FileHandle *fh,
758 off_t unlock_start, 747 off_t unlock_start,
759 off_t unlock_end); 748 off_t unlock_end);
760 749
761 750
762/** 751/**
@@ -764,7 +753,7 @@ GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh,
764 * @param fn the filename to canonicalize 753 * @param fn the filename to canonicalize
765 */ 754 */
766void 755void
767GNUNET_DISK_filename_canonicalize (char *fn); 756GNUNET_DISK_filename_canonicalize(char *fn);
768 757
769 758
770/** 759/**
@@ -774,8 +763,8 @@ GNUNET_DISK_filename_canonicalize (char *fn);
774 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure 763 * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure
775 */ 764 */
776int 765int
777GNUNET_DISK_file_change_owner (const char *filename, 766GNUNET_DISK_file_change_owner(const char *filename,
778 const char *user); 767 const char *user);
779 768
780 769
781/** 770/**
@@ -793,10 +782,10 @@ struct GNUNET_DISK_MapHandle;
793 * @return pointer to the mapped memory region, NULL on failure 782 * @return pointer to the mapped memory region, NULL on failure
794 */ 783 */
795void * 784void *
796GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h, 785GNUNET_DISK_file_map(const struct GNUNET_DISK_FileHandle *h,
797 struct GNUNET_DISK_MapHandle **m, 786 struct GNUNET_DISK_MapHandle **m,
798 enum GNUNET_DISK_MapType access, 787 enum GNUNET_DISK_MapType access,
799 size_t len); 788 size_t len);
800 789
801 790
802/** 791/**
@@ -806,7 +795,7 @@ GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h,
806 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 795 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
807 */ 796 */
808int 797int
809GNUNET_DISK_file_unmap (struct GNUNET_DISK_MapHandle *h); 798GNUNET_DISK_file_unmap(struct GNUNET_DISK_MapHandle *h);
810 799
811 800
812/** 801/**
@@ -816,7 +805,7 @@ GNUNET_DISK_file_unmap (struct GNUNET_DISK_MapHandle *h);
816 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 805 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
817 */ 806 */
818int 807int
819GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h); 808GNUNET_DISK_file_sync(const struct GNUNET_DISK_FileHandle *h);
820 809
821 810
822#if 0 /* keep Emacsens' auto-indent happy */ 811#if 0 /* keep Emacsens' auto-indent happy */