XRootD
XrdPosixExtern.hh File Reference
#include "XrdSys/XrdSysStatx.hh"
#include <dirent.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include "XrdPosix/XrdPosixOsDep.hh"
+ Include dependency graph for XrdPosixExtern.hh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int XrdPosix_Access (const char *path, int amode)
 
int XrdPosix_Acl (const char *path, int cmd, int nentries, void *aclbufp)
 
int XrdPosix_Chdir (const char *path)
 
int XrdPosix_Close (int fildes)
 
int XrdPosix_Closedir (DIR *dirp)
 
int XrdPosix_Creat (const char *path, mode_t mode)
 
int XrdPosix_Fclose (FILE *stream)
 
int XrdPosix_Fcntl (int fd, int cmd,...)
 
int XrdPosix_Fdatasync (int fildes)
 
int XrdPosix_Fflush (FILE *stream)
 
FILE * XrdPosix_Fopen (const char *path, const char *mode)
 
size_t XrdPosix_Fread (void *ptr, size_t size, size_t nitems, FILE *stream)
 
int XrdPosix_Fseek (FILE *stream, long offset, int whence)
 
int XrdPosix_Fseeko (FILE *stream, off_t offset, int whence)
 
int XrdPosix_Fstat (int fildes, struct stat *buf)
 
int XrdPosix_Fstatat (int dirfd, const char *path, struct stat *buf, int flags)
 
int XrdPosix_Fsync (int fildes)
 
long XrdPosix_Ftell (FILE *stream)
 
off_t XrdPosix_Ftello (FILE *stream)
 
int XrdPosix_Ftruncate (int fildes, off_t offset)
 
size_t XrdPosix_Fwrite (const void *ptr, size_t size, size_t nitems, FILE *stream)
 
int XrdPosix_isMyPath (const char *path)
 
off_t XrdPosix_Lseek (int fildes, off_t offset, int whence)
 
int XrdPosix_Lstat (const char *path, struct stat *buf)
 
int XrdPosix_Mkdir (const char *path, mode_t mode)
 
int XrdPosix_Open (const char *path, int oflag,...)
 
int XrdPosix_Openat (int dirfd, const char *path, int flag,...)
 
DIR * XrdPosix_Opendir (const char *path)
 
long XrdPosix_Pathconf (const char *path, int name)
 
ssize_t XrdPosix_Pread (int fildes, void *buf, size_t nbyte, off_t offset)
 
ssize_t XrdPosix_Pwrite (int fildes, const void *buf, size_t nbyte, off_t offset)
 
ssize_t XrdPosix_Read (int fildes, void *buf, size_t nbyte)
 
struct dirent * XrdPosix_Readdir (DIR *dirp)
 
struct dirent64 * XrdPosix_Readdir64 (DIR *dirp)
 
int XrdPosix_Readdir64_r (DIR *dirp, struct dirent64 *entry, struct dirent64 **result)
 
int XrdPosix_Readdir_r (DIR *dirp, struct dirent *entry, struct dirent **result)
 
ssize_t XrdPosix_Readv (int fildes, const struct iovec *iov, int iovcnt)
 
int XrdPosix_Rename (const char *oname, const char *nname)
 
void XrdPosix_Rewinddir (DIR *dirp)
 
int XrdPosix_Rmdir (const char *path)
 
void XrdPosix_Seekdir (DIR *dirp, long loc)
 
int XrdPosix_Stat (const char *path, struct stat *buf)
 
int XrdPosix_Statfs (const char *path, struct statfs *buf)
 
int XrdPosix_Statvfs (const char *path, struct statvfs *buf)
 
int XrdPosix_Statx (int dirfd, const char *path, int flags, unsigned int mask, XrdSysStatx *stx)
 
long XrdPosix_Telldir (DIR *dirp)
 
int XrdPosix_Truncate (const char *path, off_t offset)
 
int XrdPosix_Unlink (const char *path)
 
char * XrdPosix_URL (const char *path, char *buff, int blen)
 
ssize_t XrdPosix_Write (int fildes, const void *buf, size_t nbyte)
 
ssize_t XrdPosix_Writev (int fildes, const struct iovec *iov, int iovcnt)
 

Function Documentation

◆ XrdPosix_Access()

int XrdPosix_Access ( const char *  path,
int  amode 
)

Definition at line 152 of file XrdPosix.cc.

153 {
154  char *myPath, buff[2048];
155  char unref[2049];
156 
157  ssize_t res=XrdResolveLink(path, unref);
158  if (res > 0) {
159  // Return the results of a mkdir of a Unix file system
160  //
161  if (!(myPath = XrootPath.URL(unref, buff, sizeof(buff))))
162  return Xunix.Access( path, amode);
163 
164  // Return the results of our version of access()
165  //
166  return Xroot.Access(myPath, amode);
167  } else {
168  return res;
169  }
170 }
static ssize_t XrdResolveLink(const char *path, char *resolved)
Definition: XrdPosix.cc:114
XrdPosixXrootd Xroot
Definition: XrdPosix.cc:53
XrdPosixXrootPath XrootPath
Definition: XrdPosix.cc:55
XrdPosixLinkage Xunix
Retv_Access(* Access)(Args_Access)
char * URL(const char *path, char *buff, int blen)
static int Access(const char *path, int amode)
Access() conforms to POSIX.1-2001 access()

References XrdPosixXrootd::Access(), XrdPosixLinkage::Access, XrdPosixXrootPath::URL(), XrdResolveLink(), Xroot, XrootPath, and Xunix.

Referenced by access().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Acl()

int XrdPosix_Acl ( const char *  path,
int  cmd,
int  nentries,
void *  aclbufp 
)

Definition at line 181 of file XrdPosix.cc.

182 {
183  char unref[2049];
184 
185  ssize_t res=XrdResolveLink(path, unref);
186  if (res < 0) return res;
187  return (XrootPath.URL(unref, 0, 0)
188  ? Xunix.Acl("/tmp", cmd,nentries,aclbufp)
189  : Xunix.Acl(path, cmd,nentries,aclbufp));
190 }
Retv_Acl(* Acl)(Args_Acl)

