/haiku/src/build/libroot/ |
H A D | fs_freebsd.h | 13 ssize_t haiku_freebsd_read(int fd, void *buf, size_t nbytes); 14 ssize_t haiku_freebsd_write(int fd, const void *buf, size_t nbytes); 15 ssize_t haiku_freebsd_readv(int fd, const struct iovec *vecs, size_t count); 16 ssize_t haiku_freebsd_writev(int fd, const struct iovec *vecs, size_t count);
|
H A D | fs_attr_extattr.h | 22 list_attributes(int fd, const char* path, char* buffer, size_t bufferSize) argument 25 if (fd >= 0) { 26 bytesRead = extattr_list_fd(fd, EXTATTR_NAMESPACE_USER, buffer, 55 get_attribute(int fd, const char* path, const char* attribute, void* buffer, argument 58 if (fd >= 0) { 59 return extattr_get_fd(fd, EXTATTR_NAMESPACE_USER, attribute, buffer, 68 set_attribute(int fd, const char* path, const char* attribute, argument 71 if (fd >= 0) { 72 return extattr_set_fd(fd, EXTATTR_NAMESPACE_USER, attribute, buffer, 81 remove_attribute(int fd, cons argument [all...] |
H A D | fs_darwin.cpp | 20 static int get_path(int fd, const char* path, char fullPath[]); 25 get_path(int fd, const char* path, char fullPath[]) argument 28 if (fstat(fd, &dirst) < 0) { 34 // fd does not point to a directory 39 if (fcntl(fd, F_GETPATH, fullPath) < 0) { 40 // failed to get the path of fd, fcntl() sets errno 110 faccessat(int fd, const char* path, int accessMode, int flag) argument 118 if (fd == AT_FDCWD || (path != NULL && path[0] == '/')) { 119 // call access() ignoring fd 124 if (fd < 140 fchmodat(int fd, const char* path, mode_t mode, int flag) argument 184 fchownat(int fd, const char* path, uid_t owner, gid_t group, int flag) argument 214 fdopendir(int fd) argument 242 fstatat(int fd, const char *path, struct stat *st, int flag) argument 272 mkdirat(int fd, const char *path, mode_t mode) argument 294 mkfifoat(int fd, const char *path, mode_t mode) argument 316 mknodat(int fd, const char *path, mode_t mode, dev_t dev) argument 384 readlinkat(int fd, const char *path, char *buffer, size_t bufferSize) argument 406 symlinkat(const char *oldPath, int fd, const char *newPath) argument 429 unlinkat(int fd, const char *path, int flag) argument 515 futimesat(int fd, const char *path, const struct timeval times[2]) argument [all...] |
H A D | fs_freebsd.cpp | 25 haiku_freebsd_read(int fd, void *buf, size_t nbytes) argument 28 if (fstat(fd, &st) != 0) 32 return read(fd, buf, nbytes); // Is a file! Good :) 35 if (ioctl(fd, DIOCGSECTORSIZE, §orSize) == -1) 38 off_t cur = lseek(fd, 0, SEEK_CUR); 47 return read(fd, buf, nbytes); 53 off_t sdCur = lseek(fd, -(cur % sectorSize), SEEK_CUR); 57 if (read(fd, tmpBlock, sectorSize) == -1) 63 if (lseek(fd, -sectorSize + (cur % sectorSize) + nbytes, SEEK_CUR) 79 if (lseek(fd, 125 haiku_freebsd_write(int fd, const void *buf, size_t nbytes) argument 231 haiku_freebsd_readv(int fd, const struct iovec *vecs, size_t count) argument 253 haiku_freebsd_writev(int fd, const struct iovec *vecs, size_t count) argument [all...] |
/haiku/src/tests/system/kernel/ |
H A D | null_poll_test.cpp | 14 int fd = fileno(f); local 15 printf("fd=%d\n", fd); 18 pfd.fd = fd;
|
H A D | mmap_fixed_test.cpp | 16 int fd = mkstemp(tmpfile); local 18 if (fd < 0) { 24 ftruncate(fd, 4096); 27 void* addr = mmap(NULL, 4096, PROT_NONE, MAP_SHARED, fd, 0); 28 void* addr1 = mmap(addr, 4096, PROT_NONE, MAP_SHARED | MAP_FIXED, fd, 0);
|
/haiku/headers/posix/sys/ |
H A D | uio.h | 22 ssize_t readv(int fd, const struct iovec *vector, int count); 23 ssize_t readv_pos(int fd, off_t pos, const struct iovec *vec, int count); 24 ssize_t writev(int fd, const struct iovec *vector, int count); 25 ssize_t writev_pos(int fd, off_t pos, const struct iovec *vec, int count);
|
/haiku/headers/private/fs_shell/ |
H A D | fssh_uio.h | 22 fssh_ssize_t fssh_readv(int fd, const struct fssh_iovec *vector, 24 fssh_ssize_t fssh_readv_pos(int fd, fssh_off_t pos, const struct 26 fssh_ssize_t fssh_writev(int fd, const struct fssh_iovec *vector, 28 fssh_ssize_t fssh_writev_pos(int fd, fssh_off_t pos,
|
H A D | fssh_fs_attr.h | 23 extern fssh_ssize_t fssh_fs_read_attr(int fd, const char *attribute, 26 extern fssh_ssize_t fssh_fs_write_attr(int fd, const char *attribute, 29 extern int fssh_fs_remove_attr(int fd, const char *attribute); 30 extern int fssh_fs_stat_attr(int fd, const char *attribute, 36 extern int fssh_fs_open_attr(int fd, const char *attribute, 38 extern int fssh_fs_close_attr(int fd); 41 extern fssh_DIR *fssh_fs_fopen_attr_dir(int fd);
|
/haiku/headers/compatibility/bsd/sys/ |
H A D | uio.h | 22 preadv(int fd, const struct iovec *vecs, int count, off_t pos) argument 24 return readv_pos(fd, pos, vecs, count); 29 pwritev(int fd, const struct iovec *vecs, int count, off_t pos) argument 31 return writev_pos(fd, pos, vecs, count);
|
/haiku/src/tools/fs_shell/ |
H A D | partition_support.h | 18 void restricted_file_opened(int fd); 20 void restricted_file_closed(int fd); 22 int restricted_file_restrict_io(int fd, fssh_off_t& pos, fssh_off_t size);
|
H A D | uio.cpp | 25 extern "C" ssize_t _kern_readv(int fd, off_t pos, const struct iovec *vecs, size_t count); 26 extern "C" ssize_t _kern_writev(int fd, off_t pos, const struct iovec *vecs, size_t count); 52 fssh_readv(int fd, const struct fssh_iovec *vector, int count) argument 60 if (FSShell::restricted_file_restrict_io(fd, pos, length) < 0) 64 return readv(fd, systemVecs, count); 66 return _kern_readv(fd, lseek(fd, 0, SEEK_CUR), systemVecs, count); 72 fssh_readv_pos(int fd, fssh_off_t pos, const struct fssh_iovec *vec, int count) argument 79 if (FSShell::restricted_file_restrict_io(fd, pos, length) < 0) 83 return readv_pos(fd, po 91 fssh_writev(int fd, const struct fssh_iovec *vector, int count) argument 111 fssh_writev_pos(int fd, fssh_off_t pos, const struct fssh_iovec *vec, int count) argument [all...] |
H A D | syscalls.h | 33 int _kern_open(int fd, const char *path, int openMode, int perms); 36 int _kern_open_dir(int fd, const char *path); 37 fssh_status_t _kern_fcntl(int fd, int op, uint32_t argument); 38 fssh_status_t _kern_fsync(int fd); 39 fssh_status_t _kern_lock_node(int fd); 40 fssh_status_t _kern_unlock_node(int fd); 43 fssh_status_t _kern_create_dir(int fd, const char *path, int perms); 44 fssh_status_t _kern_remove_dir(int fd, const char *path); 45 fssh_status_t _kern_read_link(int fd, const char *path, char *buffer, 47 fssh_status_t _kern_create_symlink(int fd, cons [all...] |
H A D | unistd.cpp | 48 extern "C" ssize_t _kern_read(int fd, off_t pos, void *buffer, size_t bufferSize); 49 extern "C" ssize_t _kern_write(int fd, off_t pos, const void *buffer, size_t bufferSize); 50 extern "C" int _kern_dup(int fd); 51 extern "C" status_t _kern_close(int fd); 58 test_size(int fd, off_t size) argument 65 if (lseek(fd, size - 1, SEEK_SET) < 0) 68 return (read(fd, &buffer, 1) == 1); 73 get_partition_size(int fd, off_t maxSize) argument 80 if (test_size(fd, mid)) 93 fssh_dup(int fd) argument 115 fssh_close(int fd) argument 137 fssh_ioctl(int fd, unsigned long op, ...) argument 371 fssh_read(int fd, void *buffer, fssh_size_t count) argument 389 fssh_read_pos(int fd, fssh_off_t pos, void *buffer, fssh_size_t count) argument 402 fssh_write(int fd, const void *buffer, fssh_size_t count) argument 420 fssh_write_pos(int fd, fssh_off_t pos, const void *buffer, fssh_size_t count) argument [all...] |
/haiku/src/system/libroot/posix/glibc/stdio-common/ |
H A D | tmpfile.c | 43 int fd; local 48 fd = __gen_tempname (buf, GEN_THIS); 49 if (fd < 0) 56 if ((f = __fdopen (fd, "w+b")) == NULL) 57 __close (fd);
|
/haiku/headers/build/host/darwin/sys/ |
H A D | stat.h | 16 int futimens(int fd, const struct timespec times[2]); 17 int utimensat(int fd, const char* path, const struct timespec times[2], 32 int fchmodat(int fd, const char* path, mode_t mode, int flag); 33 int fstatat(int fd, const char *path, struct stat *st, int flag); 34 int mkdirat(int fd, const char *path, mode_t mode); 35 int mkfifoat(int fd, const char *path, mode_t mode); 36 int mknodat(int fd, const char *name, mode_t mode, dev_t dev);
|
/haiku/headers/os/kernel/ |
H A D | fs_attr.h | 23 extern ssize_t fs_read_attr(int fd, const char *attribute, uint32 type, 25 extern ssize_t fs_write_attr(int fd, const char *attribute, uint32 type, 27 extern int fs_remove_attr(int fd, const char *attribute); 28 extern int fs_stat_attr(int fd, const char *attribute, 33 extern int fs_fopen_attr(int fd, const char *attribute, uint32 type, 35 extern int fs_close_attr(int fd); 39 extern DIR *fs_fopen_attr_dir(int fd);
|
/haiku/src/libs/bsd/ |
H A D | daemon.c | 57 int fd = open("/dev/null", O_RDWR); local 58 if (fd != -1) { 59 dup2(fd, STDIN_FILENO); 60 dup2(fd, STDOUT_FILENO); 61 dup2(fd, STDERR_FILENO); 62 if (fd > STDERR_FILENO) 63 close(fd);
|
/haiku/headers/build/os/kernel/ |
H A D | fs_attr.h | 24 extern ssize_t fs_read_attr(int fd, const char *attribute, uint32 type, 26 extern ssize_t fs_write_attr(int fd, const char *attribute, uint32 type, 28 extern int fs_remove_attr(int fd, const char *attribute); 29 extern int fs_stat_attr(int fd, const char *attribute, 34 extern int fs_fopen_attr(int fd, const char *attribute, uint32 type, 36 extern int fs_close_attr(int fd); 40 extern DIR *fs_fopen_attr_dir(int fd);
|
/haiku/src/tests/system/libroot/posix/ |
H A D | seek_and_write_test.cpp | 16 test_for_content(int fd, off_t start, const char* contents, size_t length) argument 22 if (pread(fd, buffer, toRead, start) != (ssize_t)toRead) { 40 test_for_zero(int fd, off_t start, off_t end) argument 46 if (pread(fd, buffer, length, start) != (ssize_t)length) { 85 int fd = open(name, O_RDWR | O_TRUNC | O_CREAT, 0644); local 86 if (fd < 0) { 99 if (write(fd, buffer, sizeof(buffer)) != (ssize_t)sizeof(buffer)) { 108 ftruncate(fd, 0); 112 pwrite(fd, "---", 3, 100 * 1024); 113 pwrite(fd, " [all...] |
H A D | flock_test.cpp | 23 intptr_t fd = (intptr_t)_fd; local 33 if (fcntl(fd, F_SETLK, &flock) == 0) { 43 if (fcntl(fd, F_SETLKW, &flock) == -1) { 51 if (fcntl(fd, F_SETLK, &flock) == -1) { 64 intptr_t fd = open("/etc/passwd", O_RDONLY); local 65 if (fd < 0) { 78 if (fcntl(fd, F_SETLK, &flock) == 0) { 87 if (fcntl(fd, F_SETLK, &flock) == -1) { 93 close(fd); 95 fd [all...] |
/haiku/src/system/libroot/os/ |
H A D | fs_attr.cpp | 29 int fd = _kern_open_attr_dir(file, path, traverse); local 30 if (fd < 0) { 31 __set_errno(fd); 36 if ((dir = __create_dir_struct(fd)) == NULL) { 37 _kern_close(fd); 49 fs_read_attr(int fd, const char* attribute, uint32 /*type*/, off_t pos, argument 52 ssize_t bytes = _kern_read_attr(fd, attribute, pos, buffer, readBytes); 58 fs_write_attr(int fd, const char* attribute, uint32 type, off_t pos, argument 79 ssize_t bytes = _kern_write_attr(fd, attribute, type, pos, buffer, 86 fs_remove_attr(int fd, cons argument 95 fs_stat_attr(int fd, const char* attribute, struct attr_info* attrInfo) argument 111 fs_fopen_attr(int fd, const char* attribute, uint32 type, int openMode) argument 119 fs_close_attr(int fd) argument 141 fs_fopen_attr_dir(int fd) argument [all...] |
/haiku/src/system/libroot/posix/glibc/libio/ |
H A D | freopen64.c | 43 int fd = -1; local 51 fd = __dup (_IO_fileno (fp)); 52 if (fd != -1) 53 filename = fd_to_filename (fd); 65 if (fd != -1) 67 __close (fd);
|
/haiku/src/system/libroot/posix/unistd/ |
H A D | read.c | 24 read(int fd, void* buffer, size_t bufferSize) argument 26 ssize_t status = _kern_read(fd, -1, buffer, bufferSize); 33 read_pos(int fd, off_t pos, void* buffer, size_t bufferSize) argument 38 RETURN_AND_SET_ERRNO_TEST_CANCEL(_kern_read(fd, pos, buffer, bufferSize)); 43 pread(int fd, void* buffer, size_t bufferSize, off_t pos) argument 48 RETURN_AND_SET_ERRNO_TEST_CANCEL(_kern_read(fd, pos, buffer, bufferSize));
|
H A D | ttyname.c | 22 * give the name of a tty fd. threadsafe. 23 * @param fd the tty to get the name from. 29 ttyname_r(int fd, char *buffer, size_t bufferSize) argument 34 if (fstat(fd, &fdStat) < 0) 37 if (!S_ISCHR(fdStat.st_mode) || !isatty(fd)) 41 if (ioctl(fd, B_GET_PATH_FOR_DEVICE, buffer, bufferSize) < 0) 48 * give the name of a tty fd. 49 * @param fd the tty to get the name from. 53 ttyname(int fd) argument 57 int err = ttyname_r(fd, pathnam [all...] |