Searched refs:fd (Results 76 - 100 of 571) sorted by relevance

1234567891011>>

/haiku/src/add-ons/accelerants/matrox/
H A Dglobal.h1 extern int fd;
/haiku/src/system/libroot/posix/sys/
H A Dflock.c17 flock(int fd, int op) argument
19 status_t status = _kern_flock(fd, op);
H A Dmkfifo.c23 mkfifoat(int fd, const char *path, mode_t mode) argument
25 RETURN_AND_SET_ERRNO(_kern_create_fifo(fd, path, mode));
H A Duio.c17 readv(int fd, const struct iovec *vecs, int count) argument
24 bytes = _kern_readv(fd, -1, vecs, count);
31 readv_pos(int fd, off_t pos, const struct iovec *vecs, int count) argument
38 bytes = _kern_readv(fd, pos, vecs, count);
45 writev(int fd, const struct iovec *vecs, int count) argument
52 bytes = _kern_writev(fd, -1, vecs, count);
59 writev_pos(int fd, off_t pos, const struct iovec *vecs, int count) argument
66 bytes = _kern_writev(fd, pos, vecs, count);
/haiku/src/system/libroot/posix/unistd/
H A Ddup.c16 dup(int fd) argument
18 RETURN_AND_SET_ERRNO(_kern_dup(fd));
H A Dlseek.c15 lseek(int fd, off_t pos, int whence) argument
17 off_t result = _kern_seek(fd, pos, whence);
H A Dlink.c23 readlinkat(int fd, const char *path, char *buffer, size_t bufferSize) argument
26 status_t status = _kern_read_link(fd, path, buffer, &linkLen);
56 symlinkat(const char *toPath, int fd, const char *symlinkPath) argument
58 RETURN_AND_SET_ERRNO(_kern_create_symlink(fd, symlinkPath, toPath, 0));
72 unlinkat(int fd, const char *path, int flag) argument
75 RETURN_AND_SET_ERRNO(_kern_remove_dir(fd, path));
77 RETURN_AND_SET_ERRNO(_kern_unlink(fd, path));
/haiku/src/bin/
H A Dfortune.c56 int fd; local
63 fd = open(name, O_RDONLY);
64 if (fd >= 0) {
66 return fd;
82 int fd; local
98 fd = open(file, O_RDONLY, 0);
99 if (fd < 0) {
104 if (fstat(fd, &stat) < 0) {
110 close(fd);
112 fd
[all...]
/haiku/src/tests/add-ons/kernel/file_systems/cdda/
H A Dcdda_text.cpp44 int fd = open(argv[1], O_RDONLY); local
45 if (fd < 0)
51 status_t status = read_table_of_contents(fd, toc, sizeof(buffer));
59 read_cdtext(fd, text);
64 close(fd);
/haiku/src/tests/system/kernel/
H A Dmmap_resize_test.cpp23 int fd = open(fileName, O_CREAT | O_RDWR | O_TRUNC, 0644); local
24 if (fd < 0) {
34 if (write(fd, buffer, sizeof(buffer)) != (ssize_t)sizeof(buffer)) {
41 void* address = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
49 if (ftruncate(fd, 0) < 0) {
/haiku/src/servers/power/
H A Dpower_button_monitor.cpp39 int fd = open(path.String(), O_RDONLY); local
40 if (fd > 0)
41 fFDs.insert(fd);
55 PowerButtonMonitor::HandleEvent(int fd) argument
58 if (read(fd, &button_pressed, 1) != 1)
/haiku/src/tests/system/libroot/posix/
H A Dchmod.cpp35 int fd = open(argv[1], O_RDONLY); local
36 if (fd < 0) {
41 if (fchmod(fd, 0666) == -1) {
44 close(fd);
47 close(fd);
/haiku/src/libs/util/
H A Dpidfile.c67 int error, fd, i; local
69 fd = open(path, O_RDONLY);
70 if (fd == -1)
73 i = read(fd, buf, sizeof(buf) - 1);
75 close(fd);
92 int error, fd; local
116 fd = open(pfh->pf_path, O_WRONLY | O_CREAT | O_NONBLOCK, mode);
117 if (fd >= 0) {
124 if (fcntl(fd, F_SETLK, &lock) == -1) {
125 close(fd);
166 int error, fd; local
[all...]
/haiku/src/tests/system/network/
H A Dudp_connect.cpp28 int fd = socket(AF_INET, SOCK_DGRAM, 0); local
29 if (fd < 0)
37 if (bind(fd, (sockaddr*)&addr, sizeof(addr)) != 0)
42 if (getsockname(fd, &ours, &ourLength) != 0)
56 if (connect(fd, (sockaddr*)&peer, sizeof(peer)) != 0)
60 if (getsockname(fd, &ours, &ourLength) != 0)
71 ssize_t bytesReceived = recv(fd, buffer, sizeof(buffer), 0);
79 send(fd, argv[2], strlen(argv[2]), 0);
82 send(fd, buffer, strlen(buffer), 0);
86 close(fd);
[all...]
/haiku/src/build/libroot/
H A Dfs.cpp129 FDFile(int fd) argument
131 fFD(fd)
151 futimens(int fd, const struct timespec times[2]) argument
153 FDFile file(fd);
162 FDPathFile(int fd, const char* path, int flag) argument
164 fFD(fd),
189 utimensat(int fd, const char* path, const struct timespec times[2], int flag) argument
191 FDPathFile file(fd, path, flag);
401 BPrivate::get_path(int fd, const char *name, string &path) argument
403 // get the node ref for the fd, i
481 _kern_create_dir(int fd, const char *path, int perms) argument
546 _kern_open_dir(int fd, const char *path) argument
572 _kern_open_parent_dir(int fd, char *name, size_t nameLength) argument
606 _kern_read_dir(int fd, struct dirent *buffer, size_t bufferSize, uint32 maxCount) argument
640 _kern_rewind_dir(int fd) argument
702 _kern_open(int fd, const char *path, int openMode, int perms) argument
729 _kern_seek(int fd, off_t pos, int seekType) argument
747 _kern_read(int fd, off_t pos, void *buffer, size_t bufferSize) argument
773 _kern_write(int fd, off_t pos, const void *buffer, size_t bufferSize) argument
799 _kern_close(int fd) argument
806 _kern_dup(int fd) argument
826 _kern_fsync(int fd) argument
843 _kern_read_stat(int fd, const char *path, bool traverseLink, struct stat *st, size_t statSize) argument
875 _kern_write_stat(int fd, const char *path, bool traverseLink, const struct stat *st, size_t statSize, int statMask) argument
1013 _kern_create_symlink(int fd, const char *path, const char *toPath, int mode) argument
1031 _kern_read_link(int fd, const char *path, char *buffer, size_t *_bufferSize) argument
1067 _kern_unlink(int fd, const char *path) argument
1109 _kern_lock_node(int fd) argument
1116 _kern_unlock_node(int fd) argument
1127 read_pos(int fd, off_t pos, void *buffer, size_t bufferSize) argument
1145 write_pos(int fd, off_t pos, const void *buffer, size_t bufferSize) argument
1178 _kern_readv(int fd, off_t pos, const struct iovec *vec, size_t count) argument
1191 _kern_writev(int fd, off_t pos, const struct iovec *vec, size_t count) argument
1207 _haiku_build_fchmod(int fd, mode_t mode) argument
1214 _haiku_build_fchmodat(int fd, const char* path, mode_t mode, int flag) argument
1228 _haiku_build_fstat(int fd, struct stat* st) argument
1235 _haiku_build_fstatat(int fd, const char* path, struct stat* st, int flag) argument
1246 _haiku_build_mkdirat(int fd, const char* path, mode_t mode) argument
1256 _haiku_build_mkfifoat(int fd, const char* path, mode_t mode) argument
1265 _haiku_build_utimensat(int fd, const char* path, const struct timespec times[2], int flag) argument
1324 _haiku_build_futimens(int fd, const struct timespec times[2]) argument
1331 _haiku_build_faccessat(int fd, const char* path, int accessMode, int flag) argument
1388 _haiku_build_fchdir(int fd) argument
1398 _haiku_build_close(int fd) argument
1408 _haiku_build_dup(int fd) argument
1439 _haiku_build_unlinkat(int fd, const char* path, int flag) argument
1449 _haiku_build_readlinkat(int fd, const char* path, char* buffer, size_t bufferSize) argument
1464 _haiku_build_symlinkat(const char* toPath, int fd, const char* symlinkPath) argument
1475 _haiku_build_ftruncate(int fd, off_t newSize) argument
1489 _haiku_build_fchown(int fd, uid_t owner, gid_t group) argument
1496 _haiku_build_fchownat(int fd, const char* path, uid_t owner, gid_t group, int flag) argument
1513 _haiku_build_mknodat(int fd, const char* name, mode_t mode, dev_t dev) argument
1536 _haiku_build_openat(int fd, const char* path, int openMode, mode_t permissions) argument
1548 _haiku_build_fcntl(int fd, int op, int argument) argument
[all...]
/haiku/src/add-ons/kernel/file_systems/ntfs/libntfs/
H A Dwin32_io.c676 * @fd: a win_fd structure that will be filled
689 static int ntfs_device_win32_getgeo(HANDLE handle, win32_fd *fd) argument
705 fd->geo_cylinders = ((DISK_GEOMETRY*)&b)->Cylinders.QuadPart;
706 fd->geo_sectors = ((DISK_GEOMETRY*)&b)->SectorsPerTrack;
707 fd->geo_size = ((DISK_GEOMETRY_EX*)&b)->DiskSize.QuadPart;
708 fd->geo_sector_size = NTFS_BLOCK_SIZE;
711 fd->geo_cylinders = ddi->Int13.MaxCylinders;
712 fd->geo_sectors = ddi->Int13.SectorsPerTrack;
713 fd->geo_heads = ddi->Int13.MaxHeads;
716 fd
747 ntfs_device_win32_getntgeo(HANDLE handle, win32_fd *fd) argument
797 ntfs_device_win32_open_file(char *filename, win32_fd *fd, int flags) argument
839 ntfs_device_win32_open_drive(int drive_id, win32_fd *fd, int flags) argument
877 ntfs_device_win32_open_lowlevel(int drive_id, win32_fd *fd, int flags) argument
1129 ntfs_device_win32_open_partition(int drive_id, unsigned int partition_id, win32_fd *fd, int flags) argument
1211 win32_fd fd; local
1286 win32_fd *fd = (win32_fd *)dev->d_private; local
1338 ntfs_device_win32_pio(win32_fd *fd, const s64 pos, const s64 count, void *rbuf, const void *wbuf) argument
1428 ntfs_device_win32_pread_simple(win32_fd *fd, const s64 pos, const s64 count, void *b) argument
1446 win32_fd *fd = (win32_fd *)dev->d_private; local
1532 win32_fd *fd = (win32_fd *)dev->d_private; local
1582 win32_fd *fd = (win32_fd *)dev->d_private; local
1620 ntfs_device_win32_pwrite_simple(win32_fd *fd, const s64 pos, const s64 count, const void *b) argument
1639 win32_fd *fd = (win32_fd *)dev->d_private; local
1770 win32_fd *fd = (win32_fd *)dev->d_private; local
1813 win32_fd *fd = (win32_fd *)dev->d_private; local
1835 win32_fd *fd = (win32_fd *)dev->d_private; local
1854 win32_fd *fd = (win32_fd *)dev->d_private; local
1910 win32_fd *fd; local
1930 win32_fd *fd; local
1967 ntfs_win32_set_sparse(int fd) argument
2022 win32_fd *fd; local
2032 ntfs_win32_ftruncate(int fd, s64 size) argument
[all...]
H A Dcompat.c124 int fd; local
141 if (!noclose && (fd = open("/dev/null", O_RDWR, 0)) != -1) {
142 (void)dup2(fd, 0);
143 (void)dup2(fd, 1);
144 (void)dup2(fd, 2);
145 if (fd > 2)
146 (void)close (fd);
/haiku/src/system/kernel/fs/
H A Dfd.cpp11 #include <fd.h>
47 int fd);
48 static struct file_descriptor* remove_fd(struct io_context* context, int fd);
53 // #pragma mark - General fd routines
57 void dump_fd(int fd, struct file_descriptor* descriptor);
60 dump_fd(int fd,struct file_descriptor* descriptor) argument
62 dprintf("fd[%d] = %p: type = %" B_PRId32 ", ref_count = %" B_PRId32 ", ops "
65 fd, descriptor, descriptor->type, descriptor->ref_count,
94 fd_close_on_exec(struct io_context* context, int fd) argument
96 return CHECK_BIT(context->fds_close_on_exec[fd /
101 fd_set_close_on_exec(struct io_context* context, int fd, bool closeFD) argument
117 int fd = -1; local
218 close_fd_index(struct io_context* context, int fd) argument
254 get_fd_locked(struct io_context* context, int fd) argument
275 get_fd(struct io_context* context, int fd) argument
284 get_open_fd(struct io_context* context, int fd) argument
301 remove_fd(struct io_context* context, int fd) argument
340 dup_fd(int fd, bool kernel) argument
441 dup_foreign_fd(team_id fromTeam, int fd, bool kernel) argument
469 fd_ioctl(bool kernelFD, int fd, uint32 op, void* buffer, size_t length) argument
520 select_fd(int32 fd, struct select_info* info, bool kernel) argument
599 deselect_fd(int32 fd, struct select_info* info, bool kernel) argument
650 fd_is_valid(int fd, bool kernel) argument
678 common_close(int fd, bool kernel) argument
685 common_user_io(int fd, off_t pos, void* buffer, size_t length, bool write) argument
736 common_user_vector_io(int fd, off_t pos, const iovec* userVecs, size_t count, bool write) argument
812 user_fd_kernel_ioctl(int fd, uint32 op, void* buffer, size_t length) argument
824 _user_read(int fd, off_t pos, void* buffer, size_t length) argument
831 _user_readv(int fd, off_t pos, const iovec* userVecs, size_t count) argument
838 _user_write(int fd, off_t pos, const void* buffer, size_t length) argument
845 _user_writev(int fd, off_t pos, const iovec* userVecs, size_t count) argument
852 _user_seek(int fd, off_t pos, int seekType) argument
872 _user_ioctl(int fd, uint32 op, void* buffer, size_t length) argument
890 _user_read_dir(int fd, struct dirent* userBuffer, size_t bufferSize, uint32 maxCount) argument
947 _user_rewind_dir(int fd) argument
966 _user_close(int fd) argument
973 _user_dup(int fd) argument
990 _kern_read(int fd, off_t pos, void* buffer, size_t length) argument
1030 _kern_readv(int fd, off_t pos, const iovec* vecs, size_t count) argument
1082 _kern_write(int fd, off_t pos, const void* buffer, size_t length) argument
1122 _kern_writev(int fd, off_t pos, const iovec* vecs, size_t count) argument
1174 _kern_seek(int fd, off_t pos, int seekType) argument
1190 _kern_ioctl(int fd, uint32 op, void* buffer, size_t length) argument
1201 _kern_read_dir(int fd, struct dirent* buffer, size_t bufferSize, uint32 maxCount) argument
1227 _kern_rewind_dir(int fd) argument
1246 _kern_close(int fd) argument
1253 _kern_dup(int fd) argument
[all...]
/haiku/src/add-ons/kernel/drivers/audio/ac97/es1370/
H A Ddebug.c54 int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666); local
57 write(fd,text,strlen(text));
58 close(fd);
66 int fd; local
77 fd = open(logfile, O_WRONLY | O_APPEND);
78 write(fd,buf,strlen(buf));
79 close(fd);
/haiku/src/add-ons/kernel/drivers/audio/echo/
H A Ddebug.c71 int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666); local
74 write(fd,text,strlen(text));
75 close(fd);
83 int fd; local
94 fd = open(logfile, O_WRONLY | O_APPEND);
95 write(fd,buf,strlen(buf));
96 close(fd);
/haiku/src/add-ons/kernel/drivers/audio/emuxki/
H A Ddebug.c73 int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666); local
76 write(fd,text,strlen(text));
77 close(fd);
85 int fd; local
96 fd = open(logfile, O_WRONLY | O_APPEND);
97 write(fd,buf,strlen(buf));
98 close(fd);
/haiku/src/add-ons/kernel/generic/mpu401/
H A Ddebug.c67 int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666); local
70 write(fd,text,strlen(text));
71 close(fd);
77 int fd; local
88 fd = open(logfile, O_WRONLY | O_APPEND);
89 write(fd,buf,strlen(buf));
90 close(fd);
/haiku/src/system/kernel/disk_device_manager/
H A DKFileSystem.cpp62 int fd = -1; local
63 if (partition->Open(O_RDONLY, &fd) != B_OK)
65 float result = fModule->identify_partition(fd, partition->PartitionData(),
67 close(fd);
78 int fd = -1; local
79 status_t result = partition->Open(O_RDONLY, &fd);
82 result = fModule->scan_partition(fd, partition->PartitionData(), cookie);
83 close(fd);
135 int fd = -1; local
136 status_t result = partition->Open(O_RDWR, &fd);
168 int fd = -1; local
194 int fd = -1; local
221 int fd = -1; local
246 int fd = -1; local
[all...]
/haiku/src/add-ons/kernel/drivers/audio/ac97/auvia/
H A Ddebug.c74 int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666); local
77 write(fd,text,strlen(text));
78 close(fd);
86 int fd; local
97 fd = open(logfile, O_WRONLY | O_APPEND);
98 write(fd,buf,strlen(buf));
99 close(fd);
/haiku/src/add-ons/kernel/drivers/audio/ac97/auich/
H A Ddebug.c74 int fd = open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0666); local
77 write(fd,text,strlen(text));
78 close(fd);
86 int fd; local
97 fd = open(logfile, O_WRONLY | O_APPEND);
98 write(fd,buf,strlen(buf));
99 close(fd);

Completed in 298 milliseconds

1234567891011>>