Searched refs:fd (Results 101 - 125 of 1127) sorted by relevance

1234567891011>>

/haiku-fatelf/src/build/libroot/
H A Dfs_freebsd.cpp25 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, &sectorSize) == -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-fatelf/src/tests/add-ons/kernel/file_systems/fs_shell/
H A Dsysdep.c54 int fd;
57 fd = open(device, O_RDONLY);
58 if (ioctl(fd, B_GET_GEOMETRY, &dg) < 0)
61 close(fd);
68 get_device_block_size(int fd) argument
76 if (ioctl(fd, B_GET_GEOMETRY, &dg) < 0) {
77 if (fstat(fd, &st) < 0 || S_ISDIR(st.st_mode))
88 get_num_device_blocks(int fd) argument
93 fstat(fd, &st); /* XXXdbg should be an ioctl or something */
95 return st.st_size / get_device_block_size(fd);
115 device_is_removeable(int fd) argument
135 lock_removeable_device(int fd, bool on_or_off) argument
149 read_pos(int fd, fs_off_t _pos, void *data, size_t nbytes) argument
171 write_pos(int fd, fs_off_t _pos, const void *data, size_t nbytes) argument
205 readv_pos(int fd, fs_off_t _pos, const struct iovec *iov, int count) argument
240 writev_pos(int fd, fs_off_t _pos, const struct iovec *iov, int count) argument
280 int fd = open(pathname, to_platform_open_mode(oflags), local
294 build_platform_close(int fd) argument
308 build_platform_fstat(int fd, struct my_stat *myst) argument
331 build_platform_read_pos(int fd, fs_off_t pos, void *buf, size_t count) argument
346 test_size(int fd, off_t size) argument
361 get_partition_size(int fd, off_t maxSize) argument
383 build_platform_ioctl(int fd, unsigned long op, ...) argument
[all...]
/haiku-fatelf/src/bin/findutils/gnulib/lib/
H A Dopenat.h66 int openat (int fd, char const *file, int flags, /* mode_t mode */ ...);
67 int openat_permissive (int fd, char const *file, int flags, mode_t mode,
72 DIR *fdopendir (int fd);
74 int fstatat (int fd, char const *file, struct stat *st, int flag);
76 int unlinkat (int fd, char const *file, int flag);
88 int rpl_fstatat (int fd, char const *file, struct stat *st, int flag);
95 int mkdirat (int fd, char const *file, mode_t mode);
98 int fchmodat (int fd, char const *file, mode_t mode, int flag);
99 int fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag);
105 chownat (int fd, cha argument
111 lchownat(int fd, char const *file, uid_t owner, gid_t group) argument
117 chmodat(int fd, char const *file, mode_t mode) argument
123 lchmodat(int fd, char const *file, mode_t mode) argument
[all...]
/haiku-fatelf/src/tools/fs_shell/
H A Dunistd.cpp47 extern "C" int _kern_dup(int fd);
48 extern "C" status_t _kern_close(int fd);
55 test_size(int fd, off_t size) argument
62 if (lseek(fd, size - 1, SEEK_SET) < 0)
65 return (read(fd, &buffer, 1) == 1);
70 get_partition_size(int fd, off_t maxSize) argument
77 if (test_size(fd, mid))
90 fssh_dup(int fd) argument
96 newFD = dup(fd);
98 newFD = _kern_dup(fd);
112 fssh_close(int fd) argument
134 fssh_ioctl(int fd, unsigned long op, ...) argument
368 fssh_read(int fd, void *buffer, fssh_size_t count) argument
386 fssh_read_pos(int fd, fssh_off_t pos, void *buffer, fssh_size_t count) argument
395 fssh_write(int fd, const void *buffer, fssh_size_t count) argument
413 fssh_write_pos(int fd, fssh_off_t pos, const void *buffer, fssh_size_t count) argument
[all...]
/haiku-fatelf/src/bin/bash/lib/sh/
H A Dnetconn.c44 isnetconn (fd)
45 int fd;
53 rv = getpeername(fd, &sa, &l);
61 if (isatty (fd))
63 if (fstat (fd, &sb) < 0)
74 if (fstat (fd, &sb) < 0)
/haiku-fatelf/src/libs/util/
H A Dlogout.c59 int fd; local
63 if ((fd = open(_PATH_UTMP, O_RDWR, 0)) < 0)
66 while (read(fd, &ut, sizeof(UTMP)) == sizeof(UTMP)) {
72 (void)lseek(fd, -(off_t)sizeof(UTMP), L_INCR);
73 (void)write(fd, &ut, sizeof(UTMP));
76 (void)close(fd);
/haiku-fatelf/src/system/libroot/posix/glibc/libio/
H A Dfreopen64.c43 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-fatelf/src/system/libroot/posix/unistd/
H A Dread.c24 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 Dttyname.c22 * 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...]
H A Dwrite.c22 write(int fd, void const *buffer, size_t bufferSize) argument
24 int status = _kern_write(fd, -1, buffer, bufferSize);
31 write_pos(int fd, off_t pos, const void *buffer, size_t bufferSize) argument
36 RETURN_AND_SET_ERRNO_TEST_CANCEL(_kern_write(fd, pos, buffer, bufferSize));
41 pwrite(int fd, const void *buffer, size_t bufferSize, off_t pos) argument
46 RETURN_AND_SET_ERRNO_TEST_CANCEL(_kern_write(fd, pos, buffer, bufferSize));
/haiku-fatelf/src/tests/misc/
H A Dwritev-test.cpp11 int fd = open("testfile", O_CREAT | O_RDWR, 0666); local
13 if (fd < 0) {
21 ret = writev(fd, &vec1, 0x80000001);
28 ret = writev(fd, &vec2, 1);
35 ret = writev(fd, &vec3, 0xfff);
41 close(fd);
/haiku-fatelf/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/shm_open/
H A D28-2.c40 int fd; local
44 fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
45 if(fd == -1) {
50 if(ftruncate(fd, BUF_SIZE) != 0) {
56 buf = mmap(NULL, BUF_SIZE, PROT_WRITE|PROT_READ, MAP_SHARED, fd, 0);
65 if(close(fd) != 0) {
H A D32-1.c61 int fd; local
71 fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, 0);
72 if(fd == -1) {
77 fd = shm_open(SHM_NAME, O_RDWR, 0);
79 if(fd == -1 && errno == EACCES) {
83 } else if(fd != -1) {
H A D38-1.c24 int fd = 0, count = 0; local
26 while(fd != -1) {
27 fd = shm_open(SHM_NAME, O_RDWR|O_CREAT, S_IRUSR|S_IWUSR);
/haiku-fatelf/src/tools/fixup_amiga_boot_checksum/
H A Dfixup_amiga_boot_checksum.c11 int fd; local
16 fd = open(argv[1], O_RDWR);
17 if (fd < 0) {
20 if (read(fd, bootblock, BB_SIZE) < BB_SIZE) {
41 lseek(fd, 0LL, SEEK_SET);
42 write(fd, bootblock, BB_SIZE);
/haiku-fatelf/headers/build/host/darwin/
H A Dunistd.h10 int faccessat(int fd, const char* path, int accessMode, int flag);
11 int fchownat(int fd, const char* path, uid_t owner, gid_t group, int flag);
12 ssize_t readlinkat(int fd, const char *path, char *buffer, size_t bufferSize);
/haiku-fatelf/src/system/libroot/posix/
H A Dtermios.c16 /*! get the attributes of the TTY device at fd */
18 tcgetattr(int fd, struct termios *termios) argument
20 return ioctl(fd, TCGETA, termios);
24 /*! set the attributes for the TTY device at fd */
26 tcsetattr(int fd, int opt, const struct termios *termios) argument
49 return ioctl(fd, method, termios);
55 tcdrain(int fd) argument
58 * expressly for this purpose (e.g. ioctl(fd, TIOCDRAIN, 0).
63 return ioctl(fd, TCSBRK, 1);
69 tcflow(int fd, in argument
89 tcflush(int fd, int queueSelector) argument
97 tcsendbreak(int fd, int duration) argument
[all...]
/haiku-fatelf/src/tests/system/libroot/posix/posixtestsuite/conformance/interfaces/fsync/
H A D5-1.c26 int fd; local
28 /* -1 is an invalid fd */
30 fd = -1;
31 if (fsync(fd) == -1 && errno == EBADF)
33 printf("Got EBADF when fd=-1\n");
/haiku-fatelf/headers/cpp/
H A Dfstream.h40 fstreambase(int fd);
41 fstreambase(int fd, char *p, int l); /* Deprecated */
52 void attach(int fd);
54 int filedesc() { return rdbuf()->fd(); }
62 ifstream(int fd) : fstreambase(fd) { } argument
63 ifstream(int fd, char *p, int l) : fstreambase(fd, p, l) { } /*Deprecated*/ argument
73 ofstream(int fd) : fstreambase(fd) { } argument
74 ofstream(int fd, char *p, int l) argument
84 fstream(int fd) argument
87 fstream(int fd, char *p, int l) argument
[all...]
/haiku-fatelf/headers/posix/sys/
H A Duio.h22 ssize_t readv(int fd, const struct iovec *vector, size_t count);
23 ssize_t readv_pos(int fd, off_t pos, const struct iovec *vec, size_t count);
24 ssize_t writev(int fd, const struct iovec *vector, size_t count);
25 ssize_t writev_pos(int fd, off_t pos, const struct iovec *vec, size_t count);
/haiku-fatelf/headers/private/libroot/
H A Ddirent_private.h15 DIR* __create_dir_struct(int fd);
/haiku-fatelf/src/add-ons/accelerants/et6x00/
H A DGlobalData.c10 int fd; variable
H A DGlobalData.h13 extern int fd;
/haiku-fatelf/src/bin/coreutils/lib/
H A Dfopen-safer.c37 int fd = fileno (fp); local
39 if (0 <= fd && fd <= STDERR_FILENO)
41 int f = dup_safer (fd);
H A Dlseek.c38 rpl_lseek (int fd, off_t offset, int whence) argument
42 HANDLE h = (HANDLE) _get_osfhandle (fd);
56 if (fstat (fd, &statbuf) < 0)
64 return lseek (fd, offset, whence);

Completed in 385 milliseconds

1234567891011>>