public long sysconf(Sysconf name) { return libc().sysconf(name); }
public long sysconf(Sysconf name) { return libc().sysconf(name); }
public long sysconf(Sysconf name) { return libc().sysconf(name); }
public long sysconf(Sysconf name) { return libc().sysconf(name); }
LinuxPOSIX(LibCProvider libcProvider, POSIXHandler handler) { super(libcProvider, handler); if (Platform.IS_32_BIT || "sparcv9".equals(Platform.ARCH)) { statVersion = 3; } else { FileStat stat = allocateStat(); if (((LinuxLibC) libc()).__xstat64(0, "/dev/null", stat) < 0) { statVersion = 1; } else { statVersion = 0; } } }
LinuxPOSIX(LibCProvider libcProvider, POSIXHandler handler) { super(libcProvider, handler); if (Platform.IS_32_BIT) { statVersion = 3; } else { FileStat stat = allocateStat(); if (((LinuxLibC) libc()).__xstat64(0, "/dev/null", stat) < 0) { statVersion = 1; } else { statVersion = 0; } } }
LinuxPOSIX(LibCProvider libcProvider, POSIXHandler handler) { super(libcProvider, handler); if (Platform.IS_32_BIT) { statVersion = 3; } else { FileStat stat = allocateStat(); if (((LinuxLibC) libc()).__xstat64(0, "/dev/null", stat) < 0) { statVersion = 1; } else { statVersion = 0; } } }
@Override public int lstat(String path, FileStat stat) { if (use_lxstat64) { try { return ((LinuxLibC) libc()).__lxstat64(statVersion, path, stat); } catch (UnsatisfiedLinkError ex) { use_lxstat64 = false; return old_lstat(path, stat); } } else { return old_lstat(path, stat); } }
@Override public int stat(String path, FileStat stat) { if (use_xstat64) { try { return ((LinuxLibC) libc()).__xstat64(statVersion, path, stat); } catch (UnsatisfiedLinkError ex) { use_xstat64 = false; return old_stat(path, stat); } } else { return old_stat(path, stat); } }
@Override public int lstat(String path, FileStat stat) { if (use_lxstat64) { try { return ((LinuxLibC) libc()).__lxstat64(statVersion, path, stat); } catch (UnsatisfiedLinkError ex) { use_lxstat64 = false; return old_lstat(path, stat); } } else { return old_lstat(path, stat); } }
@Override public int stat(String path, FileStat stat) { if (use_xstat64) { try { return ((LinuxLibC) libc()).__xstat64(statVersion, path, stat); } catch (UnsatisfiedLinkError ex) { use_xstat64 = false; return old_stat(path, stat); } } else { return old_stat(path, stat); } }
@Override public int stat(String path, FileStat stat) { if (use_xstat64) { try { return ((LinuxLibC) libc()).__xstat64(statVersion, path, stat); } catch (UnsatisfiedLinkError ex) { use_xstat64 = false; return old_stat(path, stat); } } else { return old_stat(path, stat); } }
@Override public int lstat(String path, FileStat stat) { if (use_lxstat64) { try { return ((LinuxLibC) libc()).__lxstat64(statVersion, path, stat); } catch (UnsatisfiedLinkError ex) { use_lxstat64 = false; return old_lstat(path, stat); } } else { return old_lstat(path, stat); } }
public int ioprio_get(int which, int who) { Syscall.ABI abi = Syscall.abi(); if (abi == null) { handler.unimplementedError("ioprio_get"); return -1; } return libc().syscall(abi.__NR_ioprio_get(), which, who); }
public int ioprio_set(int which, int who, int ioprio) { Syscall.ABI abi = Syscall.abi(); if (abi == null) { handler.unimplementedError("ioprio_set"); return -1; } return libc().syscall(abi.__NR_ioprio_set(), which, who, ioprio); } }
@Override public int fstat(int fd, FileStat stat) { if (use_fxstat64) { int ret; try { if ((ret = ((LinuxLibC) libc()).__fxstat64(statVersion, fd, stat)) < 0) { handler.error(Errno.valueOf(errno()), "fstat", Integer.toString(fd)); } return ret; } catch (UnsatisfiedLinkError ex) { use_fxstat64 = false; return old_fstat(fd, stat); } } else { return old_fstat(fd, stat); } }
@Override public int fstat(int fd, FileStat stat) { if (use_fxstat64) { int ret; try { if ((ret = ((LinuxLibC) libc()).__fxstat64(statVersion, fd, stat)) < 0) { handler.error(Errno.valueOf(errno()), "fstat", Integer.toString(fd)); } return ret; } catch (UnsatisfiedLinkError ex) { use_fxstat64 = false; return old_fstat(fd, stat); } } else { return old_fstat(fd, stat); } }
@Override public int fstat(int fd, FileStat stat) { if (use_fxstat64) { int ret; try { if ((ret = ((LinuxLibC) libc()).__fxstat64(statVersion, fd, stat)) < 0) { handler.error(Errno.valueOf(errno()), "fstat", Integer.toString(fd)); } return ret; } catch (UnsatisfiedLinkError ex) { use_fxstat64 = false; return old_fstat(fd, stat); } } else { return old_fstat(fd, stat); } }
@Override public FileStat fstat(int fd) { if (use_fxstat64) { try { FileStat stat = allocateStat(); if (((LinuxLibC) libc()).__fxstat64(statVersion, fd, stat) < 0) { handler.error(Errno.valueOf(errno()), "fstat", Integer.toString(fd)); } return stat; } catch (UnsatisfiedLinkError ex) { use_fxstat64 = false; return old_fstat(fd); } } else { return old_fstat(fd); } }
@Override public FileStat stat(String path) { if (use_xstat64) { try { FileStat stat = allocateStat(); if (((LinuxLibC) libc()).__xstat64(statVersion, path, stat) < 0) { handler.error(Errno.valueOf(errno()), "stat", path); } return stat; } catch (UnsatisfiedLinkError ex) { use_xstat64 = false; return old_stat(path); } } else { return old_stat(path); } }