Searched refs:fd (Results 26 - 50 of 1127) sorted by relevance

1234567891011>>

/haiku-fatelf/src/bin/coreutils/lib/
H A Dsavedir.h25 char *fdsavedir (int fd);
H A Dfchdir.c63 /* Try to ensure dirs has enough room for a slot at index fd; free any
67 ensure_dirs_slot (size_t fd) argument
69 if (fd < dirs_allocated)
70 free (dirs[fd].name);
77 if (new_allocated <= fd)
78 new_allocated = fd + 1;
129 /* Close FD, cleaning up any fd to name mapping if fd was visiting a
132 _gl_unregister_fd (int fd) argument
134 if (fd >
147 _gl_register_fd(int fd, const char *filename) argument
200 _gl_directory_name(int fd) argument
222 rpl_fstat(int fd, struct stat *statbuf) argument
237 int fd = dirfd (dp); local
254 int fd = dirfd (dp); local
283 fchdir(int fd) argument
[all...]
H A Dftruncate.c15 ftruncate (int fd, off_t length) argument
17 return fcntl (fd, F_CHSIZE, length);
29 ftruncate (int fd, off_t length) argument
34 if (fstat (fd, &filebuf) < 0)
40 if (lseek (fd, (length - 1), SEEK_SET) < 0)
44 if (write (fd, "", 1) != 1)
61 if (fcntl (fd, F_FREESP, &fl) < 0)
72 ftruncate (int fd, off_t length) argument
74 return chsize (fd, length);
82 ftruncate (int fd, off_ argument
[all...]
H A Dopenat.h42 int openat_permissive (int fd, char const *file, int flags, mode_t mode,
61 chownat (int fd, char const *file, uid_t owner, gid_t group) argument
63 return fchownat (fd, file, owner, group, 0);
67 lchownat (int fd, char const *file, uid_t owner, gid_t group) argument
69 return fchownat (fd, file, owner, group, AT_SYMLINK_NOFOLLOW);
73 chmodat (int fd, char const *file, mode_t mode) argument
75 return fchmodat (fd, file, mode, 0);
79 lchmodat (int fd, char const *file, mode_t mode) argument
81 return fchmodat (fd, file, mode, AT_SYMLINK_NOFOLLOW);
85 statat (int fd, cha argument
91 lstatat(int fd, char const *name, struct stat *st) argument
102 accessat(int fd, char const *file, int mode) argument
108 euidaccessat(int fd, char const *file, int mode) argument
[all...]
/haiku-fatelf/src/bin/diffutils/lib/
H A Dsetmode.h25 # define set_binary_mode(fd, mode) 1
/haiku-fatelf/src/bin/findutils/gnulib/lib/
H A Dsavedir.h24 char *fdsavedir (int fd);
H A Dbinary-io.h52 # define SET_BINARY(fd) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0)
54 # define SET_BINARY(fd) setmode (fd, O_BINARY)
60 # define SET_BINARY(fd) /* nothing */
/haiku-fatelf/src/add-ons/media/media-add-ons/legacy/
H A Ddriver_io.h9 #define DRIVER_GET_PARAMS(x...) ioctl( fd, SOUND_GET_PARAMS, x )
10 #define DRIVER_SET_PARAMS(x...) ioctl( fd, SOUND_SET_PARAMS, x )
11 #define DRIVER_SET_PLAYBACK_COMPLETION_SEM(x...) ioctl( fd, SOUND_SET_PLAYBACK_COMPLETION_SEM, x )
12 #define DRIVER_SET_CAPTURE_COMPLETION_SEM(x...) ioctl( fd, SOUND_SET_CAPTURE_COMPLETION_SEM, x )
13 #define DRIVER_WRITE_BUFFER(x...) ioctl( fd, SOUND_WRITE_BUFFER, x )
14 #define DRIVER_READ_BUFFER(x...) ioctl( fd, SOUND_READ_BUFFER, x )
15 #define DRIVER_LOCK_FOR_DMA(x...) ioctl( fd, SOUND_LOCK_FOR_DMA, x )
/haiku-fatelf/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/fsync/
H A D7-1.c33 int fd[2]; local
35 if (pipe(fd) == -1)
42 if (fsync(fd[1]) == -1 && errno == EINVAL)
46 close(fd[0]);
47 close(fd[1]);
54 close(fd[0]);
55 close(fd[1]);
/haiku-fatelf/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/shm_unlink/
H A D1-1.c26 int fd; local
28 fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
29 if(fd == -1) {
34 if(close(fd) != 0) {
45 fd = shm_open(SHM_NAME, O_RDONLY, 0);
47 if(fd == -1 && errno == ENOENT) {
50 } else if (fd == -1) {
H A D2-1.c26 int fd; local
28 fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
29 if(fd == -1) {
39 fd = shm_open(SHM_NAME, O_RDONLY, 0);
41 if(fd == -1 && errno == ENOENT) {
44 } else if (fd == -1) {
H A D5-1.c27 int fd; local
29 fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
30 if(fd == -1) {
40 fd = shm_open(SHM_NAME, O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
41 if (fd == -1 && errno == EEXIST) {
44 } else if(fd == -1) {
/haiku-fatelf/src/tests/system/kernel/
H A Dselect_close_test.cpp14 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 (void*)fd);
34 FD_SET(fd, &readSet);
36 fprintf(stderr, "select({0, %d}, NULL, NULL, NULL) ...\n", fd);
37 int result = select(fd
[all...]
/haiku-fatelf/src/tests/libs/bsd/
H A Dforkpty.c10 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-fatelf/src/add-ons/media/media-add-ons/opensound/
H A Ddriver_io.h36 #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-fatelf/src/tools/fs_shell/
H A Dfcntl.cpp21 extern "C" int _kern_open(int fd, const char *path, int openMode,
41 int fd; local
43 fd = open(pathname, to_platform_open_mode(oflags),
46 fd = _kern_open(-1, pathname, to_platform_open_mode(oflags),
48 if (fd < 0) {
49 fssh_set_errno(fd);
50 fd = -1;
55 restricted_file_opened(fd);
57 return fd;
/haiku-fatelf/src/bin/bash/lib/sh/
H A Dzread.c42 zread (fd, buf, len)
43 int fd;
49 while ((r = read (fd, buf, len)) < 0 && errno == EINTR)
63 zreadretry (fd, buf, len)
64 int fd;
73 r = read (fd, buf, len);
88 zreadintr (fd, buf, len)
89 int fd;
93 return (read (fd, buf, len));
104 zreadc (fd, c
[all...]
/haiku-fatelf/src/system/libroot/posix/unistd/
H A Dterminal.c21 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);
/haiku-fatelf/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/shm_open/
H A D22-1.c25 int fd; local
28 fd = shm_open(SHM_NAME, O_RDONLY|O_CREAT, S_IRUSR|S_IWUSR);
29 if(fd == -1) {
34 fd = shm_open(SHM_NAME, O_RDONLY|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
36 if(fd == -1 && errno == EEXIST) {
40 } else if(fd != -1) {
/haiku-fatelf/src/tools/fixup_tos_boot_checksum/
H A Dfixup_tos_boot_checksum.c10 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, &sector[512-2], 2);
34 close(fd);
/haiku-fatelf/src/libs/tiff/
H A Dtif_print.c64 _TIFFPrintField(FILE* fd, const TIFFFieldInfo *fip, argument
69 fprintf(fd, " %s: ", fip->field_name);
73 fprintf(fd, "%u", ((uint8 *) raw_data)[j]);
75 fprintf(fd, "0x%x",
78 fprintf(fd, "%d", ((int8 *) raw_data)[j]);
80 fprintf(fd, "%u", ((uint16 *) raw_data)[j]);
82 fprintf(fd, "%d", ((int16 *) raw_data)[j]);
84 fprintf(fd, "%lu",
87 fprintf(fd, "%ld", (long)((int32 *) raw_data)[j]);
91 fprintf(fd, "
115 _TIFFPrettyPrintField(TIFF* tif, FILE* fd, ttag_t tag, uint32 value_count, void *raw_data) argument
195 TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) argument
612 _TIFFprintAscii(FILE* fd, const char* cp) argument
632 _TIFFprintAsciiTag(FILE* fd, const char* name, const char* value) argument
[all...]
/haiku-fatelf/src/tests/system/libroot/os/
H A Dfs_attr_test.cpp19 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-fatelf/headers/private/fs_shell/
H A Dfssh_unistd.h43 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-fatelf/headers/posix/sys/
H A Dselect.h43 #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-fatelf/headers/private/userlandfs/shared/
H A DCompatibility.h39 # define closesocket(fd) close(fd)

Completed in 239 milliseconds

1234567891011>>