Searched refs:fd (Results 51 - 75 of 571) sorted by last modified time

1234567891011>>

/haiku/src/servers/launch/
H A DLaunchDaemon.cpp2077 int fd = open("/dev/dprintf", openMode); local
2079 int fd = open("/dev/null", openMode);
2081 if (fd != targetFD) {
2082 dup2(fd, targetFD);
2083 close(fd);
/haiku/src/libs/bsd/
H A Dkqueue.cpp17 int fd = _kern_event_queue_create(0); local
18 if (fd < 0) {
19 __set_errno(fd);
22 return fd;
H A Dfts.c86 #define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd))
544 int fd, rc, serrno; local
597 if ((fd = open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
601 rc = fchdir(fd);
604 (void)close(fd);
912 * the saved fd; if one of fts_open()'s arguments is a relative path
1185 * Change to dir specified by fd or p->fts_accpath without getting
1190 fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path) argument
1195 newfd = fd;
[all...]
/haiku/headers/private/kernel/fs/
H A Dfd.h93 extern status_t close_fd_index(struct io_context *context, int fd);
97 extern int dup_foreign_fd(team_id fromTeam, int fd, bool kernel);
98 extern status_t select_fd(int32 fd, struct select_info *info, bool kernel);
99 extern status_t deselect_fd(int32 fd, struct select_info *info, bool kernel);
100 extern bool fd_is_valid(int fd, bool kernel);
103 extern bool fd_close_on_exec(struct io_context *context, int fd);
104 extern void fd_set_close_on_exec(struct io_context *context, int fd,
109 extern status_t user_fd_kernel_ioctl(int fd, ulong op, void *buffer,
/haiku/src/apps/terminal/
H A DTermParse.cpp78 TermParse::TermParse(int fd) argument
80 fFd(fd),
/haiku/src/tools/fs_shell/
H A Dfd.cpp8 #include "fd.h"
35 /*** General fd routines ***/
39 void dump_fd(int fd, struct file_descriptor *descriptor);
42 dump_fd(int fd,struct file_descriptor *descriptor) argument
44 fssh_dprintf("fd[%d] = %p: type = %d, ref_count = %d, ops = %p, u.vnode = %p, u.mount = %p, cookie = %p, open_mode = %x, pos = %lld\n",
45 fd, descriptor, (int)descriptor->type, (int)descriptor->ref_count, descriptor->ops,
74 fd_close_on_exec(struct io_context *context, int fd) argument
76 return CHECK_BIT(context->fds_close_on_exec[fd / 8], fd & 7) ? true : false;
81 fd_set_close_on_exec(struct io_context *context, int fd, boo argument
98 int fd = -1; local
213 get_fd(struct io_context *context, int fd) argument
243 remove_fd(struct io_context *context, int fd) argument
272 dup_fd(int fd, bool kernel) argument
360 select_fd(int fd, uint8_t event, uint32_t ref, struct select_sync *sync, bool kernel) argument
387 deselect_fd(int fd, uint8_t event, struct select_sync *sync, bool kernel) argument
416 fd_is_valid(int fd, bool kernel) argument
443 common_close(int fd, bool kernel) argument
469 _kern_read(int fd, fssh_off_t pos, void *buffer, fssh_size_t length) argument
504 _kern_readv(int fd, fssh_off_t pos, const fssh_iovec *vecs, fssh_size_t count) argument
548 _kern_write(int fd, fssh_off_t pos, const void *buffer, fssh_size_t length) argument
583 _kern_writev(int fd, fssh_off_t pos, const fssh_iovec *vecs, fssh_size_t count) argument
627 _kern_seek(int fd, fssh_off_t pos, int seekType) argument
646 _kern_ioctl(int fd, uint32_t op, void *buffer, fssh_size_t length) argument
668 _kern_read_dir(int fd, struct fssh_dirent *buffer, fssh_size_t bufferSize, uint32_t maxCount) argument
693 _kern_rewind_dir(int fd) argument
715 _kern_close(int fd) argument
722 _kern_dup(int fd) argument
[all...]
H A Dblock_cache.cpp105 int fd; member in struct:FSShell::block_cache
119 block_cache(int fd, fssh_off_t numBlocks,
475 fd(_fd),
746 if (fssh_read_pos(cache->fd, blockNumber * blockSize, block->current_data,
901 fssh_ssize_t written = fssh_write_pos(cache->fd, block->block_number * blockSize,
1520 fssh_block_cache_create(int fd, fssh_off_t numBlocks, fssh_size_t blockSize, bool readOnly) argument
1522 block_cache* cache = new(std::nothrow) block_cache(fd, numBlocks, blockSize,
/haiku/src/tests/system/kernel/cache/
H A Dblock_cache_test.cpp124 block_cache_write_pos(int fd, off_t offset, const void* buffer, size_t size) argument
137 block_cache_read_pos(int fd, off_t offset, void* buffer, size_t size) argument
/haiku/src/tests/system/kernel/
H A Dadvisory_locking_test.cpp29 do_lock(int fd, int type, off_t start, off_t length) argument
38 if (fcntl(fd, F_SETLK, &flock) != 0) {
49 shared_lock(int fd, off_t start, off_t length) argument
51 return do_lock(fd, F_RDLCK, start, length);
56 exclusive_lock(int fd, off_t start, off_t length) argument
58 return do_lock(fd, F_WRLCK, start, length);
63 remove_lock(int fd, off_t start, off_t length) argument
65 return do_lock(fd, F_UNLCK, start, length);
102 int fd = open(kTemporaryFile, O_CREAT | O_RDWR, 0644); local
103 if (fd <
[all...]
/haiku/src/tests/system/boot/loader/
H A DHandle.cpp21 # define read_pos(fd, pos, buffer, size) pread(fd, buffer, size, pos)
22 # define write_pos(fd, pos, buffer, size) pwrite(fd, buffer, size, pos)
/haiku/src/tests/kits/storage/virtualdrive/
H A Dmkvirtualdrive.cpp99 int fd = open(VIRTUAL_DRIVE_CONTROL_DEVICE, O_RDONLY); local
100 if (fd < 0) {
139 if (ioctl(fd, VIRTUAL_DRIVE_REGISTER_FILE, &info) != 0) {
146 close(fd);
156 int fd = open(device, O_RDONLY); local
157 if (fd < 0) {
165 if (ioctl(fd, VIRTUAL_DRIVE_UNREGISTER_FILE, immediately) != 0) {
170 close(fd);
179 int fd = open(device, O_RDONLY); local
180 if (fd <
[all...]
/haiku/src/tests/kits/storage/
H A DMimeTypeTest.cpp4171 int fd = open(device, O_RDONLY);
4172 CHK(fd != -1);
4179 int error = ioctl(fd, B_GET_ICON, &iconData);
4181 CHK(close(fd) == 0);
H A DBasicTest.cpp18 int fd; local
19 while ((fd = dup(1)) != -1)
20 fds.insert(fd);
/haiku/src/system/libroot/posix/
H A Dpwd_query.c141 int fill_grent_from_fd(int fd, struct group *gbuf, char *buf, size_t buflen) argument
146 len = fs_read_attr(fd, B_GR_GID, B_INT32_TYPE, 0LL, &gbuf->gr_gid, sizeof(gid_t));
155 len = fs_read_attr(fd, B_GR_NAME, B_STRING_TYPE, 0LL, buf, GR_MAX_NAME);
197 int fd; local
221 fd = dentopen(dent, p->grfile);
222 if (fd < B_OK)
224 err = fill_grent_from_fd(fd, gbuf, buf, buflen);
226 close(fd);
264 int fd; local
286 fd
306 int fd; local
362 fill_pwent_from_fd(int fd, struct passwd *pwbuf, char *buf, size_t buflen) argument
474 int fd; local
541 int fd; local
584 int fd; local
[all...]
/haiku/src/system/kernel/
H A Dmodule.cpp257 status_t _AddModuleNode(dev_t device, ino_t node, int fd,
1391 ModuleNotificationService::_AddModuleNode(dev_t device, ino_t node, int fd, argument
1395 status_t status = vfs_get_vnode_from_fd(fd, true, &vnode);
1528 int fd = _kern_open_dir(dirfd(dir), dirent->d_name); local
1529 if (fd < 0)
1532 DIR* subDir = fdopendir(fd);
1534 close(fd);
/haiku/src/system/kernel/fs/
H A Dnode_monitor.cpp18 #include <fd.h>
/haiku/src/bin/
H A Dbadblocks.cpp10 //#define pread(fd, buf, count, pos) read_pos(fd, pos, buf, count)
25 int fd; local
32 fd = open(dev, O_RDONLY);
33 if (fd < 0) {
50 got = pread(fd, buffer, len, at);
70 got = pread(fd, buffer, blockSize, at + blockSize * i);
83 close(fd);
87 close(fd);
/haiku/src/add-ons/kernel/partitioning_systems/apple/
H A Dapple.cpp57 get_next_partition(int fd, apple_driver_descriptor &descriptor, uint32 &cookie, argument
65 ssize_t bytesRead = read_pos(fd, (off_t)block * descriptor.BlockSize(),
111 apple_identify_partition(int fd, partition_data *partition, void **_cookie) argument
116 if (read_pos(fd, 0, buffer, sizeof(buffer)) < (ssize_t)sizeof(buffer))
144 apple_scan_partition(int fd, partition_data *partition, void *_cookie) argument
161 while ((status = get_next_partition(fd, descriptor, cookie, partitionMap)) == B_OK) {
/haiku/src/add-ons/kernel/partitioning_systems/atari/
H A Datari.cpp78 atari_identify_partition(int fd, partition_data *partition, void **_cookie) argument
84 ssize_t bytesRead = read_pos(fd, 0, buffer, sizeof(buffer));
154 atari_scan_partition(int fd, partition_data *partition, void *_cookie) argument
/haiku/src/add-ons/kernel/partitioning_systems/amiga/
H A Damiga_rdb.cpp78 get_next_partition(int fd, rigid_disk_block &rdb, uint32 &cookie, argument
89 ssize_t bytesRead = read_pos(fd, (off_t)cookie * rdb.BlockSize(),
107 search_rdb(int fd, rigid_disk_block **_rdb) argument
111 ssize_t bytesRead = read_pos(fd, sector * 512, buffer, sizeof(buffer));
150 amiga_rdb_identify_partition(int fd, partition_data *partition, void **_cookie) argument
153 if (!search_rdb(fd, &rdb))
162 amiga_rdb_scan_partition(int fd, partition_data *partition, void *_cookie) argument
179 while ((status = get_next_partition(fd, rdb, cookie, partitionBlock))
/haiku/src/add-ons/kernel/file_systems/userlandfs/server/beos/
H A Dfs_cache.c96 beos_read_phys_blocks(int fd, fs_off_t bnum, void *data, uint num_blocks, int bsize) argument
105 ret = read_pos(fd, bnum * bsize, data, num_blocks * bsize);
108 ret = read_pos(fd, (bnum * bsize) + sum, data, CHUNK);
116 ret = read_pos(fd, (bnum * bsize) + sum, data,
133 beos_write_phys_blocks(int fd, fs_off_t bnum, void *data, uint num_blocks, int bsize) argument
142 ret = write_pos(fd, bnum * bsize, data, num_blocks * bsize);
145 ret = write_pos(fd, (bnum * bsize) + sum, data, CHUNK);
153 ret = write_pos(fd, (bnum * bsize) + sum, data,
1123 beos_init_cache_for_device(int fd, fs_off_t max_blocks) argument
1127 if (fd >
[all...]
/haiku/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/
H A DVolume.cpp20 #include <fs/fd.h> // kernel private
177 int fd; member in struct:Volume::IterativeFDIOCookie
184 IterativeFDIOCookie(Volume* volume, int fd, int32 requestID, argument
189 fd(fd),
200 if (fd >= 0)
201 close(fd);
723 Volume::DoIterativeFDIO(int fd, int32 requestID, void* clientCookie, argument
733 fd = dup_foreign_fd(fFileSystem->GetTeam(), fd, tru
[all...]
/haiku/src/add-ons/kernel/file_systems/udf/
H A Dkernel_interface.cpp77 udf_identify_partition(int fd, partition_data *partition, void **_cookie) argument
79 TRACE(("udf_identify_partition: fd = %d, id = %ld, offset = %lld, size = %lld "
80 "content_size = %lld, block_size = %lu\n", fd, partition->id,
89 status_t error = udf_recognize(fd, partition->offset, partition->size,
106 udf_scan_partition(int fd, partition_data *partition, void *_cookie) argument
108 TRACE(("udf_scan_partition: fd = %d\n", fd));
/haiku/src/add-ons/kernel/file_systems/iso9660/
H A Dkernel_interface.cpp93 fs_identify_partition(int fd, partition_data* partition, void** _cookie) argument
97 status_t status = iso9660_fs_identify(fd, info);
109 fs_scan_partition(int fd, partition_data* partition, void* _cookie) argument
199 result = close(volume->fd);
449 return read_file_io_vec_pages(volume->fd, &fileVec, 1, vecs, count,
474 return do_iterative_fd_io(volume->fd, request, iterative_io_get_vecs_hook,
H A Diso9660.cpp48 get_device_block_size(int fd) argument
52 if (ioctl(fd, B_GET_GEOMETRY, &geometry, sizeof(device_geometry)) < 0) {
54 if (fstat(fd, &st) < 0 || S_ISDIR(st.st_mode))
638 volume->fd = open(partitionInfo.device, O_RDONLY);
641 if (volume->fdOfSession < 0 || volume->fd < 0) {
642 close(volume->fd);
653 close(volume->fd);
694 TRACE(("ISO9660: cache init: dev %d, max blocks %lld\n", volume->fd, maxBlocks));
695 volume->fBlockCache = block_cache_create(volume->fd, maxBlocks,
731 close(volume->fd);
[all...]

Completed in 266 milliseconds

1234567891011>>