References XrdPosixLinkage::Acl, XrdPosixXrootPath::URL(), XrdResolveLink(), XrootPath, and Xunix.

Referenced by acl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Chdir()

int XrdPosix_Chdir ( const char *  path)

Definition at line 199 of file XrdPosix.cc.

200 {
201  int rc;
202  char unref[2049];
203 
204  ssize_t res=XrdResolveLink(path, unref);
205  if (res < 0) return res;
206 
207  // Set the working directory if the actual chdir succeeded
208  //
209  if (!(rc = Xunix.Chdir(path))) XrootPath.CWD(unref);
210  return rc;
211 }
Retv_Chdir(* Chdir)(Args_Chdir)
void CWD(const char *path)

References XrdPosixLinkage::Chdir, XrdPosixXrootPath::CWD(), XrdResolveLink(), XrootPath, and Xunix.

Referenced by chdir().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Close()

int XrdPosix_Close ( int  fildes)

Definition at line 220 of file XrdPosix.cc.

221 {
222 
223 // Return result of the close
224 //
225  return (Xroot.myFD(fildes) ? Xroot.Close(fildes) : Xunix.Close(fildes));
226 }
Retv_Close(* Close)(Args_Close)
static int Close(int fildes)
Close() conforms to POSIX.1-2001 close()
static bool myFD(int fd)

References XrdPosixXrootd::Close(), XrdPosixLinkage::Close, XrdPosixXrootd::myFD(), Xroot, and Xunix.

Referenced by close().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Closedir()

int XrdPosix_Closedir ( DIR *  dirp)

Definition at line 235 of file XrdPosix.cc.

236 {
237 
238  return (Xroot.isXrootdDir(dirp) ? Xroot.Closedir(dirp)
239  : Xunix.Closedir(dirp));
240 }
Retv_Closedir(* Closedir)(Args_Closedir)
static int Closedir(DIR *dirp)
Closedir() conforms to POSIX.1-2001 closedir()
static bool isXrootdDir(DIR *dirp)

References XrdPosixXrootd::Closedir(), XrdPosixLinkage::Closedir, XrdPosixXrootd::isXrootdDir(), Xroot, and Xunix.

Referenced by closedir().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Creat()

int XrdPosix_Creat ( const char *  path,
mode_t  mode 
)

Definition at line 249 of file XrdPosix.cc.

250 {
251  extern int XrdPosix_Open(const char *path, int oflag, ...);
252 
253  return XrdPosix_Open(path, O_WRONLY | O_CREAT | O_TRUNC, mode);
254 }
int XrdPosix_Open(const char *path, int oflag,...)
Definition: XrdPosix.cc:747

References XrdPosix_Open().

Referenced by creat64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Fclose()

int XrdPosix_Fclose ( FILE *  stream)

Definition at line 263 of file XrdPosix.cc.

264 {
265  int nullfd = fileno(stream);
266 
267 // Close the associated file
268 //
269  if (Xroot.myFD(nullfd)) Xroot.Close(nullfd);
270 
271 // Now close the stream
272 //
273  return Xunix.Fclose(stream);
274 }
Retv_Fclose(* Fclose)(Args_Fclose)

References XrdPosixXrootd::Close(), XrdPosixLinkage::Fclose, XrdPosixXrootd::myFD(), Xroot, and Xunix.

Referenced by fclose().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Fcntl()

int XrdPosix_Fcntl ( int  fd,
int  cmd,
  ... 
)

Definition at line 283 of file XrdPosix.cc.

284 {
285  va_list ap;
286  void *theArg;
287 
288  if (Xroot.myFD(fd)) return 0;
289  va_start(ap, cmd);
290  theArg = va_arg(ap, void *);
291  va_end(ap);
292  return Xunix.Fcntl64(fd, cmd, theArg);
293 }
Retv_Fcntl64(* Fcntl64)(Args_Fcntl64)

References XrdPosixLinkage::Fcntl64, XrdPosixXrootd::myFD(), Xroot, and Xunix.

Referenced by fcntl64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Fdatasync()

int XrdPosix_Fdatasync ( int  fildes)

Definition at line 302 of file XrdPosix.cc.

303 {
304 
305 // Return the result of the sync
306 //
307  return (Xroot.myFD(fildes) ? Xroot.Fsync(fildes)
308  : Xunix.Fsync(fildes));
309 }
Retv_Fsync(* Fsync)(Args_Fsync)
static int Fsync(int fildes)
Fsync() conforms to POSIX.1-2001 fsync()

References XrdPosixXrootd::Fsync(), XrdPosixLinkage::Fsync, XrdPosixXrootd::myFD(), Xroot, and Xunix.

Referenced by fdatasync().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Fflush()

int XrdPosix_Fflush ( FILE *  stream)

Definition at line 333 of file XrdPosix.cc.

334 {
335 
336 // Return the result of the fseek
337 //
338  if (!stream || !Xroot.myFD(fileno(stream)))
339  return Xunix.Fflush(stream);
340 
341  return Xroot.Fsync(fileno(stream));
342 }
Retv_Fflush(* Fflush)(Args_Fflush)

References XrdPosixLinkage::Fflush, XrdPosixXrootd::Fsync(), XrdPosixXrootd::myFD(), Xroot, and Xunix.

Referenced by fflush().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Fopen()

FILE* XrdPosix_Fopen ( const char *  path,
const char *  mode 
)

Definition at line 353 of file XrdPosix.cc.

