Searched refs:fd (Results 301 - 325 of 571) sorted by relevance

<<11121314151617181920>>

/haiku/src/kits/package/hpkg/
H A DPackageReader.cpp46 BPackageReader::Init(int fd, bool keepFD, uint32 flags) argument
51 return fImpl->Init(fd, keepFD, flags);
H A DRepositoryReaderImpl.cpp187 int fd = open(fileName, O_RDONLY); local
188 if (fd < 0) {
195 return Init(fd, true);
200 RepositoryReaderImpl::Init(int fd, bool keepFD) argument
202 BFdIO* file = new(std::nothrow) BFdIO(fd, keepFD);
204 if (keepFD && fd >= 0)
205 close(fd);
/haiku/src/system/runtime_loader/
H A Dimages.h53 status_t map_image(int fd, char const* path, image_t* image, bool fixed);
57 void register_image(image_t* image, int fd, const char* path);
/haiku/src/add-ons/kernel/partitioning_systems/gpt/
H A Dgpt.cpp78 efi_gpt_identify_partition(int fd, partition_data* partition, void** _cookie) argument
80 EFI::Header* header = new (std::nothrow) EFI::Header(fd,
103 efi_gpt_scan_partition(int fd, partition_data* partition, void* _cookie) argument
455 efi_gpt_repair(int fd, partition_id partition, bool checkOnly, disk_job_id job) argument
463 efi_gpt_resize(int fd, partition_id partitionID, off_t size, disk_job_id job) argument
465 if (fd < 0)
492 efi_gpt_resize_child(int fd, partition_id partitionID, off_t size, argument
495 if (fd < 0)
530 status_t result = header->WriteEntry(fd, entryIndex);
545 efi_gpt_move(int fd, partition_i argument
553 efi_gpt_move_child(int fd, partition_id partitionID, partition_id childID, off_t offset, disk_job_id job) argument
614 efi_gpt_set_name(int fd, partition_id partitionID, const char* name, disk_job_id job) argument
660 efi_gpt_set_type(int fd, partition_id partitionID, const char* type, disk_job_id job) argument
708 efi_gpt_initialize(int fd, partition_id partitionID, const char* name, const char* parameters, off_t partitionSize, disk_job_id job) argument
741 efi_gpt_uninitialize(int fd, partition_id partitionID, off_t partitionSize, uint32 blockSize, disk_job_id job) argument
780 efi_gpt_create_child(int fd, partition_id partitionID, off_t offset, off_t size, const char* type, const char* name, const char* parameters, disk_job_id job, partition_id* childID) argument
854 efi_gpt_delete_child(int fd, partition_id partitionID, partition_id childID, disk_job_id job) argument
[all...]
/haiku/src/add-ons/accelerants/matrox/
H A DInitAccelerant.c28 fd = the_fd;
32 result = ioctl(fd, GX00_GET_PRIVATE_DATA, &gpd, sizeof(gpd));
242 result = ioctl(fd, GX00_DEVICE_NAME, &dn, sizeof(dn));
258 fd = open(path, B_READ_WRITE);
259 if (fd < 0)
279 result = init_common(fd);
312 close(fd);
342 if (accelerantIsClone) close(fd);
/haiku/src/libs/gnu/
H A Dxattr.cpp298 fgetxattr(int fd, const char* attribute, void* buffer, size_t size) argument
300 return Node(fd).Get(attribute, buffer, size);
321 fsetxattr(int fd, const char* attribute, const void* buffer, size_t size, argument
324 return Node(fd).Set(attribute, flags, buffer, size);
343 fremovexattr (int fd, const char* attribute) argument
345 return Node(fd).Remove(attribute);
364 flistxattr(int fd, char* buffer, size_t size) argument
366 return Node(fd).GetList(buffer, size);
/haiku/headers/private/userlandfs/fuse/
H A Dfuse_compat.h53 struct fuse *fuse_new_compat25(int fd, struct fuse_args *args,
64 int *multithreaded, int *fd);
66 void fuse_teardown_compat22(struct fuse *fuse, int fd, char *mountpoint);
108 struct fuse *fuse_new_compat22(int fd, const char *opts,
115 int *multithreaded, int *fd);
154 struct fuse *fuse_new_compat2(int fd, const char *opts,
159 char **mountpoint, int *multithreaded, int *fd);
195 struct fuse *fuse_new_compat1(int fd, int flags,
/haiku/headers/posix/
H A Dtermios.h229 extern int tcgetattr(int fd, struct termios *termios);
230 extern int tcsetattr(int fd, int option, const struct termios *termios);
231 extern int tcsendbreak(int fd, int duration);
232 extern int tcdrain(int fd);
233 extern int tcflow(int fd, int action);
234 extern int tcflush(int fd, int queueSelector);
235 extern pid_t tcgetsid(int fd);
236 extern int tcsetsid(int fd, pid_t pid);
/haiku/src/add-ons/kernel/file_systems/ufs2/
H A DVolume.cpp63 Volume::Identify(int fd, ufs2_super_block *superBlock) argument
65 if (read_pos(fd, SBLOCK_UFS2, superBlock,
/haiku/src/bin/fwcontrol/
H A Dfwdv.c114 int len, tlen, npad, fd, k, m, vec, system = -1, nb; local
119 fd = STDOUT_FILENO;
121 fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0660);
122 if (fd == -1)
233 writev(fd, wbuf, vec);
248 writev(fd, wbuf, vec);
257 writev(fd, wbuf, vec);
259 if (fd != STDOUT_FILENO)
260 close(fd);
272 int len, tlen, header, fd, frame local
[all...]
/haiku/src/system/kernel/device_manager/
H A DFileDevice.cpp61 int fd; member in struct:FileDevice::Cookie
63 Cookie(int fd) argument
65 fd(fd)
71 if (fd >= 0)
72 close(fd);
178 int fd = vfs_open_vnode(vnode, openMode, true); local
179 if (fd < 0) {
181 return fd;
185 Cookie* cookie = new(std::nothrow) Cookie(fd);
[all...]
/haiku/src/add-ons/kernel/debugger/hangman/
H A Dhangman.c119 int fd; local
125 fd = open(from, O_RDONLY);
126 if (fd < B_OK)
127 return fd;
129 if (fstat(fd, &st)) {
130 close(fd);
134 // sz = (size_t)lseek(fd, 0, SEEK_END);
140 // lseek(fd, 0, SEEK_SET);
146 lseek(fd, offset, SEEK_SET);
147 got = read(fd, bigbuffe
546 int fd; local
[all...]
/haiku/src/add-ons/kernel/file_systems/netfs/server/
H A DFDManager.cpp159 FDManager::Open(const char* path, uint32 openMode, mode_t mode, int& fd) argument
162 fd = open(path, openMode, mode);
163 if (fd < 0)
170 fd = open(path, openMode, mode);
171 if (fd < 0)
/haiku/src/add-ons/kernel/drivers/disk/nvme/libnvme/
H A Dnvme_common.c151 ssize_t nvme_dev_get_blocklen(int fd) argument
155 if (ioctl(fd, BLKSSZGET, &blocklen) < 0) {
169 uint64_t nvme_file_get_size(int fd) argument
173 if (fstat(fd, &st) != 0)
182 if (ioctl(fd, BLKGETSIZE64, &size) == 0)
/haiku/src/add-ons/kernel/file_systems/packagefs/package/
H A DPackageFile.cpp75 status_t Init(dev_t deviceID, ino_t nodeID, int fd) argument
157 int fd = package->Open(); local
158 if (fd < 0)
159 RETURN_ERROR(fd);
167 error = fDataAccessor->Init(deviceID, nodeID, fd);
/haiku/src/apps/login/
H A DLoginApp.cpp199 int32 fd = -1; local
207 fd = open(pty, O_RDWR|O_NOCTTY);
208 if (fd >= 0)
210 return fd;
215 return fd;
/haiku/src/system/libroot/posix/crypt/
H A Dcrypt.cpp108 int fd = open("/dev/random", O_RDONLY, 0); local
109 if (fd < 0)
113 const ssize_t bytesRead = read(fd,
117 close(fd);
123 close(fd);
/haiku/src/add-ons/kernel/partitioning_systems/intel/
H A Dwrite_support.cpp923 pm_resize(int fd, partition_id partitionID, off_t size, disk_job_id job) argument
927 if (fd < 0)
961 pm_resize_child(int fd, partition_id partitionID, off_t size, disk_job_id job) argument
965 if (fd < 0)
995 PartitionMapWriter writer(fd, primary->BlockSize());
1015 pm_move(int fd, partition_id partitionID, off_t offset, disk_job_id job) argument
1019 if (fd < 0)
1067 move_block(int fd, off_t fromOffset, off_t toOffset, uint8* buffer, int32 size) argument
1071 if (read_pos(fd, fromOffset, buffer, size) != size) {
1080 if (write_pos(fd, toOffse
1093 move_partition(int fd, off_t fromOffset, off_t toOffset, off_t size, uint8* buffer, int32 buffer_size, disk_job_id job) argument
1119 pm_move_child(int fd, partition_id partitionID, partition_id childID, off_t offset, disk_job_id job) argument
1189 pm_set_type(int fd, partition_id partitionID, const char* type, disk_job_id job) argument
1254 pm_set_parameters(int fd, partition_id partitionID, const char* parameters, disk_job_id job) argument
1328 pm_initialize(int fd, partition_id partitionID, const char* name, const char* parameters, off_t partitionSize, disk_job_id job) argument
1370 pm_uninitialize(int fd, partition_id partitionID, off_t partitionSize, uint32 blockSize, disk_job_id job) argument
1399 pm_create_child(int fd, partition_id partitionID, off_t offset, off_t size, const char* type, const char* name, const char* parameters, disk_job_id job, partition_id* childID) argument
1510 pm_delete_child(int fd, partition_id partitionID, partition_id childID, disk_job_id job) argument
1862 ep_resize(int fd, partition_id partitionID, off_t size, disk_job_id job) argument
1900 ep_resize_child(int fd, partition_id partitionID, off_t size, disk_job_id job) argument
1959 ep_move(int fd, partition_id partitionID, off_t offset, disk_job_id job) argument
1987 ep_move_child(int fd, partition_id partitionID, partition_id childID, off_t offset, disk_job_id job) argument
2070 ep_set_type(int fd, partition_id partitionID, const char* type, disk_job_id job) argument
2133 ep_initialize(int fd, partition_id partitionID, const char* name, const char* parameters, off_t partitionSize, disk_job_id job) argument
2192 ep_create_child(int fd, partition_id partitionID, off_t offset, off_t size, const char* type, const char* name, const char* parameters, disk_job_id job, partition_id* childID) argument
2310 ep_delete_child(int fd, partition_id partitionID, partition_id childID, disk_job_id job) argument
[all...]
/haiku/src/add-ons/kernel/partitioning_systems/vmdk/
H A Dvmdk.cpp114 read_file(int fd, off_t offset, void* buffer, size_t size) argument
116 ssize_t bytesRead = pread(fd, buffer, size, offset);
185 parse_vmdk_header(int fd, off_t fileSize, VmdkCookie*& _cookie) argument
189 status_t error = read_file(fd, 0, &header, sizeof(header));
233 error = read_file(fd, descriptorOffset, descriptor, descriptorSize);
360 vmdk_identify_partition(int fd, partition_data* partition, void** _cookie) argument
362 TRACE("vmdk_identify_partition(%d, %ld: %lld, %lld, %ld)\n", fd,
367 status_t error = parse_vmdk_header(fd, partition->size, cookie);
377 vmdk_scan_partition(int fd, partition_data* partition, void* _cookie) argument
379 TRACE("vmdk_scan_partition(%d, %ld: %lld, %lld, %ld)\n", fd,
[all...]
/haiku/src/tools/vmdkimage/
H A Dvmdkimage.cpp372 int fd = open(file, O_RDWR | O_CREAT, 0666); local
373 if (fd < 0) {
378 if (write(fd, &header, sizeof(header)) != sizeof(header))
381 if (write(fd, desc, sizeof(desc)) != sizeof(desc))
384 if ((uint64_t)lseek(fd, headerSize - 1, SEEK_SET) != headerSize - 1)
387 if (1 != write(fd, "", 1))
391 if ((clearImage && ftruncate(fd, headerSize) != 0)
392 || ftruncate(fd, actualImageSize + headerSize) != 0) {
399 close(fd);
405 close(fd);
[all...]
/haiku/src/system/libroot/posix/
H A Dspawn.cpp31 int fd; member in struct:_file_action
137 action->fd = fildes;
165 action->fd = fildes;
190 action->fd = newfildes;
217 action->fd = -1;
243 action->fd = fildes;
459 if (action->fd == *errfd) {
460 int newfd = dup(action->fd);
463 close(action->fd);
469 if (close(action->fd) !
472 int fd = open(action->action.open_action.path, local
[all...]
/haiku/src/add-ons/kernel/file_systems/fat/
H A Dmkdos.cpp92 dosfs_initialize(int fd, partition_id partitionID, const char* name, argument
96 fd, name, parameterString, partitionSize);
134 hasBiosGeometry = B_OK == ioctl(fd, B_GET_BIOS_GEOMETRY, &biosGeometry,
136 hasDeviceGeometry = B_OK == ioctl(fd, B_GET_GEOMETRY, &deviceGeometry,
138 hasPartitionInfo = B_OK == ioctl(fd, B_GET_PARTITION_INFO, &partitionInfo,
223 if (fstat(fd, &stat) < 0) {
325 if (B_OK != ioctl(fd, B_GET_BIOS_DRIVE_ID, &biosDriveId,
465 written = write_pos(fd, pos, zerobuffer, writesize);
479 written = write_pos(fd, BOOT_SECTOR_NUM * 512, bootsector, 512);
486 written = write_pos(fd, BACKUP_SECTOR_NU
633 dosfs_uninitialize(int fd, partition_id partitionID, off_t partitionSize, uint32 blockSize, disk_job_id job) argument
[all...]
/haiku/src/tests/add-ons/kernel/partitioning_systems/
H A DPartitioningSystemsTest.cpp43 create_disk_device(int fd, const char* path, partition_id* _id) argument
55 if (ioctl(fd, B_GET_GEOMETRY, &device->geometry) < 0) {
58 if (fstat(fd, &stat) < 0) {
141 scan_partition(int fd, partition_id partitionID) argument
153 float priority = moduleInfo->identify_partition(fd, data, &cookie);
159 moduleInfo->scan_partition(fd, data, cookie);
317 int fd = open(partition->path, O_RDONLY); local
318 if (fd < 0)
321 scan_partition(fd, partitionID);
/haiku/src/build/libbe/storage/
H A DNode.cpp440 int fd = _kern_dup(fFd); local
442 return (fd >= 0 ? fd : -1);
467 \param fd the file descriptor this BNode should be set to (may be -1).
473 BNode::set_fd(int fd) argument
478 fFd = fd;
522 In the first case, \a fd must not be \c NULL; the node it refers to will
523 be opened. If absolute, \a fd is ignored. If relative and \a fd is >= 0,
524 it will be reckoned off the directory identified by \a fd, otherwis
544 _SetTo(int fd, const char* path, bool traverse) argument
[all...]
/haiku/headers/private/userlandfs/legacy/
H A Dcache.h96 extern _IMPEXP_KERNEL int init_cache_for_device(int fd, off_t max_blocks);
115 extern _IMPEXP_KERNEL size_t read_phys_blocks (int fd, off_t bnum, void *data, uint num_blocks, int bsize);
116 extern _IMPEXP_KERNEL size_t write_phys_blocks(int fd, off_t bnum, void *data, uint num_blocks, int bsize);

Completed in 157 milliseconds

<<11121314151617181920>>