/haiku/src/tests/system/kernel/ |
H A D | select_check.cpp | 26 for (int fd = 0; fd < 3; fd++) { 27 if (strchr(config[fd], 'r')) 28 FD_SET(fd, &readSet); 29 if (strchr(config[fd], 'w')) 30 FD_SET(fd, &writeSet); 31 if (strchr(config[fd], 'e')) 32 FD_SET(fd, &errorSet); 38 for (int fd [all...] |
H A D | select_close_test.cpp | 14 int fd = *((int*)data); local 16 close(fd); 17 fprintf(stderr, "fd %d closed\n", fd); 25 int fd = dup(0); local 27 thread_id thread = spawn_thread(close_fd, "close fd", B_NORMAL_PRIORITY, 28 &fd); 34 FD_SET(fd, &readSet); 36 fprintf(stderr, "select({0, %d}, NULL, NULL, NULL) ...\n", fd); 37 int result = select(fd [all...] |
/haiku/src/system/libroot/posix/glibc/include/ |
H A D | unistd.h | 7 #define __isatty(fd) \ 8 isatty(fd) 10 #define __close(fd) \ 11 close(fd) 13 #define __read(fd, buffer, size) \ 14 read(fd, buffer, size) 16 #define __write(fd, buffer, size) \ 17 write(fd, buffer, size) 19 #define __lseek(fd, pos, whence) \ 20 lseek(fd, po [all...] |
/haiku/src/build/libroot/ |
H A D | fs_attr_bsdxattr.h | 21 list_attributes(int fd, const char* path, char* buffer, size_t bufferSize) argument 23 if (fd >= 0) 24 return flistxattr(fd, buffer, bufferSize, 0); 30 get_attribute(int fd, const char* path, const char* attribute, void* buffer, argument 33 if (fd >= 0) 34 return fgetxattr(fd, attribute, buffer, bufferSize, 0, 0); 40 set_attribute(int fd, const char* path, const char* attribute, argument 43 if (fd >= 0) 44 return fsetxattr(fd, attribute, buffer, bufferSize, 0, 0); 50 remove_attribute(int fd, cons argument [all...] |
H A D | fs_attr_xattr.h | 21 list_attributes(int fd, const char* path, char* buffer, size_t bufferSize) argument 23 if (fd >= 0) 24 return flistxattr(fd, buffer, bufferSize); 30 get_attribute(int fd, const char* path, const char* attribute, void* buffer, argument 33 if (fd >= 0) 34 return fgetxattr(fd, attribute, buffer, bufferSize); 40 set_attribute(int fd, const char* path, const char* attribute, argument 43 if (fd >= 0) 44 return fsetxattr(fd, attribute, buffer, bufferSize, 0); 50 remove_attribute(int fd, cons argument [all...] |
H A D | remapped_functions.h | 13 int _haiku_build_fchmod(int fd, mode_t mode); 14 int _haiku_build_fchmodat(int fd, const char* path, mode_t mode, int flag); 15 int _haiku_build_fstat(int fd, struct stat* st); 16 int _haiku_build_fstatat(int fd, const char* path, struct stat* st, 18 int _haiku_build_mkdirat(int fd, const char* path, mode_t mode); 19 int _haiku_build_mkfifoat(int fd, const char* path, mode_t mode); 20 int _haiku_build_utimensat(int fd, const char* path, 22 int _haiku_build_futimens(int fd, const struct timespec times[2]); 23 int _haiku_build_faccessat(int fd, const char* path, int accessMode, 25 int _haiku_build_fchdir(int fd); [all...] |
H A D | function_remapper.cpp | 16 fchmod(int fd, mode_t mode) argument 20 return _haiku_build_fchmod(fd, mode); 25 fchmodat(int fd, const char* path, mode_t mode, int flag) argument 29 return _haiku_build_fchmodat(fd, path, mode, flag); 34 fstat(int fd, struct stat* st) argument 38 return _haiku_build_fstat(fd, st); 43 fstatat(int fd, const char* path, struct stat* st, int flag) argument 47 return _haiku_build_fstatat(fd, path, st, flag); 52 mkdirat(int fd, const char* path, mode_t mode) argument 56 return _haiku_build_mkdirat(fd, pat 61 mkfifoat(int fd, const char* path, mode_t mode) argument 70 utimensat(int fd, const char* path, const struct timespec times[2], int flag) argument 79 futimens(int fd, const struct timespec times[2]) argument 88 faccessat(int fd, const char* path, int accessMode, int flag) argument 97 fchdir(int fd) argument 106 close(int fd) argument 115 dup(int fd) argument 142 unlinkat(int fd, const char* path, int flag) argument 151 readlinkat(int fd, const char* path, char* buffer, size_t bufferSize) argument 160 symlinkat(const char* toPath, int fd, const char* symlinkPath) argument 169 ftruncate(int fd, off_t newSize) argument 178 fchown(int fd, uid_t owner, gid_t group) argument 187 fchownat(int fd, const char* path, uid_t owner, gid_t group, int flag) argument 196 mknodat(int fd, const char* name, mode_t mode, dev_t dev) argument 233 openat(int fd, const char* path, int openMode, ...) argument 252 fcntl(int fd, int op, ...) argument 297 fs_fopen_attr_dir(int fd) argument 333 fs_fopen_attr(int fd, const char *attribute, uint32 type, int openMode) argument 342 fs_close_attr(int fd) argument 351 fs_read_attr(int fd, const char* attribute, uint32 type, off_t pos, void *buffer, size_t readBytes) argument 362 fs_write_attr(int fd, const char* attribute, uint32 type, off_t pos, const void *buffer, size_t writeBytes) argument 373 fs_remove_attr(int fd, const char* attribute) argument 382 fs_stat_attr(int fd, const char *attribute, struct attr_info *attrInfo) argument [all...] |
/haiku/src/tests/system/network/ |
H A D | stop_stack.c | 10 int fd; local 15 fd = open("/dev/" NET_STACK_DRIVER_PATH, O_RDWR); 16 if (fd < 0) 17 err(fd, "can't open the stack driver"); 19 rv = ioctl(fd, NET_STACK_STOP, NULL, 0); 22 rv = close(fd);
|
/haiku/headers/build/ |
H A D | BeOSBuildCompatibility.h | 49 extern ssize_t read_pos(int fd, off_t pos, void* buffer, size_t count); 50 extern ssize_t write_pos(int fd, off_t pos, const void* buffer, size_t count); 85 int _haiku_build_fchmod(int fd, mode_t mode); 86 int _haiku_build_fchmodat(int fd, const char* path, mode_t mode, int flag); 87 int _haiku_build_fstat(int fd, struct stat* st); 88 int _haiku_build_fstatat(int fd, const char* path, struct stat* st, 90 int _haiku_build_mkdirat(int fd, const char* path, mode_t mode); 91 int _haiku_build_mkfifoat(int fd, const char* path, mode_t mode); 92 int _haiku_build_utimensat(int fd, const char* path, 94 int _haiku_build_futimens(int fd, cons [all...] |
/haiku/src/tests/libs/bsd/ |
H A D | forkpty.c | 10 int fd = -1; local 13 if ((pid = forkpty(&fd, NULL, NULL, NULL)) < 0) 25 return fd; 34 int fd = do_fork(); local 40 n = read (fd, s, 1);
|
/haiku/src/servers/power/ |
H A D | lid_monitor.cpp | 21 int fd = open("/dev/power/acpi_lid/0", O_RDONLY); local 22 if (fd > 0) 23 fFDs.insert(fd); 35 LidMonitor::HandleEvent(int fd) argument 38 if (read(fd, &status, 1) != 1)
|
/haiku/src/add-ons/media/media-add-ons/opensound/ |
H A D | driver_io.h | 36 #define DRIVER_GET_DESCRIPTION(x...) ioctl( fd, B_MULTI_GET_DESCRIPTION, x ) 37 #define DRIVER_GET_ENABLED_CHANNELS(x...) ioctl( fd, B_MULTI_GET_ENABLED_CHANNELS, x ) 38 #define DRIVER_SET_ENABLED_CHANNELS(x...) ioctl( fd, B_MULTI_SET_ENABLED_CHANNELS, x ) 39 #define DRIVER_SET_GLOBAL_FORMAT(x...) ioctl( fd, B_MULTI_SET_GLOBAL_FORMAT, x ) 40 #define DRIVER_GET_BUFFERS(x...) ioctl( fd, B_MULTI_GET_BUFFERS, x ) 41 #define DRIVER_BUFFER_EXCHANGE(x...) ioctl( fd, B_MULTI_BUFFER_EXCHANGE, x ) 43 #define DRIVER_LIST_MIX_CONTROLS(x...) ioctl( fd, B_MULTI_LIST_MIX_CONTROLS, x ) 44 #define DRIVER_SET_MIX(x...) ioctl( fd, B_MULTI_SET_MIX, x ) 45 #define DRIVER_GET_MIX(x...) ioctl( fd, B_MULTI_GET_MIX, x )
|
/haiku/src/tests/system/libroot/posix/ |
H A D | termios.cpp | 28 int fd = open(argv[1], O_RDONLY); local 29 if (fd < 0) { 34 int err = tcdrain(fd); 38 close(fd); 41 err = tcflow(fd, TCION); 45 close(fd); 49 err = tcflush(fd, TCIOFLUSH); 53 close(fd); 57 close(fd);
|
/haiku/src/tools/fs_shell/ |
H A D | fcntl.cpp | 22 extern "C" int _kern_open(int fd, const char *path, int openMode, 42 int fd; local 44 fd = open(pathname, to_platform_open_mode(oflags), 47 fd = _kern_open(-1, pathname, to_platform_open_mode(oflags), 49 if (fd < 0) { 50 fssh_set_errno(fd); 51 fd = -1; 56 restricted_file_opened(fd); 58 return fd;
|
H A D | vfs_request_io.cpp | 15 fssh_do_fd_io(int fd, fssh_io_request* request) argument 23 fssh_do_iterative_fd_io(int fd, fssh_io_request* request, argument
|
/haiku/src/system/libroot/posix/unistd/ |
H A D | terminal.c | 21 isatty(int fd) argument 25 return _kern_ioctl(fd, TCGETA, &termios, sizeof(struct termios)) == B_OK; 47 tcsetpgrp(int fd, pid_t pgrpid) argument 49 return ioctl(fd, TIOCSPGRP, &pgrpid); 54 tcgetpgrp(int fd) argument 57 int status = ioctl(fd, TIOCGPGRP, &foregroundProcess);
|
H A D | close.c | 19 close(int fd) argument 21 RETURN_AND_SET_ERRNO_TEST_CANCEL(_kern_close(fd));
|
H A D | sync.c | 19 fsync(int fd) argument 21 RETURN_AND_SET_ERRNO_TEST_CANCEL(_kern_fsync(fd));
|
/haiku/src/tools/fixup_tos_boot_checksum/ |
H A D | fixup_tos_boot_checksum.c | 10 int fd, i; local 13 fd = open(argv[1], O_RDWR); 14 if (fd < 0) { 17 if (read(fd, sector, 512-2) < 512-2) { 32 //lseek(fd, 0LL, SEEK_SET); 33 write(fd, §or[512-2], 2); 34 close(fd);
|
/haiku/src/tests/system/libroot/os/ |
H A D | fs_attr_test.cpp | 19 test_read(int fd, const char* attribute, type_code type, const char* data, argument 23 if (fs_stat_attr(fd, attribute, &info) != 0) { 41 ssize_t bytesRead = fs_read_attr(fd, attribute, B_RAW_TYPE, 0, buffer, 60 int fd = open(kTestFileName, O_CREAT | O_TRUNC | O_WRONLY); local 61 if (fd < 0) { 69 fs_write_attr(fd, "TEST", B_STRING_TYPE, 0, "Hello BeOS", 11); 70 test_read(fd, "TEST", B_STRING_TYPE, "Hello BeOS", 11); 73 fs_write_attr(fd, "TEST", B_STRING_TYPE, 6, "Haiku", 6); 74 test_read(fd, "TEST", B_STRING_TYPE, "Hello Haiku", 12); 76 fs_write_attr(fd, "TESTra [all...] |
/haiku/headers/private/fs_shell/ |
H A D | fssh_unistd.h | 43 extern int fssh_fchdir(int fd); 46 extern int fssh_dup(int fd); 48 extern int fssh_close(int fd); 57 extern int fssh_ftruncate(int fd, fssh_off_t newSize); 59 extern int fssh_ioctl(int fd, unsigned long op, ...); 61 extern fssh_ssize_t fssh_read(int fd, void *buffer, fssh_size_t count); 62 extern fssh_ssize_t fssh_read_pos(int fd, fssh_off_t pos, void *buffer, 64 extern fssh_ssize_t fssh_pread(int fd, void *buffer, fssh_size_t count, 66 extern fssh_ssize_t fssh_write(int fd, const void *buffer, fssh_size_t count); 67 extern fssh_ssize_t fssh_write_pos(int fd, fssh_off_ [all...] |
/haiku/headers/posix/sys/ |
H A D | select.h | 43 #define _FD_BITSINDEX(fd) ((fd) / NFDBITS) 44 #define _FD_BIT(fd) (1L << ((fd) % NFDBITS)) 50 #define FD_SET(fd, set) ((set)->bits[_FD_BITSINDEX(fd)] |= _FD_BIT(fd)) 51 #define FD_CLR(fd, set) ((set)->bits[_FD_BITSINDEX(fd)] &= ~_FD_BIT(fd)) [all...] |
/haiku/src/add-ons/kernel/file_systems/reiserfs/ |
H A D | compatibility.h | 31 # define closesocket(fd) close(fd)
|
/haiku/headers/private/userlandfs/shared/ |
H A D | Compatibility.h | 16 # define closesocket(fd) close(fd)
|
/haiku/headers/build/host/darwin/ |
H A D | dirent.h | 10 DIR* fdopendir(int fd);
|