354 {
355  char *myPath, buff[2048];
356  int erc, fd, omode;
357  FILE *stream;
358 
359  char unref[2049];
360 
361  ssize_t res=XrdResolveLink(path, unref);
362  if (res < 0) return 0;
363 
364 // Transfer to unix if this is not our path
365 //
366  if (!(myPath = XrootPath.URL(unref, buff, sizeof(buff))))
367  return Xunix.Fopen64(path, mode);
368 
369 // Translate the mode flags
370 //
371  if (ISMODE("r") || ISMODE("rb")) omode = O_RDONLY;
372  else if (ISMODE("w") || ISMODE("wb")) omode = O_WRONLY
373  | O_CREAT | O_TRUNC;
374  else if (ISMODE("a") || ISMODE("ab")) omode = O_WRONLY
375  | O_CREAT | O_APPEND;
376  else if (ISMODE("r+") || ISMODE("rb+") || ISMODE("r+b")) omode = O_RDWR;
377  else if (ISMODE("w+") || ISMODE("wb+") || ISMODE("w+b")) omode = O_RDWR
378  | O_CREAT | O_TRUNC;
379  else if (ISMODE("a+") || ISMODE("ab+") || ISMODE("a+b")) omode = O_RDWR
380  | O_CREAT | O_APPEND;
381  else {errno = EINVAL; return 0;}
382 
383 // Now open the file
384 //
385  if ((fd = Xroot.Open(myPath, omode | XrdPosixXrootd::isStream , 0)) < 0)
386  return 0;
387 
388 // First obtain a free stream
389 //
390  if (!(stream = fdopen(fd, mode)))
391  {erc = errno; Xroot.Close(fd); errno = erc;}
392 
393 // All done
394 //
395  return stream;
396 }
#define ISMODE(x)
Definition: XrdPosix.cc:349
Retv_Fopen64(* Fopen64)(Args_Fopen64)
static const int isStream
static int Open(const char *path, int oflag, mode_t mode=0, XrdPosixCallBack *cbP=0)

References XrdPosixXrootd::Close(), XrdPosixLinkage::Fopen64, ISMODE, XrdPosixXrootd::isStream, XrdPosixXrootd::Open(), XrdPosixXrootPath::URL(), XrdResolveLink(), Xroot, XrootPath, and Xunix.

Referenced by fopen64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Fread()

size_t XrdPosix_Fread ( void *  ptr,
size_t  size,
size_t  nitems,
FILE *  stream 
)

Definition at line 405 of file XrdPosix.cc.

406 {
407  ssize_t bytes;
408  size_t rc = 0;
409  int fd = fileno(stream);
410 
411  if (!Xroot.myFD(fd)) return Xunix.Fread(ptr, size, nitems, stream);
412 
413  bytes = Xroot.Read(fd, ptr, size*nitems);
414 
415 // Get the right return code. Note that we cannot emulate the flags in sunx86
416 //
417  if (bytes > 0 && size) rc = bytes/size;
418  else if (bytes < 0) fseterr(stream);
419  else fseteof(stream);
420 
421  return rc;
422 }
static void fseterr(FILE *fp)
Definition: XrdPosix.cc:67
static void fseteof(FILE *fp)
Definition: XrdPosix.cc:90
Retv_Fread(* Fread)(Args_Fread)
static ssize_t Read(int fildes, void *buf, size_t nbyte)
Read() conforms to POSIX.1-2001 read()

References XrdPosixLinkage::Fread, fseteof(), fseterr(), XrdPosixXrootd::myFD(), XrdPosixXrootd::Read(), Xroot, and Xunix.

Referenced by fread().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Fseek()

int XrdPosix_Fseek ( FILE *  stream,
long  offset,
int  whence 
)

Definition at line 431 of file XrdPosix.cc.

432 {
433 
434 // Return the result of the fseek
435 //
436  if (!Xroot.myFD(fileno(stream)))
437  return Xunix.Fseek( stream, offset, whence);
438 
439  return (Xroot.Lseek(fileno(stream), offset, whence) < 0 ? -1 : 0);
440 }
Retv_Fseek(* Fseek)(Args_Fseek)
static off_t Lseek(int fildes, off_t offset, int whence)
Lseek() conforms to POSIX.1-2001 lseek()

References XrdPosixLinkage::Fseek, XrdPosixXrootd::Lseek(), XrdPosixXrootd::myFD(), Xroot, and Xunix.

Referenced by fseek().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Fseeko()

int XrdPosix_Fseeko ( FILE *  stream,
off_t  offset,
int  whence 
)

◆ XrdPosix_Fstat()

int XrdPosix_Fstat ( int  fildes,
struct stat buf 
)

Definition at line 467 of file XrdPosix.cc.

468  {
469  if (Xroot.myFD(fildes)){
470  return(Xroot.Fstat(fildes, buf));
471  } else {
472 #ifdef SYS_fstat
473  return syscall(SYS_fstat, fildes, buf);
474 #else
475  errno = ENOSYS;
476  return -1;
477 #endif
478  }
479  }
static int Fstat(int fildes, struct stat *buf)
Fstat() conforms to POSIX.1-2001 fstat()

References XrdPosixXrootd::Fstat(), XrdPosixXrootd::myFD(), and Xroot.

Referenced by fstat64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Fstatat()

int XrdPosix_Fstatat ( int  dirfd,
const char *  path,
struct stat buf,
int  flags 
)

Definition at line 501 of file XrdPosix.cc.

502 {
503  if (path && *path) {
504  char buff[2048];
505  char unref[2049];
506 
507  if (!(flags & AT_SYMLINK_NOFOLLOW)) {
508  // We need to follow until path is no longer a link
509  ssize_t res = XrdResolveLink(path, unref);
510  if (res < 0) return res;
511  // links are pointing to file unref now which is not a link
512  } else {
513  strncpy(unref, path, 2048);
514  }
515  if (char *myPath = XrootPath.URL(unref, buff, sizeof(buff))) {
516  int ret = Xroot.Stat(myPath, (struct stat *)buf);
517  return (ret);
518  } else {
519  // not a root file
520 #ifdef SYS_newfstatat
521  return syscall(SYS_newfstatat, dirfd, path, buf, flags);
522 #else
523 #ifdef SYS_fstatat
524  return syscall(SYS_fstatat, dirfd, path, buf, flags);
525 #else
526  errno = ENOSYS;
527  return -1;
528 #endif
529 #endif
530  }
531  } else {
532  errno = EFAULT;
533  }
534  return -1;
535 }
#define stat(a, b)
Definition: XrdPosix.hh:105
#define dirfd(x)
static int Stat(const char *path, struct stat *buf)
Stat() conforms to POSIX.1-2001 stat()

