/haiku/src/tools/fs_shell/ |
H A D | command_cp.cpp | 158 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/headers/private/kernel/ |
H A D | vfs.h | 47 /** The I/O context of a process/team, holds the fd array among others */ 83 status_t vfs_get_vnode_from_fd(int fd, bool kernel, struct vnode **_vnode); 99 status_t vfs_get_cookie_from_fd(int fd, void **_cookie); 136 status_t vfs_read_stat(int fd, const char *path, bool traverseLeafLink, 180 int _user_open(int fd, const char *path, int openMode, int perms); 184 int _user_open_dir(int fd, const char *path); 185 int _user_open_parent_dir(int fd, char *name, size_t nameLength); 186 status_t _user_fcntl(int fd, int op, size_t argument); 187 status_t _user_fsync(int fd); 188 status_t _user_flock(int fd, in [all...] |
/haiku/src/libs/stdc++/legacy/ |
H A D | filebuf.cc | 57 filebuf::filebuf(int fd) argument 60 _IO_file_attach(this, fd); 63 filebuf::filebuf(int fd, char* p, int len) argument 66 _IO_file_attach(this, fd); 126 int fd = ::open(filename, posix_mode, prot); 127 if (fd < 0) 129 _fileno = fd; 149 filebuf* filebuf::attach(int fd) argument 151 return (filebuf*)_IO_file_attach(this, fd);
|
H A D | SFile.cc | 53 SFile::SFile(int fd, int size) argument 54 : fstream(fd)
|
/haiku/headers/posix/sys/ |
H A D | stat.h | 113 extern int fchmod(int fd, mode_t mode); 114 extern int fchmodat(int fd, const char *path, mode_t mode, int flag); 116 extern int fstat(int fd, struct stat *st); 118 extern int fstatat(int fd, const char *path, struct stat *st, int flag); 120 extern int mkdirat(int fd, const char *path, mode_t mode); 122 extern int mkfifoat(int fd, const char *path, mode_t mode); 124 extern int mknodat(int fd, const char *name, mode_t mode, dev_t dev); 127 extern int utimensat(int fd, const char *path, 129 extern int futimens(int fd, const struct timespec times[2]);
|
/haiku/src/system/boot/loader/ |
H A D | load_driver_settings.cpp | 28 int fd = open_from(directory, name, O_RDONLY); local 29 if (fd < 0) 30 return fd; 33 if (fstat(fd, &stat) < 0) 40 if (read(fd, buffer, stat.st_size) != stat.st_size) { 89 int fd = open_from(volume, "home/config/settings/kernel/drivers", O_RDONLY); local 90 if (fd < B_OK) 91 return fd; 93 Directory* settings = (Directory*)get_node_from(fd);
|
H A D | vfs.cpp | 271 int fd = open_from(this, linkPath, O_RDONLY); local 272 if (fd < 0) { 278 node = get_node_from(fd); 282 close(fd); 850 get_descriptor(int fd) argument 852 if (fd < 0 || fd >= MAX_VFS_DESCRIPTORS) 855 return sDescriptors[fd]; 860 free_descriptor(int fd) argument 862 if (fd > 882 int fd = 0; local 912 dup(int fd) argument 924 lseek(int fd, off_t offset, int whence) argument 939 ftruncate(int fd, off_t newSize) argument 947 read_pos(int fd, off_t offset, void *buffer, size_t bufferSize) argument 958 pread(int fd, void* buffer, size_t bufferSize, off_t offset) argument 965 read(int fd, void *buffer, size_t bufferSize) argument 976 write_pos(int fd, off_t offset, const void *buffer, size_t bufferSize) argument 987 pwrite(int fd, const void* buffer, size_t bufferSize, off_t offset) argument 994 write(int fd, const void *buffer, size_t bufferSize) argument 1005 writev(int fd, const struct iovec* vecs, int count) argument 1116 int fd = open_node(node, mode); local 1130 get_node_from(int fd) argument 1162 close(int fd) argument 1179 _fstat(int fd, struct stat *stat, size_t ) argument [all...] |
/haiku/src/apps/bootmanager/ |
H A D | LegacyBootMenu.cpp | 382 int fd = open(drive.Path(), O_RDWR); local 383 if (fd < 0) 387 if (read(fd, &oldMBR, sizeof(oldMBR)) != sizeof(oldMBR)) { 388 close(fd); 393 close(fd); 400 close(fd); 451 close(fd); 455 lseek(fd, 0, SEEK_SET); 457 status_t status = _WriteBlocks(fd, buffer, newBootLoader.Position()); 458 close(fd); 471 int fd = open(path.String(), O_RDONLY); local 511 int fd = open(path.String(), O_RDWR); local 613 int fd = open(device, O_RDONLY); local 624 _ReadBlocks(int fd, uint8* buffer, size_t size) argument 642 _WriteBlocks(int fd, const uint8* buffer, size_t size) argument [all...] |
/haiku/src/system/libnetwork/netresolv/isc/ |
H A D | eventlib_p.h | 81 int fd; member in struct:evConn 85 #define EV_CONN_BLOCK 0x0004 /*%< Listener fd was blocking. */ 92 int fd; member in struct:evAccept 117 int fd; member in struct:evFile 133 int fd; member in struct:evStream 193 extern short *__fd_eventfield(int fd, __evEmulMask *maskp); 195 extern void __fd_clr(int fd, __evEmulMask *maskp); 196 extern void __fd_set(int fd, __evEmulMask *maskp); 202 #define FD_SET(fd, maskp) \ 203 __fd_set(fd, mask [all...] |
/haiku/src/tests/system/network/multicast/ |
H A D | multicat.c | 212 int fd; local 228 if ((fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0) 230 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0) 232 if (bind(fd, ai->ai_addr, ai->ai_addrlen) == 0) 234 close(fd); 237 if (connect(fd, ai->ai_addr, ai->ai_addrlen) < 0) 268 if (setsockopt(fd, level, MCAST_JOIN_SOURCE_GROUP, &gsr, 275 if (setsockopt(fd, level, MCAST_JOIN_GROUP, &gr, sizeof(gr)) < 0) 292 if ((fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP)) < 0) 295 if (setsockopt(fd, SOL_SOCKE 327 int fd; local [all...] |
/haiku/src/system/runtime_loader/ |
H A D | runtime_loader.cpp | 272 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...] |
/haiku/src/kits/support/ |
H A D | Uuid.cpp | 122 int fd = open("/dev/urandom", O_RDONLY); local 123 if (fd < 0) { 124 fd = open("/dev/random", O_RDONLY); 125 if (fd < 0) 130 ssize_t bytesRead = read(fd, fValue, sizeof(fValue)); 131 close(fd);
|
/haiku/src/system/libroot/posix/stdlib/ |
H A D | mktemp.c | 57 int fd; local 58 return _gettemp(path, &fd, 0, slen) ? fd : -1; 65 int fd; local 66 if (_gettemp(path, &fd, 0, 0)) 67 return fd;
|
/haiku/src/add-ons/kernel/partitioning_systems/session/ |
H A D | session.cpp | 40 identify_partition(int fd, partition_data *partition, void **cookie) argument 42 DEBUG_INIT_ETC(NULL, ("fd: %d, id: %" B_PRId32 ", offset: %" B_PRIdOFF ", " 44 fd, partition->id, partition->offset, partition->size, 51 && ioctl(fd, B_GET_GEOMETRY, &geometry, sizeof(geometry)) == 0 53 Disc *disc = new(std::nothrow) Disc(fd); 71 scan_partition(int fd, partition_data *partition, void *cookie) argument 73 DEBUG_INIT_ETC(NULL, ("fd: %d, id: %" B_PRId32 ", offset: %" B_PRId64 ", " 74 "size: %" B_PRIdOFF ", block_size: %" B_PRId32 ", cookie: %p", fd,
|
/haiku/src/tools/fixup_next_boot_floppy/ |
H A D | fixup_next_boot_floppy.c | 43 int fd; local 103 fd = open(argv[1], O_RDWR); 104 if (fd < 0) { 110 if (read(fd, bootblock, DL_SIZE) < DL_SIZE) { 126 lseek(fd, labelOffsets[i] * 0x200LL, SEEK_SET); 127 write(fd, &disklabel, DL_SIZE);
|
/haiku/src/tests/kits/interface/bshelf/Container/ |
H A D | ContainerApplication.cpp | 75 int fd; local 76 fd = open(path.Path(), O_RDWR); 77 if (fd < 0) fd = creat(path.Path(), 0777); 78 if (fd > 0) close(fd);
|
/haiku/src/servers/midi/ |
H A D | DeviceWatcher.cpp | 44 DeviceEndpoints(int fd, MidiPortConsumer* consumer, MidiPortProducer* producer) argument 45 : fFD(fd), fConsumer(consumer), fProducer(producer) 228 int fd = open(path, O_RDWR | O_EXCL); local 229 if (fd < 0) { 234 fd = open(path, O_RDONLY | O_EXCL); 235 if (fd < 0 && errno == EACCES) 236 fd = open(path, O_WRONLY | O_EXCL); 237 if (fd < 0) 241 TRACE(("Doing _AddDevice(\"%s\"); fd=%d\n", path, fd)); [all...] |
/haiku/src/system/libroot/posix/glibc/include/ |
H A D | fcntl.h | 13 extern int __libc_fcntl (int fd, int cmd, ...);
|
/haiku/src/system/libroot/posix/sys/ |
H A D | stat.c | 21 int _fstat_current(int fd, struct stat* stat); 24 int _fstat_beos(int fd, struct stat_beos* beosStat); 38 _fstat_current(int fd, struct stat* stat) argument 40 int status = _kern_read_stat(fd, NULL, false, stat, sizeof(struct stat)); 56 fstatat(int fd, const char *path, struct stat *st, int flag) argument 58 int status = _kern_read_stat(fd, path, (flag & AT_SYMLINK_NOFOLLOW) == 0, 132 _fstat_beos(int fd, struct stat_beos* beosStat) argument 135 if (_fstat_current(fd, &stat) != 0)
|
H A D | statvfs.c | 48 fstatvfs(int fd, struct statvfs *statvfs) argument 51 if (fstat(fd, &stat) < 0)
|
/haiku/src/system/libroot/posix/unistd/ |
H A D | directory.c | 24 fchdir(int fd) argument 26 RETURN_AND_SET_ERRNO(_kern_setcwd(fd, NULL));
|
/haiku/src/kits/package/hpkg/v1/ |
H A D | PackageReaderV1.cpp | 46 BPackageReader::Init(int fd, bool keepFD) argument 51 return fImpl->Init(fd, keepFD);
|
/haiku/headers/private/storage/ |
H A D | FdIO.h | 15 BFdIO(int fd, bool keepFd); 18 void SetTo(int fd, bool keepFd);
|
/haiku/headers/private/file_systems/ |
H A D | DeviceOpener.h | 20 DeviceOpener(int fd, int mode); 25 int Open(int fd, int mode);
|
/haiku/src/add-ons/kernel/partitioning_systems/amiga/ |
H A D | amiga_rdb.cpp | 78 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))
|