Searched refs:fd (Results 1 - 25 of 571) sorted by last modified time

1234567891011>>

/haiku/src/tools/fs_shell/
H A Dvfs.cpp17 #include "fd.h"
251 static fssh_status_t fd_and_path_to_vnode(int fd, char *path,
1304 * \a path must be given in either case. \a fd might be omitted, in which
1307 * of the directory referred to by \a fd. If \a path is absolute \a fd is
1313 * \param fd The FD. May be < 0.
1327 fd_and_path_to_dir_vnode(int fd, char *path, struct vnode **_vnode, argument
1332 if (fd < 0)
1339 return fd_and_path_to_vnode(fd, path, true, _vnode, NULL, kernel);
1588 get_fd_and_vnode(int fd, struc argument
1608 get_vnode_from_fd(int fd, bool kernel) argument
1634 fd_and_path_to_vnode(int fd, char *path, bool traverseLeafLink, struct vnode **_vnode, fssh_vnode_id *_parentID, bool kernel) argument
1670 int fd; local
1730 common_file_io_vec_pages(int fd, const fssh_file_io_vec *fileVecs, fssh_size_t fileVecCount, const fssh_iovec *vecs, fssh_size_t vecCount, uint32_t *_vecIndex, fssh_size_t *_vecOffset, fssh_size_t *_numBytes, bool doWrite) argument
2172 fssh_read_pages(int fd, fssh_off_t pos, const fssh_iovec *vecs, fssh_size_t count, fssh_size_t *_numBytes) argument
2213 fssh_write_pages(int fd, fssh_off_t pos, const fssh_iovec *vecs, fssh_size_t count, fssh_size_t *_numBytes) argument
2254 fssh_read_file_io_vec_pages(int fd, const fssh_file_io_vec *fileVecs, fssh_size_t fileVecCount, const fssh_iovec *vecs, fssh_size_t vecCount, uint32_t *_vecIndex, fssh_size_t *_vecOffset, fssh_size_t *_bytes) argument
2265 fssh_write_file_io_vec_pages(int fd, const fssh_file_io_vec *fileVecs, fssh_size_t fileVecCount, const fssh_iovec *vecs, fssh_size_t vecCount, uint32_t *_vecIndex, fssh_size_t *_vecOffset, fssh_size_t *_bytes) argument
2324 vfs_get_cookie_from_fd(int fd, void **_cookie) argument
2338 vfs_get_vnode_from_fd(int fd, bool kernel, void **vnode) argument
3097 file_create(int fd, char *path, int openMode, int perms, bool kernel) argument
3143 file_open(int fd, char *path, int openMode, bool kernel) argument
3288 dir_create(int fd, char *path, int perms, bool kernel) argument
3338 dir_open(int fd, char *path, bool kernel) argument
3471 dir_remove(int fd, char *path, bool kernel) argument
3529 common_fcntl(int fd, int op, uint32_t argument, bool kernel) argument
3622 common_sync(int fd, bool kernel) argument
3645 common_lock_node(int fd, bool kernel) argument
3673 common_unlock_node(int fd, bool kernel) argument
3701 common_read_link(int fd, char *path, char *buffer, fssh_size_t *_bufferSize, bool kernel) argument
3722 common_create_symlink(int fd, char *path, const char *toPath, int mode, bool kernel) argument
3785 common_unlink(int fd, char *path, bool kernel) argument
3830 common_rename(int fd, char *path, int newFD, char *newPath, bool kernel) argument
3905 common_path_read_stat(int fd, char *path, bool traverseLeafLink, struct fssh_stat *stat, bool kernel) argument
3931 common_path_write_stat(int fd, char *path, bool traverseLeafLink, const struct fssh_stat *stat, int statMask, bool kernel) argument
3955 attr_dir_open(int fd, char *path, bool kernel) argument
4030 attr_create(int fd, const char *name, uint32_t type, int openMode, bool kernel) argument
4068 attr_open(int fd, const char *name, int openMode, bool kernel) argument
4230 attr_remove(int fd, const char *name, bool kernel) argument
5031 set_cwd(int fd, char *path, bool kernel) argument
5173 _kern_open(int fd, const char *path, int openMode, int perms) argument
5228 _kern_open_dir(int fd, const char *path) argument
5239 _kern_fcntl(int fd, int op, uint32_t argument) argument
5246 _kern_fsync(int fd) argument
5253 _kern_lock_node(int fd) argument
5260 _kern_unlock_node(int fd) argument
5289 _kern_create_dir(int fd, const char *path, int perms) argument
5300 _kern_remove_dir(int fd, const char *path) argument
5334 _kern_read_link(int fd, const char *path, char *buffer, fssh_size_t *_bufferSize) argument
5365 _kern_create_symlink(int fd, const char *path, const char *toPath, int mode) argument
5411 _kern_unlink(int fd, const char *path) argument
5485 _kern_read_stat(int fd, const char *path, bool traverseLeafLink, fssh_struct_stat *stat, fssh_size_t statSize) argument
5554 _kern_write_stat(int fd, const char *path, bool traverseLeafLink, const fssh_struct_stat *stat, fssh_size_t statSize, int statMask) argument
5599 _kern_open_attr_dir(int fd, const char *path) argument
5613 _kern_create_attr(int fd, const char *name, uint32_t type, int openMode) argument
5620 _kern_open_attr(int fd, const char *name, int openMode) argument
5627 _kern_remove_attr(int fd, const char *name) argument
5679 _kern_setcwd(int fd, const char *path) argument
5702 int fd = fssh_open(partition, FSSH_O_RDWR); local
[all...]
H A Dfssh.cpp23 #include "fd.h"
740 int fd = _kern_open(-1, file, FSSH_O_RDONLY, FSSH_O_RDONLY); local
741 if (fd < 0) {
742 fprintf(stderr, "error: %s\n", fssh_strerror(fd));
765 ssize_t statusOrNumBytes = _kern_read(fd, pos, buffer, numBytes);
768 _kern_close(fd);
777 _kern_close(fd);
965 int fd = _kern_open_dir(-1, file); local
966 if (fd < 0) {
968 file, fssh_strerror(fd));
1210 int fd = _kern_open_query(volumeID, query, strlen(query), 0, -1, -1); local
[all...]
H A Dcommand_cp.cpp158 virtual fssh_status_t Init(const char *path, int fd, argument
161 fFD = fd;
165 fAttrDir = fs_fopen_attr_dir(fd);
243 virtual fssh_status_t Init(const char *path, int fd, argument
246 fssh_status_t error = HostNode::Init(path, fd, st);
325 virtual fssh_status_t Init(const char *path, int fd, argument
328 fssh_status_t error = HostNode::Init(path, fd, st);
358 int fd = fssh_open(path, openMode); local
359 if (fd < 0)
364 if (fssh_fstat(fd,
402 int fd = fssh_creat(path, st.fssh_st_mode & FSSH_S_IUMSK); local
433 int fd = fssh_open(path, FSSH_O_RDONLY | FSSH_O_NOTRAVERSE); local
464 int fd = fssh_open(path, FSSH_O_RDONLY | FSSH_O_NOTRAVERSE); local
496 _ApplyStat(int fd, const struct fssh_stat &st) argument
524 Init(const char *path, int fd, const struct fssh_stat &st) argument
645 Init(const char *path, int fd, const struct fssh_stat &st) argument
722 int fd = _kern_open(-1, path, openMode, 0); local
767 int fd = _kern_open(-1, path, FSSH_O_RDWR | FSSH_O_EXCL | FSSH_O_CREAT, local
801 int fd = _kern_open(-1, path, FSSH_O_RDONLY | FSSH_O_NOTRAVERSE, 0); local
834 int fd = _kern_open(-1, path, FSSH_O_RDONLY | FSSH_O_NOTRAVERSE, 0); local
863 _ApplyStat(int fd, const struct fssh_stat &st) argument
[all...]
/haiku/src/tests/system/network/
H A Dunix_dgram_test.cpp547 int fd = shm_open("test_shm", O_CREAT | O_RDWR, 0666); local
548 if (fd == -1) {
565 char buf[CMSG_SPACE(sizeof(fd))];
575 cmsg->cmsg_len = CMSG_LEN(sizeof(fd));
576 memcpy(CMSG_DATA(cmsg), &fd, sizeof(fd)); local
611 if (cmsg->cmsg_len != CMSG_LEN(sizeof(fd))) {
619 REPORT_ERROR("recvmsg() failed: unexpected fd %d\n", fd1);
625 status = fstat(fd, &statbuf);
649 close(fd);
[all...]
/haiku/src/add-ons/kernel/file_systems/btrfs/
H A Dkernel_interface.cpp80 btrfs_identify_partition(int fd, partition_data* partition, void** _cookie) argument
83 status_t status = Volume::Identify(fd, &superBlock);
96 btrfs_scan_partition(int fd, partition_data* partition, void* _cookie) argument
1068 btrfs_initialize(int fd, partition_id partitionID, const char* name, argument
1086 status = volume.Initialize(fd, name, parameters.blockSize,
1115 btrfs_uninitialize(int fd, partition_id partitionID, off_t partitionSize, argument
1127 if (write_pos(fd, BTRFS_SUPER_BLOCK_OFFSET, &superBlock,
/haiku/src/kits/package/
H A DPackageInfo.cpp144 PackageFileLocation(int fd) argument
147 fFD(fd)
338 BPackageInfo::ReadFromPackageFile(int fd) argument
340 return _ReadFromPackageFile(PackageFileLocation(fd));
/haiku/headers/os/package/
H A DPackageInfo.h61 status_t ReadFromPackageFile(int fd);
/haiku/src/system/runtime_loader/
H A Druntime_loader.cpp272 int fd; local
278 fd = try_open_executable(pathList, pathEnd - pathList, name,
281 if (fd >= 0) {
284 status = _kern_read_stat(fd, NULL, true, &stat, sizeof(struct stat));
287 return fd;
290 _kern_close(fd);
307 int fd = B_ENTRY_NOT_FOUND; local
311 fd = _kern_open(-1, name, O_RDONLY, 0);
312 if (fd >= 0 || type == B_APP_IMAGE)
313 return fd;
403 int fd; local
481 determine_x86_abi(int fd, const Elf32_Ehdr& elfHeader, bool& _isGcc2) argument
637 get_executable_architecture(int fd, const char** _architecture) argument
701 int fd = _kern_open(-1, path, O_RDONLY, 0); local
[all...]
H A Delf_load_image.cpp504 int fd; local
538 fd = open_executable(path, type, rpath, runpath, get_program_path(),
540 if (fd < 0) {
541 FATAL("Cannot open file %s (needed by %s): %s\n", name, requestingObjectPath, strerror(fd));
543 return fd;
559 _kern_close(fd);
566 length = _kern_read(fd, 0, &eheader, sizeof(eheader));
587 length = _kern_read(fd, eheader.e_phoff, pheaderBuffer, pheaderSize);
623 status = map_image(fd, path, image, eheader.e_type == ET_EXEC);
639 analyze_image_haiku_version_and_abi(fd, imag
[all...]
/haiku/src/system/kernel/fs/
H A Dvfs.cpp43 #include <fd.h>
414 static status_t common_path_read_stat(int fd, char* path, bool traverseLeafLink,
422 static status_t fd_and_path_to_vnode(int fd, char* path, bool traverseLeafLink,
554 FDCloser(int fd, bool kernel) : fFD(fd), fKernel(kernel) {} argument
561 void SetTo(int fd, bool kernel) argument
564 fFD = fd;
581 int fd = fFD; local
583 return fd;
2379 \a path must be given in either case. \a fd migh
2401 fd_and_path_to_dir_vnode(int fd, char* path, VnodePutter& _vnode, char* filename, bool kernel) argument
2707 get_fd_and_vnode(int fd, struct vnode** _vnode, bool kernel) argument
2729 get_vnode_from_fd(int fd, bool kernel) argument
2754 fd_and_path_to_vnode(int fd, char* path, bool traverseLeafLink, VnodePutter& _vnode, ino_t* _parentID, bool kernel) argument
2793 int fd; local
3384 struct file_descriptor* fd = context->fds[i]; local
4051 read_file_io_vec_pages(int fd, const file_io_vec* fileVecs, size_t fileVecCount, const iovec* vecs, size_t vecCount, uint32* _vecIndex, size_t* _vecOffset, size_t* _bytes) argument
4069 write_file_io_vec_pages(int fd, const file_io_vec* fileVecs, size_t fileVecCount, const iovec* vecs, size_t vecCount, uint32* _vecIndex, size_t* _vecOffset, size_t* _bytes) argument
4153 vfs_get_cookie_from_fd(int fd, void** _cookie) argument
4167 vfs_get_vnode_from_fd(int fd, bool kernel, struct vnode** vnode) argument
4325 vfs_read_stat(int fd, const char* path, bool traverseLeafLink, struct stat* stat, bool kernel) argument
5364 int fd = get_new_fd(FDTYPE_FILE, NULL, vnode, cookie, openMode, kernel); local
5442 int fd = open_vnode(vnode.Get(), openMode & ~O_CREAT, kernel); local
5479 int fd = get_new_fd(FDTYPE_FILE, NULL, vnode.Get(), cookie, openMode, kernel); local
5573 file_create(int fd, char* path, int openMode, int perms, bool kernel) argument
5626 file_open(int fd, char* path, int openMode, bool kernel) argument
5900 dir_create(int fd, char* path, int perms, bool kernel) argument
5958 dir_open(int fd, char* path, bool kernel) argument
6094 dir_remove(int fd, char* path, bool kernel) argument
6152 common_fcntl(int fd, int op, size_t argument, bool kernel) argument
6335 common_sync(int fd, bool kernel) argument
6355 common_lock_node(int fd, bool kernel) argument
6375 common_unlock_node(int fd, bool kernel) argument
6395 common_preallocate(int fd, off_t offset, off_t length, bool kernel) argument
6435 common_read_link(int fd, char* path, char* buffer, size_t* _bufferSize, bool kernel) argument
6455 common_create_symlink(int fd, char* path, const char* toPath, int mode, bool kernel) argument
6516 common_unlink(int fd, char* path, bool kernel) argument
6539 common_access(int fd, char* path, int mode, bool effectiveUserGroup, bool kernel) argument
6560 common_rename(int fd, char* path, int newFD, char* newPath, bool kernel) argument
6639 common_path_read_stat(int fd, char* path, bool traverseLeafLink, struct stat* stat, bool kernel) argument
6658 common_path_write_stat(int fd, char* path, bool traverseLeafLink, const struct stat* stat, int statMask, bool kernel) argument
6680 attr_dir_open(int fd, char* path, bool traverseLeafLink, bool kernel) argument
6756 attr_create(int fd, char* path, const char* name, uint32 type, int openMode, bool kernel) argument
6798 attr_open(int fd, char* path, const char* name, int openMode, bool kernel) argument
6968 attr_remove(int fd, const char* name, bool kernel) argument
7049 int fd; local
7252 int fd; local
8052 fs_read_attr(int fd, const char *attribute, uint32 type, off_t pos, void *buffer, size_t readBytes) argument
8095 set_cwd(int fd, char* path, bool kernel) argument
8293 _kern_open(int fd, const char* path, int openMode, int perms) argument
8345 _kern_open_dir(int fd, const char* path) argument
8356 _kern_fcntl(int fd, int op, size_t argument) argument
8363 _kern_fsync(int fd) argument
8370 _kern_lock_node(int fd) argument
8377 _kern_unlock_node(int fd) argument
8384 _kern_preallocate(int fd, off_t offset, off_t length) argument
8413 _kern_create_dir(int fd, const char* path, int perms) argument
8424 _kern_remove_dir(int fd, const char* path) argument
8453 _kern_read_link(int fd, const char* path, char* buffer, size_t* _bufferSize) argument
8479 _kern_create_symlink(int fd, const char* path, const char* toPath, int mode) argument
8518 _kern_unlink(int fd, const char* path) argument
8560 _kern_access(int fd, const char* path, int mode, bool effectiveUserGroup) argument
8591 _kern_read_stat(int fd, const char* path, bool traverseLeafLink, struct stat* stat, size_t statSize) argument
8638 _kern_write_stat(int fd, const char* path, bool traverseLeafLink, const struct stat* stat, size_t statSize, int statMask) argument
8682 _kern_open_attr_dir(int fd, const char* path, bool traverseLeafLink) argument
8693 _kern_open_attr(int fd, const char* path, const char* name, uint32 type, int openMode) argument
8710 _kern_remove_attr(int fd, const char* name) argument
8763 _kern_setcwd(int fd, const char* path) argument
9063 _user_open(int fd, const char* userPath, int openMode, int perms) argument
9103 _user_open_dir(int fd, const char* userPath) argument
9142 _user_open_parent_dir(int fd, char* userName, size_t nameLength) argument
9185 _user_fcntl(int fd, int op, size_t argument) argument
9196 _user_fsync(int fd) argument
9203 _user_flock(int fd, int operation) argument
9255 _user_lock_node(int fd) argument
9262 _user_unlock_node(int fd) argument
9269 _user_preallocate(int fd, off_t offset, off_t length) argument
9294 _user_create_dir(int fd, const char* userPath, int perms) argument
9313 _user_remove_dir(int fd, const char* userPath) argument
9334 _user_read_link(int fd, const char* userPath, char* userBuffer, size_t* userBufferSize) argument
9382 _user_create_symlink(int fd, const char* userPath, const char* userToPath, int mode) argument
9437 _user_unlink(int fd, const char* userPath) argument
9481 _user_create_fifo(int fd, const char* userPath, mode_t perms) argument
9575 _user_access(int fd, const char* userPath, int mode, bool effectiveUserGroup) argument
9594 _user_read_stat(int fd, const char* userPath, bool traverseLink, struct stat* userStat, size_t statSize) argument
9643 _user_write_stat(int fd, const char* userPath, bool traverseLeafLink, const struct stat* userStat, size_t statSize, int statMask) argument
9697 _user_open_attr_dir(int fd, const char* userPath, bool traverseLeafLink) argument
9718 _user_read_attr(int fd, const char* userAttribute, off_t pos, void* userBuffer, size_t readBytes) argument
9743 _user_write_attr(int fd, const char* userAttribute, uint32 type, off_t pos, const void* buffer, size_t writeBytes) argument
9771 _user_stat_attr(int fd, const char* userAttribute, struct attr_info* userAttrInfo) argument
9819 _user_open_attr(int fd, const char* userPath, const char* userName, uint32 type, int openMode) argument
9854 _user_remove_attr(int fd, const char* userName) argument
9988 _user_setcwd(int fd, const char* userPath) argument
[all...]
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...]
H A Dvfs_request_io.cpp473 do_fd_io(int fd, io_request* request) argument
476 file_descriptor* descriptor = get_fd_and_vnode(fd, &vnode, true);
489 do_iterative_fd_io(int fd, io_request* request, iterative_io_get_vecs getVecs, argument
492 TRACE_RIO("[%" B_PRId32 "] do_iterative_fd_io(fd: %d, request: %p "
494 find_thread(NULL), fd, request, request->Offset(), request->Length());
497 file_descriptor* descriptor = get_fd_and_vnode(fd, &vnode, true);
H A Dsocket.cpp20 #include <fd.h>
36 #define GET_SOCKET_FD_OR_RETURN(fd, kernel, descriptor) \
38 status_t getError = get_socket_descriptor(fd, kernel, descriptor); \
176 get_socket_descriptor(int fd, bool kernel, file_descriptor*& descriptor) argument
178 if (fd < 0)
181 descriptor = get_fd(get_current_io_context(kernel), fd);
337 int fd = new_fd(get_current_io_context(kernel), descriptor); local
338 if (fd < 0) {
343 return fd;
365 int fd local
377 common_bind(int fd, const struct sockaddr *address, socklen_t addressLength, bool kernel) argument
389 common_shutdown(int fd, int how, bool kernel) argument
400 common_connect(int fd, const struct sockaddr *address, socklen_t addressLength, bool kernel) argument
413 common_listen(int fd, int backlog, bool kernel) argument
424 common_accept(int fd, struct sockaddr *address, socklen_t *_addressLength, bool kernel) argument
452 common_recv(int fd, void *data, size_t length, int flags, bool kernel) argument
463 common_recvfrom(int fd, void *data, size_t length, int flags, struct sockaddr *address, socklen_t *_addressLength, bool kernel) argument
476 common_recvmsg(int fd, struct msghdr *message, int flags, bool kernel) argument
487 common_send(int fd, const void *data, size_t length, int flags, bool kernel) argument
498 common_sendto(int fd, const void *data, size_t length, int flags, const struct sockaddr *address, socklen_t addressLength, bool kernel) argument
511 common_sendmsg(int fd, const struct msghdr *message, int flags, bool kernel) argument
522 common_getsockopt(int fd, int level, int option, void *value, socklen_t *_length, bool kernel) argument
535 common_setsockopt(int fd, int level, int option, const void *value, socklen_t length, bool kernel) argument
548 common_getpeername(int fd, struct sockaddr *address, socklen_t *_addressLength, bool kernel) argument
561 common_getsockname(int fd, struct sockaddr *address, socklen_t *_addressLength, bool kernel) argument
574 common_sockatmark(int fd, bool kernel) argument
[all...]
/haiku/src/servers/package/
H A DCommitTransactionHandler.cpp1866 FileDescriptorCloser fd(fVolume->OpenRootDirectory());
1867 if (!fd.IsSet()) {
1872 .SetSystemError(fd.Get());
1875 if (ioctl(fd.Get(), PACKAGE_FS_OPERATION_CHANGE_ACTIVATION, request,
H A DVolume.cpp234 FileDescriptorCloser fd(directory.Dup());
235 if (!fd.IsSet()) {
237 strerror(fd.Get()));
238 RETURN_ERROR(fd.Get());
254 if (ioctl(fd.Get(), PACKAGE_FS_OPERATION_GET_VOLUME_INFO, info,
313 FileDescriptorCloser fd(OpenRootDirectory());
314 if (!fd.IsSet()) {
316 strerror(fd.Get()));
317 RETURN_ERROR(fd.Get());
328 error = _GetActivePackages(fd
1155 _GetActivePackages(int fd) argument
[all...]
/haiku/src/system/kernel/vm/
H A Dvm.cpp37 #include <fs/fd.h>
2138 /*! Will map the file specified by \a fd to an area in memory.
2145 bool unmapAddressRange, int fd, off_t offset, bool kernel)
2151 TRACE(("_vm_map_file(fd = %d, offset = %" B_PRIdOFF ", size = %lu, mapping "
2152 "%" B_PRIu32 ")\n", fd, offset, size, mapping));
2166 if (fd < 0) {
2177 file_descriptor* descriptor = get_fd(get_current_io_context(kernel), fd);
2207 status_t status = vfs_get_vnode_from_fd(fd, kernel, &vnode);
2302 int fd, off_t offset)
2308 mapping, unmapAddressRange, fd, offse
2143 _vm_map_file(team_id team, const char* name, void** _address, uint32 addressSpec, size_t size, uint32 protection, uint32 mapping, bool unmapAddressRange, int fd, off_t offset, bool kernel) argument
2300 vm_map_file(team_id aid, const char* name, void** address, uint32 addressSpec, addr_t size, uint32 protection, uint32 mapping, bool unmapAddressRange, int fd, off_t offset) argument
6714 _user_map_file(const char* userName, void** userAddress, uint32 addressSpec, size_t size, uint32 protection, uint32 mapping, bool unmapAddressRange, int fd, off_t offset) argument
[all...]
/haiku/src/bin/network/traceroute/
H A Difaddrlist.c65 register int fd, nipaddr; local
76 fd = socket(AF_INET, SOCK_DGRAM, 0);
77 if (fd < 0) {
84 if (ioctl(fd, SIOCGIFCONF, (char *)&ifc) < 0 ||
93 (void)close(fd);
116 if (ioctl(fd, SIOCGIFFLAGS, (char *)&ifr, sizeof(ifr)) < 0) {
122 (void)close(fd);
137 if (ioctl(fd, SIOCGIFADDR, (char *)&ifr, sizeof(ifr)) < 0) {
140 (void)close(fd);
147 (void)close(fd);
[all...]
/haiku/headers/posix/
H A Dfcntl.h15 #define F_DUPFD 0x0001 /* duplicate fd */
16 #define F_GETFD 0x0002 /* get fd flags */
17 #define F_SETFD 0x0004 /* set fd flags */
23 #define F_DUPFD_CLOEXEC 0x0200 /* duplicate fd with close on exec set */
97 extern int openat(int fd, const char *path, int openMode, ...);
99 extern int fcntl(int fd, int op, ...);
101 extern int posix_fadvise(int fd, off_t offset, off_t len, int advice);
102 extern int posix_fallocate(int fd, off_t offset, off_t len);
/haiku/src/add-ons/accelerants/intel_extreme/
H A Daccelerant.cpp61 int fd = open(filename, O_CREAT | O_WRONLY, 0644); local
63 if (fd >= 0) {
70 write(fd, &data, sizeof(data));
72 close(fd);
564 int fd = open(path, B_READ_WRITE); local
565 if (fd < 0)
568 status_t status = init_common(fd, true);
584 close(fd);
/haiku/src/add-ons/accelerants/virtio/
H A Daccelerant_protos.h19 status_t virtio_gpu_init_accelerant(int fd);
H A Daccelerant.cpp138 int fd = open(path, B_READ_WRITE); local
139 if (fd < 0)
142 status_t status = init_common(fd, true);
158 close(fd);
/haiku/src/system/kernel/events/
H A Devent_queue.cpp13 #include <fs/fd.h>
567 get_queue_descriptor(int fd, bool kernel, file_descriptor*& descriptor) argument
569 if (fd < 0)
572 descriptor = get_fd(get_current_io_context(kernel), fd);
585 #define GET_QUEUE_FD_OR_RETURN(fd, kernel, descriptor) \
587 status_t getError = get_queue_descriptor(fd, kernel, descriptor); \
632 int fd = new_fd(context, descriptor); local
633 if (fd < 0) {
635 return fd;
639 fd_set_close_on_exec(context, fd, (openFlag
[all...]
/haiku/headers/private/shared/
H A DAutoDeleterDrivers.h14 #include <fs/fd.h>
/haiku/src/add-ons/kernel/network/devices/ethernet/
H A Dethernet.cpp40 int fd; member in struct:ethernet_device
63 if (ioctl(device->fd, ETHER_GET_LINK_STATE, &state,
166 device->fd = -1;
191 device->fd = open(device->name, O_RDWR);
192 if (device->fd < 0)
196 if (ioctl(device->fd, ETHER_INIT, &dummy, sizeof(dummy)) < 0)
199 if (ioctl(device->fd, ETHER_GETADDR, device->address.data, ETHER_ADDRESS_LENGTH) < 0)
202 if (ioctl(device->fd, ETHER_GETFRAMESIZE, &device->frame_size, sizeof(uint32)) < 0) {
212 ioctl(device->fd, ETHER_SET_LINK_STATE_SEM, &sLinkChangeSemaphore,
246 close(device->fd);
[all...]
/haiku/src/add-ons/kernel/network/devices/dialup/
H A Ddialup.cpp46 int fd; member in struct:dialup_device
79 ssize_t size = write(device->fd, device->escape_string,
103 ssize_t size = write(device->fd, "ATO", 3);
123 ssize_t bytesWritten = write(device->fd, command, strlen(command));
127 if (write(device->fd, "\r", 1) != 1)
144 ssize_t bytesRead = read(device->fd, &reply[i], 1);
221 device->fd = -1;
262 device->fd = open(device->name, O_RDWR);
263 if (device->fd < 0)
269 if (ioctl(device->fd, TCGET
[all...]

Completed in 244 milliseconds

1234567891011>>