References dirfd, stat, XrdPosixXrootd::Stat(), XrdPosixXrootPath::URL(), XrdResolveLink(), Xroot, and XrootPath.

Referenced by fstatat64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Fsync()

int XrdPosix_Fsync ( int  fildes)

Definition at line 544 of file XrdPosix.cc.

545 {
546 
547 // Return the result of the sync
548 //
549  return (Xroot.myFD(fildes) ? Xroot.Fsync(fildes)
550  : Xunix.Fsync(fildes));
551 }

References XrdPosixXrootd::Fsync(), XrdPosixLinkage::Fsync, XrdPosixXrootd::myFD(), Xroot, and Xunix.

Referenced by fsync().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Ftell()

long XrdPosix_Ftell ( FILE *  stream)

Definition at line 560 of file XrdPosix.cc.

561 {
562 
563 // Return the result of the tell
564 //
565  if (!Xroot.myFD(fileno(stream))) return Xunix.Ftell(stream);
566 
567  return static_cast<long>(Xroot.Lseek(fileno(stream), 0, SEEK_CUR));
568 }
Retv_Ftell(* Ftell)(Args_Ftell)

References XrdPosixLinkage::Ftell, XrdPosixXrootd::Lseek(), XrdPosixXrootd::myFD(), Xroot, and Xunix.

Referenced by ftell().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Ftello()

off_t XrdPosix_Ftello ( FILE *  stream)

Definition at line 577 of file XrdPosix.cc.

578 {
579 
580 // Return the result of the tell
581 //
582  if (!Xroot.myFD(fileno(stream))) return Xunix.Ftello64(stream);
583 
584  return Xroot.Lseek(fileno(stream), 0, SEEK_CUR);
585 }
Retv_Ftello64(* Ftello64)(Args_Ftello64)

References XrdPosixLinkage::Ftello64, XrdPosixXrootd::Lseek(), XrdPosixXrootd::myFD(), Xroot, and Xunix.

Referenced by ftello64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Ftruncate()

int XrdPosix_Ftruncate ( int  fildes,
off_t  offset 
)

◆ XrdPosix_Fwrite()

size_t XrdPosix_Fwrite ( const void *  ptr,
size_t  size,
size_t  nitems,
FILE *  stream 
)

Definition at line 610 of file XrdPosix.cc.

611 {
612  size_t bytes, rc = 0;
613  int fd = fileno(stream);
614 
615  if (!Xroot.myFD(fd)) return Xunix.Fwrite(ptr, size, nitems, stream);
616 
617  bytes = Xroot.Write(fd, ptr, size*nitems);
618 
619 // Get the right return code.
620 //
621  if (bytes > 0 && size) rc = bytes/size;
622  else fseterr(stream);
623 
624  return rc;
625 }
Retv_Fwrite(* Fwrite)(Args_Fwrite)
static ssize_t Write(int fildes, const void *buf, size_t nbyte)
Write() conforms to POSIX.1-2001 write()

References fseterr(), XrdPosixLinkage::Fwrite, XrdPosixXrootd::myFD(), XrdPosixXrootd::Write(), Xroot, and Xunix.

Referenced by fwrite().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_isMyPath()

int XrdPosix_isMyPath ( const char *  path)

Definition at line 1274 of file XrdPosix.cc.

1275 {
1276  return (0 != XrootPath.URL(path, 0, 0));
1277 }

References XrdPosixXrootPath::URL(), and XrootPath.

+ Here is the call graph for this function:

◆ XrdPosix_Lseek()

off_t XrdPosix_Lseek ( int  fildes,
off_t  offset,
int  whence 
)

Definition at line 676 of file XrdPosix.cc.

677 {
678 
679 // Return the operation of the seek
680 //
681  return (Xroot.myFD(fildes) ? Xroot.Lseek (fildes, offset, whence)
682  : Xunix.Lseek64(fildes, offset, whence));
683 }
Retv_Lseek64(* Lseek64)(Args_Lseek64)

References XrdPosixXrootd::Lseek(), XrdPosixLinkage::Lseek64, XrdPosixXrootd::myFD(), Xroot, and Xunix.

Referenced by llseek(), and lseek64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Lstat()

int XrdPosix_Lstat ( const char *  path,
struct stat buf 
)

Definition at line 692 of file XrdPosix.cc.

693 {
694  char *myPath, buff[2048];
695 
696 // Make sure a path was passed
697 //
698  if (!path) {errno = EFAULT; return -1;}
699 
700 // Return the results of an open of a Unix file
701 //
702  myPath = XrootPath.URL(path, buff, sizeof(buff));
703  if (myPath){
704  return Xroot.Stat(myPath, buf);
705  } else {
706 #ifdef SYS_lstat
707  return syscall(SYS_lstat, path, buf);
708 #else
709  errno = ENOSYS;
710  return -1;
711 #endif
712  }
713 }

References XrdPosixXrootd::Stat(), XrdPosixXrootPath::URL(), Xroot, and XrootPath.

Referenced by lstat64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Mkdir()

int XrdPosix_Mkdir ( const char *  path,
mode_t  mode 
)

Definition at line 722 of file XrdPosix.cc.

723 {
724  char *myPath, buff[2048];
725  char unref[2049];
726 
727  ssize_t res=XrdResolveLink(path, unref);
728  if (res < 0) return res;
729 
730 // Return the results of a mkdir of a Unix file system
731 //
732  if (!(myPath = XrootPath.URL(unref, buff, sizeof(buff))))
733  return Xunix.Mkdir(path, mode);
734 
735 // Return the results of an mkdir of an xrootd file system
736 //
737  return Xroot.Mkdir(myPath, mode);
738 }
Retv_Mkdir(* Mkdir)(Args_Mkdir)
static int Mkdir(const char *path, mode_t mode)
Mkdir() conforms to POSIX.1-2001 mkdir()

