XRootD
XrdPosixPreload.cc
Go to the documentation of this file.
1 /******************************************************************************/
2 /* */
3 /* X r d P o s i x P r e l o a d . c c */
4 /* */
5 /* (c) 2005 by the Board of Trustees of the Leland Stanford, Jr., University */
6 /* All Rights Reserved */
7 /* Produced by Andrew Hanushevsky for Stanford University under contract */
8 /* DE-AC02-76-SFO0515 with the Department of Energy */
9 /* */
10 /* This file is part of the XRootD software suite. */
11 /* */
12 /* XRootD is free software: you can redistribute it and/or modify it under */
13 /* the terms of the GNU Lesser General Public License as published by the */
14 /* Free Software Foundation, either version 3 of the License, or (at your */
15 /* option) any later version. */
16 /* */
17 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
18 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
19 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
20 /* License for more details. */
21 /* */
22 /* You should have received a copy of the GNU Lesser General Public License */
23 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
24 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
25 /* */
26 /* The copyright holder's institutional names and contributor's names may not */
27 /* be used to endorse or promote products derived from this software without */
28 /* specific prior written permission of the institution or contributor. */
29 /******************************************************************************/
30 
31 #if defined(__clang__) && defined(_FORTIFY_SOURCE)
32 #undef _FORTIFY_SOURCE
33 #endif
34 
35 #if defined(__APPLE__)
36 #define _DARWIN_USE_64_BIT_INODE 1
37 #endif
38 
39 #include <sys/types.h>
40 #include <cstdarg>
41 #include <unistd.h>
42 #include <cstdlib>
43 
46 
47 /******************************************************************************/
48 /* P r e - D e c l a r a t i o n s */
49 /******************************************************************************/
50 
52 
53 #ifdef MUSL
54 #undef creat64
55 #undef fseeko64
56 #undef ftello64
57 #undef ftruncate64
58 #undef lseek64
59 #undef open64
60 #undef pread64
61 #undef pwrite64
62 #undef readdir64
63 #undef readdir64_r
64 #undef statfs64
65 #undef statvfs64
66 #undef truncate64
67 #undef fstat64
68 #undef stat64
69 #undef fstatat64
70 #undef lstat64
71 #endif
72 
73 /******************************************************************************/
74 /* G l o b a l D e c l a r a t i o n s */
75 /******************************************************************************/
76 
77 extern XrdPosixLinkage Xunix;
78 
79 namespace {bool isLite = (getenv("XRD_POSIX_PRELOAD_LITE") != 0);}
80 
81 /******************************************************************************/
82 /* a c c e s s */
83 /******************************************************************************/
84 
85 extern "C"
86 {
87 int access(const char *path, int amode)
88 {
89  static int Init = Xunix.Init(&Init);
90 
91  return XrdPosix_Access(path, amode);
92 }
93 }
94 
95 /******************************************************************************/
96 /* a c l */
97 /******************************************************************************/
98 
99 // This is a required addition for Solaris 10+ systems
100 
101 extern "C"
102 {
103 int acl(const char *path, int cmd, int nentries, void *aclbufp)
104 {
105  static int Init = Xunix.Init(&Init);
106 
107  return XrdPosix_Acl(path, cmd, nentries, aclbufp);
108 }
109 }
110 
111 /******************************************************************************/
112 /* c h d i r */
113 /******************************************************************************/
114 
115 extern "C"
116 {
117 int chdir(const char *path)
118 {
119  static int Init = Xunix.Init(&Init);
120 
121  return (isLite ? Xunix.Chdir(path) : XrdPosix_Chdir(path));
122 }
123 }
124 
125 /******************************************************************************/
126 /* c l o s e */
127 /******************************************************************************/
128 
129 extern "C"
130 {
131 int close(int fildes)
132 {
133  static int Init = Xunix.Init(&Init);
134 
135  return XrdPosix_Close(fildes);
136 }
137 }
138 
139 /******************************************************************************/
140 /* c l o s e d i r */
141 /******************************************************************************/
142 
143 extern "C"
144 {
145 int closedir(DIR *dirp)
146 {
147  static int Init = Xunix.Init(&Init);
148 
149  return (isLite ? Xunix.Closedir(dirp) : XrdPosix_Closedir(dirp));
150 }
151 }
152 
153 /******************************************************************************/
154 /* c r e a t */
155 /******************************************************************************/
156 
157 extern "C"
158 {
159 int creat64(const char *path, mode_t mode)
160 {
161  static int Init = Xunix.Init(&Init);
162 
163  return XrdPosix_Creat(path, mode);
164 }
165 }
166 
167 /******************************************************************************/
168 /* f c l o s e */
169 /******************************************************************************/
170 
171 extern "C"
172 {
173 int fclose(FILE *stream)
174 {
175  static int Init = Xunix.Init(&Init);
176 
177  return XrdPosix_Fclose(stream);
178 }
179 }
180 
181 /******************************************************************************/
182 /* f c n t l 6 4 */
183 /******************************************************************************/
184 
185 extern "C"
186 {
187 int fcntl64(int fd, int cmd, ...)
188 {
189  static int Init = Xunix.Init(&Init);
190  va_list ap;
191  void *theArg;
192 
193  va_start(ap, cmd);
194  theArg = va_arg(ap, void *);
195  va_end(ap);
196  return XrdPosix_Fcntl(fd, cmd, theArg);
197 }
198 }
199 
200 /******************************************************************************/
201 /* f d a t a s y n c */
202 /******************************************************************************/
203 // On Mac it is the same as fsync
204 #if !defined(__APPLE__)
205 extern "C"
206 {
207 int fdatasync(int fildes)
208 {
209  static int Init = Xunix.Init(&Init);
210 
211  return XrdPosix_Fdatasync(fildes);
212 }
213 }
214 #endif
215 
216 /******************************************************************************/
217 /* f f l u s h */
218 /******************************************************************************/
219 
220 extern "C"
221 {
222 int fflush(FILE *stream)
223 {
224  static int Init = Xunix.Init(&Init);
225 
226  return XrdPosix_Fflush(stream);
227 }
228 }
229 
230 /******************************************************************************/
231 /* f o p e n */
232 /******************************************************************************/
233 
234 extern "C"
235 {
236 FILE *fopen64(const char *path, const char *mode)
237 {
238  static int Init = Xunix.Init(&Init);
239 
240  return XrdPosix_Fopen(path, mode);
241 }
242 }
243 
244 /******************************************************************************/
245 /* f r e a d */
246 /******************************************************************************/
247 
248 extern "C"
249 {
250 size_t fread(void *ptr, size_t size, size_t nitems, FILE *stream)
251 {
252  static int Init = Xunix.Init(&Init);
253 
254  return XrdPosix_Fread(ptr, size, nitems, stream);
255 }
256 }
257 
258 /******************************************************************************/
259 /* f s e e k */
260 /******************************************************************************/
261 
262 extern "C"
263 {
264 int fseek(FILE *stream, long offset, int whence)
265 {
266  static int Init = Xunix.Init(&Init);
267 
268  return XrdPosix_Fseek(stream, offset, whence);
269 }
270 }
271 
272 /******************************************************************************/
273 /* f s e e k o */
274 /******************************************************************************/
275 
276 extern "C"
277 {
278 int fseeko64(FILE *stream, off64_t offset, int whence)
279 {
280  static int Init = Xunix.Init(&Init);
281 
282  return XrdPosix_Fseeko(stream, offset, whence);
283 }
284 }
285 
286 /******************************************************************************/
287 /* f s t a t */
288 /******************************************************************************/
289 
290 extern "C"
291 {
292 #if defined(__linux__) && defined(_STAT_VER) && __GNUC__ && __GNUC__ >= 2
293  int __fxstat64( int ver, int fildes, struct stat64 *buf)
294 #else
295  int fstat64( int fildes, struct stat64 *buf)
296 #endif
297 {
298  static int Init = Xunix.Init(&Init);
299 #if defined(__linux__) && defined(_STAT_VER) && __GNUC__ && __GNUC__ >= 2
300  return XrdPosix_FstatV ( ver, fildes, (struct stat *)buf);
301 #else
302  return XrdPosix_Fstat ( fildes, (struct stat *)buf);
303 #endif
304 }
305 }
306 
307 /******************************************************************************/
308 /* f s t a t a t */
309 /******************************************************************************/
310 
311 extern "C"
312 {
313  int fstatat64(int dirfd, const char* path, struct stat64 *buf, int flags){
314  static int Init = Xunix.Init(&Init);
315  return XrdPosix_Fstatat (dirfd, path, (struct stat *)buf, flags);
316  }
317 }
318 
319 /******************************************************************************/
320 /* f s y n c */
321 /******************************************************************************/
322 
323 extern "C"
324 {
325 int fsync(int fildes)
326 {
327  static int Init = Xunix.Init(&Init);
328 
329  return XrdPosix_Fsync(fildes);
330 }
331 }
332 
333 /******************************************************************************/
334 /* f t e l l */
335 /******************************************************************************/
336 
337 extern "C"
338 {
339 long ftell(FILE *stream)
340 {
341  static int Init = Xunix.Init(&Init);
342 
343  return XrdPosix_Ftell(stream);
344 }
345 }
346 
347 /******************************************************************************/
348 /* f t e l l o */
349 /******************************************************************************/
350 
351 extern "C"
352 {
353 off64_t ftello64(FILE *stream)
354 {
355  static int Init = Xunix.Init(&Init);
356 
357  return XrdPosix_Ftello(stream);
358 }
359 }
360 
361 /******************************************************************************/
362 /* f t r u n c a t e */
363 /******************************************************************************/
364 
365 extern "C"
366 {
367 int ftruncate64(int fildes, off_t offset)
368 {
369  static int Init = Xunix.Init(&Init);
370 
371  return XrdPosix_Ftruncate(fildes, offset);
372 }
373 }
374 
375 /******************************************************************************/
376 /* f w r i t e */
377 /******************************************************************************/
378 
379 extern "C"
380 {
381 size_t fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream)
382 {
383  static int Init = Xunix.Init(&Init);
384 
385  return XrdPosix_Fwrite(ptr, size, nitems, stream);
386 }
387 }
388 
389 /******************************************************************************/
390 /* f g e t x a t t r */
391 /******************************************************************************/
392 
393 #if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
394 extern "C"
395 {
396 ssize_t fgetxattr (int fd, const char *name, void *value, size_t size)
397 {
398  static int Init = Xunix.Init(&Init);
399 
400  return XrdPosix_Fgetxattr(fd, name, value, size);
401 }
402 }
403 #endif
404 
405 /******************************************************************************/
406 /* g e t x a t t r */
407 /******************************************************************************/
408 
409 #if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
410 extern "C"
411 {
412 ssize_t getxattr (const char *path, const char *name, void *value, size_t size)
413 {
414  static int Init = Xunix.Init(&Init);
415 
416  return XrdPosix_Getxattr(path, name, value, size);
417 }
418 }
419 #endif
420 
421 /******************************************************************************/
422 /* l g e t x a t t r */
423 /******************************************************************************/
424 
425 #if defined(__linux__) || defined(__GNU__) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
426 extern "C"
427 {
428 ssize_t lgetxattr (const char *path, const char *name, void *value, size_t size)
429 {
430  static int Init = Xunix.Init(&Init);
431 
432  return XrdPosix_Lgetxattr(path, name, value, size);
433 }
434 }
435 #endif
436 
437 /******************************************************************************/
438 /* l s e e k */
439 /******************************************************************************/
440 
441 extern "C"
442 {
443 off64_t lseek64(int fildes, off64_t offset, int whence)
444 {
445  static int Init = Xunix.Init(&Init);
446 
447  return XrdPosix_Lseek(fildes, offset, whence);
448 }
449 }
450 
451 /******************************************************************************/
452 /* l l s e e k */
453 /******************************************************************************/
454 
455 extern "C"
456 {
457 #if defined(__linux__) || defined(__APPLE__)
458 off_t llseek(int fildes, off_t offset, int whence)
459 #else
460 offset_t llseek(int fildes, offset_t offset, int whence)
461 #endif
462 {
463  static int Init = Xunix.Init(&Init);
464 
465  return XrdPosix_Lseek(fildes, offset, whence);
466 }
467 }
468 
469 /******************************************************************************/
470 /* l s t a t */
471 /******************************************************************************/
472 
473 extern "C"
474 {
475 #if defined __linux__ && defined(_STAT_VER) && __GNUC__ && __GNUC__ >= 2
476 int __lxstat64(int ver, const char *path, struct stat64 *buf)
477 #else
478 int lstat64( const char *path, struct stat64 *buf)
479 #endif
480 {
481  static int Init = Xunix.Init(&Init);
482  return XrdPosix_Lstat(path, (struct stat *)buf);
483 }
484 }
485 
486 /******************************************************************************/
487 /* m k d i r */
488 /******************************************************************************/
489 
490 extern "C"
491 {
492 int mkdir(const char *path, mode_t mode)
493 {
494  static int Init = Xunix.Init(&Init);
495 
496  return (isLite ? Xunix.Mkdir(path, mode) : XrdPosix_Mkdir(path, mode));
497 }
498 }
499 
500 /******************************************************************************/
501 /* o p e n */
502 /******************************************************************************/
503 
504 extern "C"
505 {
506 int open64(const char *path, int oflag, ...)
507 {
508  static int Init = Xunix.Init(&Init);
509  va_list ap;
510  int mode;
511 
512  va_start(ap, oflag);
513  mode = va_arg(ap, int);
514  va_end(ap);
515  return XrdPosix_Open(path, oflag, mode);
516 }
517 }
518 
519 /******************************************************************************/
520 /* o p e n a t */
521 /******************************************************************************/
522 
523 extern "C"
524 {
525  int openat(int dirfd, const char *path, int flag, ...)
526 {
527  static int Init = Xunix.Init(&Init);
528  va_list ap;
529  int mode;
530 
531  va_start(ap, flag);
532  mode = va_arg(ap, int);
533  va_end(ap);
534  return XrdPosix_Openat(dirfd, path, flag, mode);
535 }
536 }
537 
538 /******************************************************************************/
539 /* o p e n d i r */
540 /******************************************************************************/
541 
542 extern "C"
543 {
544 DIR* opendir(const char *path)
545 {
546  static int Init = Xunix.Init(&Init);
547 
548  return (isLite ? Xunix.Opendir(path) : XrdPosix_Opendir(path));
549 }
550 }
551 
552 /******************************************************************************/
553 /* p a t h c o n f */
554 /******************************************************************************/
555 
556 // This is a required addition for Solaris 10+ systems
557 
558 extern "C"
559 {
560 long pathconf(const char *path, int name)
561 {
562  static int Init = Xunix.Init(&Init);
563 
564  return XrdPosix_Pathconf(path, name);
565 }
566 }
567 
568 /******************************************************************************/
569 /* p r e a d */
570 /******************************************************************************/
571 
572 extern "C"
573 {
574 ssize_t pread64(int fildes, void *buf, size_t nbyte, off_t offset)
575 {
576  static int Init = Xunix.Init(&Init);
577 
578  return XrdPosix_Pread (fildes, buf, nbyte, offset);
579 }
580 }
581 
582 /******************************************************************************/
583 /* p w r i t e */
584 /******************************************************************************/
585 
586 extern "C"
587 {
588 ssize_t pwrite64(int fildes, const void *buf, size_t nbyte, off_t offset)
589 {
590  static int Init = Xunix.Init(&Init);
591 
592  return XrdPosix_Pwrite(fildes, buf, nbyte, offset);
593 }
594 }
595 
596 /******************************************************************************/
597 /* r e a d */
598 /******************************************************************************/
599 
600 extern "C"
601 {
602 ssize_t read(int fildes, void *buf, size_t nbyte)
603 {
604  static int Init = Xunix.Init(&Init);
605 
606  return XrdPosix_Read(fildes, buf, nbyte);
607 }
608 }
609 
610 /******************************************************************************/
611 /* r e a d v */
612 /******************************************************************************/
613 
614 extern "C"
615 {
616 ssize_t readv(int fildes, const struct iovec *iov, int iovcnt)
617 {
618  static int Init = Xunix.Init(&Init);
619 
620  return XrdPosix_Readv(fildes, iov, iovcnt);
621 }
622 }
623 
624 /******************************************************************************/
625 /* r e a d d i r */
626 /******************************************************************************/
627 
628 extern "C"
629 {
630 struct dirent64* readdir64(DIR *dirp)
631 {
632  static int Init = Xunix.Init(&Init);
633 
634  return (isLite ? Xunix.Readdir64(dirp) : XrdPosix_Readdir64(dirp));
635 }
636 }
637 
638 /******************************************************************************/
639 /* r e a d d i r _ r */
640 /******************************************************************************/
641 
642 extern "C"
643 {
644 int readdir64_r(DIR *dirp, struct dirent64 *entry, struct dirent64 **result)
645 {
646  static int Init = Xunix.Init(&Init);
647 
648  return (isLite ? Xunix.Readdir64_r(dirp, entry, result) :
649  XrdPosix_Readdir64_r(dirp, entry, result));
650 }
651 }
652 
653 /******************************************************************************/
654 /* r e n a m e */
655 /******************************************************************************/
656 
657 extern "C"
658 {
659 int rename(const char *oldpath, const char *newpath)
660 {
661  static int Init = Xunix.Init(&Init);
662 
663  return (isLite ? Xunix.Rename(oldpath, newpath) : XrdPosix_Rename(oldpath, newpath));
664 }
665 }
666 
667 /******************************************************************************/
668 /* r e w i n d d i r */
669 /******************************************************************************/
670 
671 #ifndef rewinddir
672 extern "C"
673 {
674 void rewinddir(DIR *dirp)
675 {
676  static int Init = Xunix.Init(&Init);
677 
678  (isLite ? Xunix.Rewinddir(dirp) : XrdPosix_Rewinddir(dirp));
679 }
680 }
681 #endif
682 
683 /******************************************************************************/
684 /* r m d i r */
685 /******************************************************************************/
686 
687 extern "C"
688 {
689 int rmdir(const char *path)
690 {
691  static int Init = Xunix.Init(&Init);
692 
693  return (isLite ? Xunix.Rmdir(path) : XrdPosix_Rmdir(path));
694 }
695 }
696 
697 /******************************************************************************/
698 /* s e e k d i r */
699 /******************************************************************************/
700 
701 extern "C"
702 {
703 void seekdir(DIR *dirp, long loc)
704 {
705  static int Init = Xunix.Init(&Init);
706 
707  (isLite ? Xunix.Seekdir(dirp, loc) : XrdPosix_Seekdir(dirp, loc));
708 }
709 }
710 
711 /******************************************************************************/
712 /* s t a t */
713 /******************************************************************************/
714 
715 extern "C"
716 {
717 #if defined __linux__ && defined(_STAT_VER) && __GNUC__ && __GNUC__ >= 2
718 int __xstat64(int ver, const char *path, struct stat64 *buf)
719 #else
720 int stat64( const char *path, struct stat64 *buf)
721 #endif
722 {
723  static int Init = Xunix.Init(&Init);
724 
725  return XrdPosix_Stat(path, (struct stat *)buf);
726 }
727 }
728 
729 /******************************************************************************/
730 /* s t a t f s */
731 /******************************************************************************/
732 
733 #if !defined(__solaris__)
734 extern "C"
735 {
736 int statfs64( const char *path, struct statfs64 *buf)
737 {
738  static int Init = Xunix.Init(&Init);
739 
740  return XrdPosix_Statfs(path, (struct statfs *)buf);
741 }
742 }
743 #endif
744 
745 /******************************************************************************/
746 /* s t a t v f s */
747 /******************************************************************************/
748 
749 extern "C"
750 {
751 int statvfs64( const char *path, struct statvfs64 *buf)
752 {
753  static int Init = Xunix.Init(&Init);
754 
755  return XrdPosix_Statvfs(path, (struct statvfs *)buf);
756 }
757 }
758 
759 /******************************************************************************/
760 /* s t a t x */
761 /******************************************************************************/
762 #ifdef HAVE_STATX
763 extern "C"
764 {
765 int statx(int dirfd, const char *path, int flags,
766  unsigned int mask, struct statx *stx)
767 {
768  static int Init = Xunix.Init(&Init);
769 
770  return XrdPosix_Statx(dirfd, path, flags, mask, stx);
771 }
772 }
773 
774 /******************************************************************************/
775 /* t e l l d i r */
776 /******************************************************************************/
777 
778 extern "C"
779 {
780 long telldir(DIR *dirp)
781 {
782  static int Init = Xunix.Init(&Init);
783 
784  return (isLite ? Xunix.Telldir(dirp) : XrdPosix_Telldir(dirp));
785 }
786 }
787 
788 /******************************************************************************/
789 /* t r u n c a t e */
790 /******************************************************************************/
791 
792 extern "C"
793 {
794 int truncate64(const char *path, off_t offset)
795 {
796  static int Init = Xunix.Init(&Init);
797 
798  return XrdPosix_Truncate(path, offset);
799 }
800 }
801 
802 /******************************************************************************/
803 /* u n l i n k */
804 /******************************************************************************/
805 
806 extern "C"
807 {
808 int unlink(const char *path)
809 {
810  static int Init = Xunix.Init(&Init);
811 
812  return (isLite ? Xunix.Unlink(path) : XrdPosix_Unlink(path));
813 }
814 }
815 
816 /******************************************************************************/
817 /* w r i t e */
818 /******************************************************************************/
819 
820 extern "C"
821 {
822 ssize_t write(int fildes, const void *buf, size_t nbyte)
823 {
824  static int Init = Xunix.Init(&Init);
825 
826  return XrdPosix_Write(fildes, buf, nbyte);
827 }
828 }
829 
830 /******************************************************************************/
831 /* w r i t e v */
832 /******************************************************************************/
833 
834 extern "C"
835 {
836 ssize_t writev(int fildes, const struct iovec *iov, int iovcnt)
837 {
838  static int Init = Xunix.Init(&Init);
839 
840  return XrdPosix_Writev(fildes, iov, iovcnt);
841 }
842 }
843 #endif
int chdir(const char *path)
int openat(int dirfd, const char *path, int flag,...)
ssize_t pwrite64(int fildes, const void *buf, size_t nbyte, off_t offset)
off64_t lseek64(int fildes, off64_t offset, int whence)
offset_t llseek(int fildes, offset_t offset, int whence)
int fseeko64(FILE *stream, off64_t offset, int whence)
int statvfs64(const char *path, struct statvfs64 *buf)
int acl(const char *path, int cmd, int nentries, void *aclbufp)
off64_t ftello64(FILE *stream)
ssize_t pread64(int fildes, void *buf, size_t nbyte, off_t offset)
size_t fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream)
size_t fread(void *ptr, size_t size, size_t nitems, FILE *stream)
int rename(const char *oldpath, const char *newpath)
int fcntl64(int fd, int cmd,...)
FILE * fopen64(const char *path, const char *mode)
int mkdir(const char *path, mode_t mode)
long ftell(FILE *stream)
int fseek(FILE *stream, long offset, int whence)
int statfs64(const char *path, struct statfs64 *buf)
int fsync(int fildes)
ssize_t readv(int fildes, const struct iovec *iov, int iovcnt)
void seekdir(DIR *dirp, long loc)
int fclose(FILE *stream)
int readdir64_r(DIR *dirp, struct dirent64 *entry, struct dirent64 **result)
int fstat64(int fildes, struct stat64 *buf)
struct dirent64 * readdir64(DIR *dirp)
int ftruncate64(int fildes, off_t offset)
long pathconf(const char *path, int name)
int access(const char *path, int amode)
int close(int fildes)
int closedir(DIR *dirp)
int rmdir(const char *path)
XrdPosixLinkage Xunix
int creat64(const char *path, mode_t mode)
int lstat64(const char *path, struct stat64 *buf)
void rewinddir(DIR *dirp)
int open64(const char *path, int oflag,...)
int fflush(FILE *stream)
ssize_t read(int fildes, void *buf, size_t nbyte)
int fstatat64(int dirfd, const char *path, struct stat64 *buf, int flags)
int fdatasync(int fildes)
int stat64(const char *path, struct stat64 *buf)
DIR * opendir(const char *path)
int XrdPosix_Statfs(const char *path, struct statfs *buf)
Definition: XrdPosix.cc:1133
int XrdPosix_Truncate(const char *path, off_t offset)
Definition: XrdPosix.cc:1194
ssize_t XrdPosix_Read(int fildes, void *buf, size_t nbyte)
Definition: XrdPosix.cc:898
int XrdPosix_Closedir(DIR *dirp)
Definition: XrdPosix.cc:235
int XrdPosix_Fsync(int fildes)
Definition: XrdPosix.cc:544
ssize_t XrdPosix_Readv(int fildes, const struct iovec *iov, int iovcnt)
Definition: XrdPosix.cc:914
long long XrdPosix_Ftello(FILE *stream)
Definition: XrdPosix.cc:577
int XrdPosix_Open(const char *path, int oflag,...)
Definition: XrdPosix.cc:747
void XrdPosix_Rewinddir(DIR *dirp)
Definition: XrdPosix.cc:1008
ssize_t XrdPosix_Pread(int fildes, void *buf, size_t nbyte, off_t offset)
Definition: XrdPosix.cc:866
int XrdPosix_Readdir64_r(DIR *dirp, struct dirent64 *entry, struct dirent64 **result)
Definition: XrdPosix.cc:966
int XrdPosix_Close(int fildes)
Definition: XrdPosix.cc:220
int XrdPosix_Openat(int dirfd, const char *path, int flag,...)
Definition: XrdPosix.cc:781
void XrdPosix_Seekdir(DIR *dirp, long loc)
Definition: XrdPosix.cc:1049
int XrdPosix_Rmdir(const char *path)
Definition: XrdPosix.cc:1024
int XrdPosix_Chdir(const char *path)
Definition: XrdPosix.cc:199
FILE * XrdPosix_Fopen(const char *path, const char *mode)
Definition: XrdPosix.cc:353
int XrdPosix_Stat(const char *path, struct stat *buf)
Definition: XrdPosix.cc:1065
int XrdPosix_Rename(const char *oldpath, const char *newpath)
Definition: XrdPosix.cc:982
int XrdPosix_Fcntl(int fd, int cmd,...)
Definition: XrdPosix.cc:283
int XrdPosix_Fseek(FILE *stream, long offset, int whence)
Definition: XrdPosix.cc:431
long XrdPosix_Ftell(FILE *stream)
Definition: XrdPosix.cc:560
int XrdPosix_Mkdir(const char *path, mode_t mode)
Definition: XrdPosix.cc:722
int XrdPosix_Fflush(FILE *stream)
Definition: XrdPosix.cc:333
ssize_t XrdPosix_Writev(int fildes, const struct iovec *iov, int iovcnt)
Definition: XrdPosix.cc:1260
DIR * XrdPosix_Opendir(const char *path)
Definition: XrdPosix.cc:821
long XrdPosix_Telldir(DIR *dirp)
Definition: XrdPosix.cc:1178
int XrdPosix_FstatV(int ver, int fildes, struct stat *buf)
Definition: XrdPosix.cc:480
ssize_t XrdPosix_Pwrite(int fildes, const void *buf, size_t nbyte, off_t offset)
Definition: XrdPosix.cc:882
int XrdPosix_Lstat(const char *path, struct stat *buf)
Definition: XrdPosix.cc:692
int XrdPosix_Fstatat(int dirfd, const char *path, struct stat *buf, int flags)
Definition: XrdPosix.cc:501
int XrdPosix_Creat(const char *path, mode_t mode)
Definition: XrdPosix.cc:249
int XrdPosix_Statx(int dirfd, const char *path, int flags, unsigned int mask, XrdSysStatx *stx)
Definition: XrdPosix.cc:1091
int XrdPosix_Statvfs(const char *path, struct statvfs *buf)
Definition: XrdPosix.cc:1156
int XrdPosix_Acl(const char *path, int cmd, int nentries, void *aclbufp)
Definition: XrdPosix.cc:181
int XrdPosix_Fstat(int fildes, struct stat *buf)
Definition: XrdPosix.cc:467
off_t XrdPosix_Lseek(int fildes, off_t offset, int whence)
Definition: XrdPosix.cc:676
ssize_t XrdPosix_Write(int fildes, const void *buf, size_t nbyte)
Definition: XrdPosix.cc:1244
size_t XrdPosix_Fwrite(const void *ptr, size_t size, size_t nitems, FILE *stream)
Definition: XrdPosix.cc:610
int XrdPosix_Fclose(FILE *stream)
Definition: XrdPosix.cc:263
int XrdPosix_Fdatasync(int fildes)
Definition: XrdPosix.cc:302
int XrdPosix_Ftruncate(int fildes, long long offset)
Definition: XrdPosix.cc:594
struct dirent64 * XrdPosix_Readdir64(DIR *dirp)
Definition: XrdPosix.cc:941
long XrdPosix_Pathconf(const char *path, int name)
Definition: XrdPosix.cc:848
int XrdPosix_Unlink(const char *path)
Definition: XrdPosix.cc:1219
size_t XrdPosix_Fread(void *ptr, size_t size, size_t nitems, FILE *stream)
Definition: XrdPosix.cc:405
int XrdPosix_Fseeko(FILE *stream, long long offset, int whence)
Definition: XrdPosix.cc:449
int XrdPosix_Access(const char *path, int amode)
Definition: XrdPosix.cc:152
#define getxattr(a, b, c, d)
Definition: XrdPosix.hh:129
#define write(a, b, c)
Definition: XrdPosix.hh:123
#define telldir(a)
Definition: XrdPosix.hh:117
#define fgetxattr(a, b, c, d)
Definition: XrdPosix.hh:133
#define statvfs(a, b)
Definition: XrdPosix.hh:135
#define writev(a, b, c)
Definition: XrdPosix.hh:125
#define unlink(a)
Definition: XrdPosix.hh:121
#define stat(a, b)
Definition: XrdPosix.hh:105
#define statx(d, p, f, m, b)
Definition: XrdPosix.hh:127
#define lgetxattr(a, b, c, d)
Definition: XrdPosix.hh:131
#define statfs(a, b)
Definition: XrdPosix.hh:111
#define dirfd(x)
Retv_Opendir(* Opendir)(Args_Opendir)
Retv_Mkdir(* Mkdir)(Args_Mkdir)
int Init(int *X=0)
Retv_Readdir64(* Readdir64)(Args_Readdir64)
Retv_Rename(* Rename)(Args_Rename)
Retv_Rewinddir(* Rewinddir)(Args_Rewinddir)
Retv_Telldir(* Telldir)(Args_Telldir)
Retv_Readdir64_r(* Readdir64_r)(Args_Readdir64_r)
Retv_Seekdir(* Seekdir)(Args_Seekdir)
Retv_Chdir(* Chdir)(Args_Chdir)
Retv_Closedir(* Closedir)(Args_Closedir)
Retv_Rmdir(* Rmdir)(Args_Rmdir)
Retv_Unlink(* Unlink)(Args_Unlink)