Searched refs:fd (Results 251 - 275 of 571) sorted by relevance

<<11121314151617181920>>

/haiku/src/system/kernel/fs/
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/bin/fwcontrol/
H A Dfwmpegts.c169 int fd, k, len, m, pkt_size, startwr, tlen; local
175 fd = STDOUT_FILENO;
177 fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0660);
178 if (fd == -1)
264 write(fd, pld->payload,
280 if (fd != STDOUT_FILENO)
281 close(fd);
/haiku/src/system/libnetwork/netresolv/isc/
H A Dev_streams.c51 static void writable(evContext opaqueCtx, void *uap, int fd, int evmask);
52 static void readable(evContext opaqueCtx, void *uap, int fd, int evmask);
67 evWrite(evContext opaqueCtx, int fd, const struct iovec *iov, int iocnt, argument
77 new->fd = fd;
79 if (evSelectFD(opaqueCtx, fd, EV_WRITE, writable, new, &new->file) < 0)
101 evRead(evContext opaqueCtx, int fd, const struct iovec *iov, int iocnt, argument
111 new->fd = fd;
113 if (evSelectFD(opaqueCtx, fd, EV_REA
270 writable(evContext opaqueCtx, void *uap, int fd, int evmask) argument
293 readable(evContext opaqueCtx, void *uap, int fd, int evmask) argument
[all...]
/haiku/src/system/boot/loader/
H A Delf.cpp52 static status_t Create(int fd, preloaded_image** _image);
53 static status_t Load(int fd, preloaded_image* image);
59 static status_t _LoadSymbolTable(int fd, ImageType* image);
177 ELFLoader<Class>::Create(int fd, preloaded_image** _image) argument
183 ssize_t length = read_pos(fd, 0, &image->elf_header, sizeof(EhdrType));
209 ELFLoader<Class>::Load(int fd, preloaded_image* _image) argument
227 length = read_pos(fd, elfHeader.e_phoff, programHeaders, size);
357 length = read_pos(fd, header.p_offset,
384 _LoadSymbolTable(fd, image);
480 ELFLoader<Class>::_LoadSymbolTable(int fd, ImageTyp argument
665 elf_load_image(int fd, preloaded_image** _image) argument
701 int fd = open_from(directory, path, O_RDONLY); local
[all...]
/haiku/src/tests/kits/storage/virtualdrive/
H A Dvirtualdrive.cpp73 int fd; member in struct:device_info
160 info.fd = -1;
185 int fd = open(initInfo->file_name, (readOnly ? O_RDONLY : O_RDWR)); local
186 if (fd < 0)
194 if (fstat(fd, &st) == 0)
212 if (ftruncate(fd, size) != 0)
254 fsync(fd);
258 if (ioctl(fd, 10000) != 0) {
267 info.fd = fd;
[all...]
/haiku/src/tools/fs_shell/
H A Dfuse.cpp18 #include "fd.h"
208 int fd = _kern_open(-1, path, local
210 if (fd >= FSSH_B_OK)
211 return _ERR(_kern_close(fd));
212 return _ERR(fd);
298 int fd = _kern_open(-1, path, fi->flags, local
300 _kern_close(fd);
301 if (fd < FSSH_B_OK)
302 return _ERR(fd);
313 int fd local
331 int fd = _kern_open(-1, path, FSSH_O_WRONLY, local
[all...]
/haiku/src/tools/
H A Delf2aout.c44 int elf2aout32(void *v, int fd);
45 int elf2aout64(void *v, int fd);
165 elf2aout32(void *v, int fd) argument
207 if (write(fd, &a, sizeof(a)) != sizeof(a) ||
208 write(fd, (char *)e + offset, filesz) != (ssize_t)filesz)
220 elf2aout64(void *v, int fd) argument
262 if (write(fd, &a, sizeof(a)) != sizeof(a) ||
263 write(fd, (char *)e + offset, filesz) != (ssize_t)filesz)
285 int fd; local
288 fd
[all...]
/haiku/src/add-ons/kernel/partitioning_systems/intel/
H A Dintel.cpp100 pm_identify_partition(int fd, partition_data* partition, void** cookie) argument
103 if (fd < 0 || !partition || !cookie)
107 "%" B_PRId64 ", %" B_PRId32 ")\n", fd, partition->id, partition->offset,
121 PartitionMapParser parser(fd, 0, partition->size, partition->block_size);
165 pm_scan_partition(int fd, partition_data* partition, void* cookie) argument
168 if (fd < 0 || !partition || !cookie)
172 "%" B_PRId64 ", %" B_PRId32 ")\n", fd, partition->id, partition->offset,
288 ep_identify_partition(int fd, partition_data* partition, void** cookie) argument
291 if (fd < 0 || !partition || !cookie || !partition->cookie)
295 "%" B_PRId32 ")\n", fd, partitio
317 ep_scan_partition(int fd, partition_data* partition, void* cookie) argument
[all...]
/haiku/src/tests/add-ons/kernel/file_systems/random_file_actions/
H A Drandom_file_actions.cpp309 write_blocks(int fd, struct entry& entry, bool append = false) argument
317 if (fstat(fd, &stat) != 0)
339 ssize_t bytesWritten = write(fd, block + blockOffset, toWrite);
392 int fd = open_file(file.name, O_RDONLY); local
393 if (fd < 0) {
401 if (fstat(fd, &stat) != 0)
407 close(fd);
423 ssize_t bytesRead = read(fd, block, toRead);
445 close(fd);
562 int fd local
636 int fd = open_file(file.name, O_WRONLY | O_APPEND); local
660 int fd = open_file(file.name, O_CREAT | O_WRONLY | O_TRUNC); local
686 int fd = open_file(file.name, O_WRONLY | O_TRUNC); local
[all...]
/haiku/src/tests/kits/interface/bshelf/
H A DShelfTest.cpp108 int fd; local
109 fd = open(path.Path(), O_RDWR);
110 if (fd < 0)
111 fd = creat(path.Path(), 0777);
112 if (fd > 0)
113 close(fd);
/haiku/src/bin/package/
H A Dcommand_extract.cpp342 void SetBaseDirectory(int fd) argument
344 fBaseDirectory = fd;
492 int fd = -1; local
501 fd = openat(parentFD, entryName, O_RDWR | O_CREAT | O_EXCL,
506 if (fd < 0) {
514 fd);
551 if (fd < 0 && (!implicit || S_ISDIR(entry->Mode()))) {
552 fd = openat(parentFD, entryName, O_RDONLY | O_NOTRAVERSE);
553 if (fd < 0) {
559 token->fd
586 int fd = fs_fopen_attr(entryFD, attribute->Name(), attribute->Type(), local
650 int fd; member in struct:PackageContentExtractHandler::Token
708 _ExtractFileData( typename VersionPolicy::HeapReaderBase* dataReader, const typename VersionPolicy::PackageData& data, int fd) argument
[all...]
/haiku/src/add-ons/kernel/file_systems/packagefs/nodes/
H A DUnpackingAttributeCookie.cpp134 int fd = package->Open(); local
135 if (fd < 0)
136 RETURN_ERROR(fd);
174 int fd = packageNode->GetPackage()->Open(); local
175 if (fd < 0) {
177 return 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/tests/kits/media/media_decoder/
H A Dmedia_decoder.cpp64 FileDecoder * fd = new FileDecoder(track,&format); local
65 // fd->SetInputFormat(&format);
68 fd->SetOutputFormat(&format);
78 while (fd->Decode((void*)buffer,&size,&mh,0) == B_OK) {
/haiku/src/tests/kits/media/playsound/
H A Dplaysound.cpp99 int fd = open(file, O_RDONLY); local
100 if (fd < 0) {
104 close(fd);
/haiku/src/kits/storage/
H A DMime.cpp113 int fd = open(device, O_RDONLY); local
114 if (fd < 0)
121 if (ioctl(fd, B_GET_ICON, &iconData, sizeof(device_icon)) != 0) {
123 close(fd);
157 close(fd);
226 int fd = open(device, O_RDONLY); local
227 if (fd < 0)
233 if (ioctl(fd, B_GET_ICON_NAME, name, sizeof(name)) >= 0) {
236 close(fd);
251 status_t status = ioctl(fd, B_GET_VECTOR_ICO
[all...]
/haiku/src/tests/kits/net/service/
H A DFileTest.cpp53 int fd = mkstemp(tmpl); local
54 CHK(fd != -1);
55 close(fd);
/haiku/src/add-ons/kernel/drivers/ports/usb_serial/
H A DTracing.cpp96 int fd = open(sLogFilePath, O_WRONLY | O_APPEND); local
97 write(fd, buffer, strlen(buffer));
98 close(fd);
/haiku/src/add-ons/kernel/drivers/ports/pc_serial/
H A DTracing.cpp93 int fd = open(sLogFilePath, O_WRONLY | O_APPEND); local
94 write(fd, buffer, strlen(buffer));
95 close(fd);
/haiku/src/add-ons/kernel/file_systems/packagefs/package/
H A DPackageNode.cpp58 int fd = package->Open(); local
59 if (fd < 0)
60 RETURN_ERROR(fd);
/haiku/src/tests/kits/storage/
H A DBasicTest.cpp18 int fd; local
19 while ((fd = dup(1)) != -1)
20 fds.insert(fd);
/haiku/headers/cpp/
H A DSFile.h42 SFile(int fd, int size);
/haiku/src/add-ons/accelerants/neomagic/
H A DInitAccelerant.c27 fd = the_fd;
31 result = ioctl(fd, NM_GET_PRIVATE_DATA, &gpd, sizeof(gpd));
268 ioctl(fd, NM_DEVICE_NAME, &dn, sizeof(dn));
285 fd = open(path, B_READ_WRITE);
286 if (fd < 0)
298 result = fd;
306 result = init_common(fd);
339 close(fd);
369 if (accelerantIsClone) close(fd);
/haiku/src/system/libroot/posix/glibc/libio/
H A Diofdopen.c40 _IO_new_fdopen (int fd, const char *mode) argument
93 fd_flags = fcntl(fd, F_GETFL);
126 if (fcntl(fd, F_SETFL, fd_flags | O_APPEND) == -1)
156 if (INTUSE(_IO_file_attach) ((_IO_FILE *) &new_f->fp, fd) == NULL)
/haiku/src/tests/add-ons/kernel/file_systems/fragmenter/
H A Dfragmenter.cpp47 int fd = open(name, O_CREAT | O_WRONLY | O_TRUNC, 0644); local
48 if (fd < 0) {
54 if (write(fd, buffer, size) < (ssize_t)size) {
60 close(fd);

Completed in 159 milliseconds

<<11121314151617181920>>