References XrdPosixXrootd::Mkdir(), XrdPosixLinkage::Mkdir, XrdPosixXrootPath::URL(), XrdResolveLink(), Xroot, XrootPath, and Xunix.

Referenced by mkdir().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Open()

int XrdPosix_Open ( const char *  path,
int  oflag,
  ... 
)

Definition at line 747 of file XrdPosix.cc.

748 {
749  char *myPath, buff[2048];
750  char unref[2049];
751  va_list ap;
752  int mode;
753  ssize_t res=XrdResolveLink(path, unref);
754  if (res < 0) return res;
755  // Return the results of an open of a Unix file
756  //
757  if (!(myPath = XrootPath.URL(unref, buff, sizeof(buff))))
758  {if (!(oflag & O_CREAT)) return Xunix.Open64(unref, oflag);
759  va_start(ap, oflag);
760  mode = va_arg(ap, int);
761  va_end(ap);
762  return Xunix.Open64(unref, oflag, (mode_t)mode);
763  }
764 
765  // Return the results of an open of an xrootd file
766  //
767  if (!(oflag & O_CREAT)) return Xroot.Open(myPath, oflag);
768  va_start(ap, oflag);
769  mode = va_arg(ap, int);
770  va_end(ap);
771  return Xroot.Open(myPath, oflag, (mode_t)mode);
772 }
Retv_Open64(* Open64)(Args_Open64)

References XrdPosixXrootd::Open(), XrdPosixLinkage::Open64, XrdPosixXrootPath::URL(), XrdResolveLink(), Xroot, XrootPath, and Xunix.

Referenced by open64(), and XrdPosix_Creat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Openat()

int XrdPosix_Openat ( int  dirfd,
const char *  path,
int  flag,
  ... 
)

Definition at line 781 of file XrdPosix.cc.

782 {
783  char *myPath, buff[2048];
784  char unref[2049];
785  va_list ap;
786  int mode;
787  ssize_t res=XrdResolveLink(path, unref);
788  if (res < 0) return res;
789 
790  if (!(myPath = XrootPath.URL(unref, buff, sizeof(buff)))){
791  mode_t mode = 0;
792  if (flag & (O_CREAT)) {
793  va_start(ap, flag);
794  mode = va_arg(ap, int);
795  va_end(ap);
796  }
797 #ifdef SYS_openat
798  return (syscall(SYS_openat, dirfd, path, flag, (mode_t)mode));
799 #else
800  errno = ENOSYS;
801  return -1;
802 #endif
803  } else {
804  // Return the results of an open of an xrootd file
805  //
806  if (!(flag & O_CREAT)) return Xroot.Open(myPath, flag);
807  va_start(ap, flag);
808  mode = va_arg(ap, int);
809  va_end(ap);
810  return Xroot.Open(myPath, flag, (mode_t)mode);
811  }
812 }

References dirfd, XrdPosixXrootd::Open(), XrdPosixXrootPath::URL(), XrdResolveLink(), Xroot, and XrootPath.

Referenced by openat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Opendir()

DIR* XrdPosix_Opendir ( const char *  path)

Definition at line 821 of file XrdPosix.cc.

822 {
823  char *myPath, buff[2048];
824  char unref[2049];
825 
826  ssize_t res=XrdResolveLink(path, unref);
827  if (res < 0) return NULL;
828 
829 // Unix opendir
830 //
831  if (!(myPath = XrootPath.URL(unref, buff, sizeof(buff))))
832  return Xunix.Opendir(path);
833 
834 // Xrootd opendir
835 //
836  return Xroot.Opendir(myPath);
837 }
Retv_Opendir(* Opendir)(Args_Opendir)
static DIR * Opendir(const char *path)
Opendir() conforms to POSIX.1-2001 opendir()

References XrdPosixXrootd::Opendir(), XrdPosixLinkage::Opendir, XrdPosixXrootPath::URL(), XrdResolveLink(), Xroot, XrootPath, and Xunix.

Referenced by opendir().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Pathconf()

long XrdPosix_Pathconf ( const char *  path,
int  name 
)

Definition at line 848 of file XrdPosix.cc.

849 {
850  char unref[2049];
851 
852  ssize_t res=XrdResolveLink(path, unref);
853  if (res < 0) return res;
854 
855  return (XrootPath.URL(unref, 0, 0) ? Xunix.Pathconf("/tmp", name)
856  : Xunix.Pathconf(unref, name));
857 }
Retv_Pathconf(* Pathconf)(Args_Pathconf)

References XrdPosixLinkage::Pathconf, XrdPosixXrootPath::URL(), XrdResolveLink(), XrootPath, and Xunix.

Referenced by pathconf().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Pread()

ssize_t XrdPosix_Pread ( int  fildes,
void *  buf,
size_t  nbyte,
off_t  offset 
)

Definition at line 866 of file XrdPosix.cc.

867 {
868 
869 // Return the results of the read
870 //
871  return (Xroot.myFD(fildes) ? Xroot.Pread (fildes, buf, nbyte, offset)
872  : Xunix.Pread64(fildes, buf, nbyte, offset));
873 }
Retv_Pread64(* Pread64)(Args_Pread64)
static ssize_t Pread(int fildes, void *buf, size_t nbyte, off_t offset)
Pread() conforms to POSIX.1-2001 pread()

References XrdPosixXrootd::myFD(), XrdPosixXrootd::Pread(), XrdPosixLinkage::Pread64, Xroot, and Xunix.

Referenced by pread64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Pwrite()

ssize_t XrdPosix_Pwrite ( int  fildes,
const void *  buf,
size_t  nbyte,
off_t  offset 
)

Definition at line 882 of file XrdPosix.cc.

883 {
884 
885 // Return the results of the write
886 //
887  return (Xroot.myFD(fildes) ? Xroot.Pwrite (fildes, buf, nbyte, offset)
888  : Xunix.Pwrite64(fildes, buf, nbyte, offset));
889 }
Retv_Pwrite64(* Pwrite64)(Args_Pwrite64)
static ssize_t Pwrite(int fildes, const void *buf, size_t nbyte, off_t offset)
Pwrite() conforms to POSIX.1-2001 pwrite()

References XrdPosixXrootd::myFD(), XrdPosixXrootd::Pwrite(), XrdPosixLinkage::Pwrite64, Xroot, and Xunix.

Referenced by pwrite64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Read()

ssize_t XrdPosix_Read ( int  fildes,
void *  buf,
size_t  nbyte 
)

Definition at line 898 of file XrdPosix.cc.

899 {
900 
901 // Return the results of the read
902 //
903  return (Xroot.myFD(fildes) ? Xroot.Read(fildes, buf, nbyte)
904  : Xunix.Read(fildes, buf, nbyte));
905 }
Retv_Read(* Read)(Args_Read)

References XrdPosixXrootd::myFD(), XrdPosixXrootd::Read(), XrdPosixLinkage::Read, Xroot, and Xunix.

Referenced by read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Readdir()

struct dirent* XrdPosix_Readdir ( DIR *  dirp)

Definition at line 932 of file XrdPosix.cc.

933 {
934 
935 // Return result of readdir
936 //
937  return (Xroot.isXrootdDir(dirp) ? Xroot.Readdir(dirp)
938  : Xunix.Readdir(dirp));
939 }
Retv_Readdir(* Readdir)(Args_Readdir)
static struct dirent * Readdir(DIR *dirp)

References XrdPosixXrootd::isXrootdDir(), XrdPosixXrootd::Readdir(), XrdPosixLinkage::Readdir, Xroot, and Xunix.

+ Here is the call graph for this function:

◆ XrdPosix_Readdir64()

struct dirent64* XrdPosix_Readdir64 ( DIR *  dirp)

Definition at line 941 of file XrdPosix.cc.

942 {
943 
944 // Return result of readdir
945 //
946  return (Xroot.isXrootdDir(dirp) ? Xroot.Readdir64(dirp)
947  : Xunix.Readdir64(dirp));
948 }
Retv_Readdir64(* Readdir64)(Args_Readdir64)
static struct dirent64 * Readdir64(DIR *dirp)

References XrdPosixXrootd::isXrootdDir(), XrdPosixXrootd::Readdir64(), XrdPosixLinkage::Readdir64, Xroot, and Xunix.

Referenced by readdir64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Readdir64_r()

int XrdPosix_Readdir64_r ( DIR *  dirp,
struct dirent64 *  entry,
struct dirent64 **  result 
)

Definition at line 966 of file XrdPosix.cc.

967 {
968 
969 // Return result of readdir
970 //
971  return (Xroot.isXrootdDir(dirp) ? Xroot.Readdir64_r(dirp,entry,result)
972  : Xunix.Readdir64_r(dirp,entry,result));
973 }
Retv_Readdir64_r(* Readdir64_r)(Args_Readdir64_r)
static int Readdir64_r(DIR *dirp, struct dirent64 *entry, struct dirent64 **result)

References XrdPosixXrootd::isXrootdDir(), XrdPosixXrootd::Readdir64_r(), XrdPosixLinkage::Readdir64_r, Xroot, and Xunix.

Referenced by readdir64_r().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Readdir_r()

int XrdPosix_Readdir_r ( DIR *  dirp,
struct dirent *  entry,
struct dirent **  result 
)

Definition at line 957 of file XrdPosix.cc.

958 {
959 
960 // Return result of readdir
961 //
962  return (Xroot.isXrootdDir(dirp) ? Xroot.Readdir_r(dirp,entry,result)
963  : Xunix.Readdir_r(dirp,entry,result));
964 }
Retv_Readdir_r(* Readdir_r)(Args_Readdir_r)
static int Readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result)

References XrdPosixXrootd::isXrootdDir(), XrdPosixXrootd::Readdir_r(), XrdPosixLinkage::Readdir_r, Xroot, and Xunix.

+ Here is the call graph for this function:

◆ XrdPosix_Readv()

ssize_t XrdPosix_Readv ( int  fildes,
const struct iovec *  iov,
int  iovcnt 
)

Definition at line 914 of file XrdPosix.cc.

915 {
916 
917 // Return results of the readv
918 //
919  return (Xroot.myFD(fildes) ? Xroot.Readv(fildes, iov, iovcnt)
920  : Xunix.Readv(fildes, iov, iovcnt));
921 }
Retv_Readv(* Readv)(Args_Readv)
static ssize_t Readv(int fildes, const struct iovec *iov, int iovcnt)
Readv() conforms to POSIX.1-2001 readv()

References XrdPosixXrootd::myFD(), XrdPosixXrootd::Readv(), XrdPosixLinkage::Readv, Xroot, and Xunix.

Referenced by readv().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Rename()

int XrdPosix_Rename ( const char *  oname,
const char *  nname 
)

Definition at line 982 of file XrdPosix.cc.

983 {
984  char *oldPath, buffold[2048], *newPath, buffnew[2048];
985 
986 // Make sure a path was passed
987 //
988  if (!oldpath || !newpath) {errno = EFAULT; return -1;}
989 
990 // Return the results of a mkdir of a Unix file system
991 //
992  if (!(oldPath = XrootPath.URL(oldpath, buffold, sizeof(buffold)))
993  || !(newPath = XrootPath.URL(newpath, buffnew, sizeof(buffnew))))
994  return Xunix.Rename(oldpath, newpath);
995 
996 // Return the results of an mkdir of an xrootd file system
997 //
998  return Xroot.Rename(oldPath, newPath);
999 }
Retv_Rename(* Rename)(Args_Rename)
static int Rename(const char *oldpath, const char *newpath)
Rename() conforms to POSIX.1-2001 rename()

References XrdPosixXrootd::Rename(), XrdPosixLinkage::Rename, XrdPosixXrootPath::URL(), Xroot, XrootPath, and Xunix.

Referenced by rename().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Rewinddir()

void XrdPosix_Rewinddir ( DIR *  dirp)

Definition at line 1008 of file XrdPosix.cc.

1009 {
1010 
1011 // Return result of rewind
1012 //
1013  return (Xroot.isXrootdDir(dirp) ? Xroot.Rewinddir(dirp)
1014  : Xunix.Rewinddir(dirp));
1015 }
Retv_Rewinddir(* Rewinddir)(Args_Rewinddir)
static void Rewinddir(DIR *dirp)
Rewinddir() conforms to POSIX.1-2001 rewinddir()

References XrdPosixXrootd::isXrootdDir(), XrdPosixXrootd::Rewinddir(), XrdPosixLinkage::Rewinddir, Xroot, and Xunix.

Referenced by rewinddir().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Rmdir()

int XrdPosix_Rmdir ( const char *  path)

Definition at line 1024 of file XrdPosix.cc.

1025 {
1026  char *myPath, buff[2048];
1027 
1028 // Make sure a path was passed
1029 //
1030  if (!path) {errno = EFAULT; return -1;}
1031 
1032 // Return the results of a mkdir of a Unix file system
1033 //
1034  if (!(myPath = XrootPath.URL(path, buff, sizeof(buff))))
1035  return Xunix.Rmdir(path);
1036 
1037 // Return the results of an mkdir of an xrootd file system
1038 //
1039  return Xroot.Rmdir(myPath);
1040 }
Retv_Rmdir(* Rmdir)(Args_Rmdir)
static int Rmdir(const char *path)
Rmdir() conforms to POSIX.1-2001 rmdir()

References XrdPosixXrootd::Rmdir(), XrdPosixLinkage::Rmdir, XrdPosixXrootPath::URL(), Xroot, XrootPath, and Xunix.

Referenced by rmdir().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Seekdir()

void XrdPosix_Seekdir ( DIR *  dirp,
long  loc 
)

Definition at line 1049 of file XrdPosix.cc.

1050 {
1051 
1052 // Call seekdir
1053 //
1054  (Xroot.isXrootdDir(dirp) ? Xroot.Seekdir(dirp, loc)
1055  : Xunix.Seekdir(dirp, loc));
1056 }
Retv_Seekdir(* Seekdir)(Args_Seekdir)
static void Seekdir(DIR *dirp, long loc)
Seekdir() conforms to POSIX.1-2001 seekdir()

References XrdPosixXrootd::isXrootdDir(), XrdPosixXrootd::Seekdir(), XrdPosixLinkage::Seekdir, Xroot, and Xunix.

Referenced by seekdir().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Stat()

int XrdPosix_Stat ( const char *  path,
struct stat buf 
)

Definition at line 1065 of file XrdPosix.cc.

1066 {
1067  char buff[2048];
1068  char unref[2049];
1069 
1070  ssize_t res=XrdResolveLink(path, unref);
1071  if (res < 0) return res;
1072 
1073  // links are pointing to file unref now which is not a link
1074  if (char *myPath = XrootPath.URL(unref, buff, sizeof(buff))) {
1075  int ret = Xroot.Stat(myPath, buf);
1076  return (ret);
1077  } else {
1078  // not a root file
1079 #ifdef SYS_stat
1080  return syscall(SYS_stat, path, buf);
1081 #else
1082  errno = ENOSYS;
1083  return -1;
1084 #endif
1085  }
1086 }

References XrdPosixXrootd::Stat(), XrdPosixXrootPath::URL(), XrdResolveLink(), Xroot, and XrootPath.

Referenced by stat64(), and XrdPosix_Statx().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Statfs()

int XrdPosix_Statfs ( const char *  path,
struct statfs buf 
)

Definition at line 1133 of file XrdPosix.cc.

1134 {
1135  char *myPath, buff[2048];
1136 
1137  char unref[2049];
1138 
1139  ssize_t res=XrdResolveLink(path, unref);
1140  if (res < 0) return res;
1141 
1142 // Return the results of an open of a Unix file
1143 //
1144  return ((myPath = XrootPath.URL(unref, buff, sizeof(buff)))
1145  ? Xroot.Statfs(myPath, buf)
1146  : Xunix.Statfs64(path, (struct statfs64 *)buf));
1147 }
int statfs64(const char *path, struct statfs64 *buf)
Retv_Statfs64(* Statfs64)(Args_Statfs64)
static int Statfs(const char *path, struct statfs *buf)

References XrdPosixXrootd::Statfs(), statfs64(), XrdPosixLinkage::Statfs64, XrdPosixXrootPath::URL(), XrdResolveLink(), Xroot, XrootPath, and Xunix.

Referenced by statfs64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Statvfs()

int XrdPosix_Statvfs ( const char *  path,
struct statvfs buf 
)

Definition at line 1156 of file XrdPosix.cc.

1157 {
1158  char *myPath, buff[2048];
1159  char unref[2049];
1160 
1161  ssize_t res=XrdResolveLink(path, unref);
1162  if (res < 0) return res;
1163 
1164 // Return the results of an open of a Unix file
1165 //
1166  return ((myPath = XrootPath.URL(unref, buff, sizeof(buff)))
1167  ? Xroot.Statvfs(myPath, buf)
1168  : Xunix.Statvfs64(path, (struct statvfs64 *)buf));
1169 }
int statvfs64(const char *path, struct statvfs64 *buf)
Retv_Statvfs64(* Statvfs64)(Args_Statvfs64)
static int Statvfs(const char *path, struct statvfs *buf)
Statvfs() conforms to POSIX.1-2001 statvfs()

References XrdPosixXrootd::Statvfs(), statvfs64(), XrdPosixLinkage::Statvfs64, XrdPosixXrootPath::URL(), XrdResolveLink(), Xroot, XrootPath, and Xunix.

Referenced by statvfs64().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ XrdPosix_Statx()

int XrdPosix_Statx ( int  dirfd,
const char *  path,
int  flags,
unsigned int  mask,
XrdSysStatx stx 
)

Definition at line 1091 of file XrdPosix.cc.

1093 {
1094  if (path && *path) {
1095  char buff[2048];
1096  char unref[2049];
1097 
1098  if (!(flags & AT_SYMLINK_NOFOLLOW)) {
1099  // We need to follow until path is no longer a link
1100  ssize_t res = XrdResolveLink(path, unref);
1101  if (res < 0) return res;
1102  } else {
1103  strncpy(unref, path, 2048);
1104  }
1105  if (char *myPath = XrootPath.URL(unref, buff, sizeof(buff))) {
1106  struct stat st{};
1107  if (int ret = XrdPosix_Stat(myPath, &st))
1108  return ret;
1110  return 0;
1111  } else {
1112 #ifdef SYS_statx
1113  int ret = syscall(SYS_statx, dirfd, path, flags, mask, stx);
1114  return ret;
1115 #else
1116  errno = ENOSYS;
1117  return -1;
1118 #endif
1119  }
1120  } else {
1121  errno = EFAULT;
1122  }
1123  return -1;
1124 }
int XrdPosix_Stat(const char *path, struct stat *buf)
Definition: XrdPosix.cc:1065
static void Stat2Statx(const struct stat &stat, XrdSysStatx &statx)
Definition: XrdSysStatx.hh:109

References dirfd, stat, XrdSysStatxHelpers::Stat2Statx(), XrdPosixXrootPath::URL(), XrdPosix_Stat(), XrdResolveLink(), and XrootPath.

+ Here is the call graph for this function:

◆ XrdPosix_Telldir()

long XrdPosix_Telldir ( DIR *  dirp)

Definition at line 1178 of file XrdPosix.cc.

1179 {
1180 
1181 // Return result of telldir
1182 //
1183  return (Xroot.isXrootdDir(dirp) ? Xroot.Telldir(dirp)
1184  : Xunix.Telldir(dirp));
1185 }
Retv_Telldir(* Telldir)(Args_Telldir)
static long Telldir(DIR *dirp)
Telldir() conforms to POSIX.1-2001 telldir()

References XrdPosixXrootd::isXrootdDir(), XrdPosixXrootd::Telldir(), XrdPosixLinkage::Telldir, Xroot, and Xunix.

+ Here is the call graph for this function:

◆ XrdPosix_Truncate()

int XrdPosix_Truncate ( const char *  path,
off_t  offset 
)

Definition at line 1194 of file XrdPosix.cc.

1195 {
1196  char *myPath, buff[2048];
1197  char unref[2049];
1198 
1199  ssize_t res=XrdResolveLink(path, unref);
1200  if (res < 0) return res;
1201 
1202 // Return the results of a truncate of a Unix file system
1203 //
1204  if (!(myPath = XrootPath.URL(unref, buff, sizeof(buff))))
1205  return Xunix.Truncate64(path, offset);
1206 
1207 // Return the results of an truncate of an xrootd file system
1208 //
1209  return Xroot.Truncate(myPath, offset);
1210 }
Retv_Truncate64(* Truncate64)(Args_Truncate64)
static int Truncate(const char *path, off_t offset)
Telldir() conforms to POSIX.1-2001 telldir()

References XrdPosixXrootd::Truncate(), XrdPosixLinkage::Truncate64, XrdPosixXrootPath::URL(), XrdResolveLink(), Xroot, XrootPath, and Xunix.

+ Here is the call graph for this function:

◆ XrdPosix_Unlink()

int XrdPosix_Unlink ( const char *  path)

Definition at line 1219 of file XrdPosix.cc.

1220 {
1221  char *myPath, buff[2048];
1222  char unref[2049];
1223 
1224  ssize_t res=XrdResolveLink(path, unref);
1225  if (res < 0) return res;
1226 
1227 // Return the result of a unlink of a Unix file
1228 //
1229  if (!(myPath = XrootPath.URL(unref, buff, sizeof(buff))))
1230  return Xunix.Unlink(path);
1231 
1232 // Return the results of an unlink of an xrootd file
1233 //
1234  return Xroot.Unlink(myPath);
1235 }
Retv_Unlink(* Unlink)(Args_Unlink)
static int Unlink(const char *path)
Unlink() conforms to POSIX.1-2001 unlink()

References XrdPosixXrootd::Unlink(), XrdPosixLinkage::Unlink, XrdPosixXrootPath::URL(), XrdResolveLink(), Xroot, XrootPath, and Xunix.

+ Here is the call graph for this function:

◆ XrdPosix_URL()

char* XrdPosix_URL ( const char *  path,
char *  buff,
int  blen 
)

Definition at line 1283 of file XrdPosix.cc.

1284 {
1285  return XrootPath.URL(path, buff, blen);
1286 }

References XrdPosixXrootPath::URL(), and XrootPath.

+ Here is the call graph for this function:

◆ XrdPosix_Write()

ssize_t XrdPosix_Write ( int  fildes,
const void *  buf,
size_t  nbyte 
)

Definition at line 1244 of file XrdPosix.cc.

1245 {
1246 
1247 // Return the results of the write
1248 //
1249  return (Xroot.myFD(fildes) ? Xroot.Write(fildes, buf, nbyte)
1250  : Xunix.Write(fildes, buf, nbyte));
1251 }
Retv_Write(* Write)(Args_Write)

References XrdPosixXrootd::myFD(), XrdPosixXrootd::Write(), XrdPosixLinkage::Write, Xroot, and Xunix.

+ Here is the call graph for this function:

◆ XrdPosix_Writev()

ssize_t XrdPosix_Writev ( int  fildes,
const struct iovec *  iov,
int  iovcnt 
)

Definition at line 1260 of file XrdPosix.cc.

1261 {
1262 
1263 // Return results of the writev
1264 //
1265  return (Xroot.myFD(fildes) ? Xroot.Writev(fildes, iov, iovcnt)
1266  : Xunix.Writev(fildes, iov, iovcnt));
1267 }
Retv_Writev(* Writev)(Args_Writev)
static ssize_t Writev(int fildes, const struct iovec *iov, int iovcnt)
Writev() conforms to POSIX.1-2001 writev()

References XrdPosixXrootd::myFD(), XrdPosixXrootd::Writev(), XrdPosixLinkage::Writev, Xroot, and Xunix.

+ Here is the call graph for this function: