Searched refs:fd (Results 276 - 300 of 571) sorted by last modified time

<<11121314151617181920>>

/haiku/src/add-ons/kernel/file_systems/userlandfs/server/
H A Dkernel_emu.cpp855 UserlandFS::KernelEmu::do_iterative_fd_io(dev_t volumeID, int fd, argument
873 request->fd = 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/bin/consoled/
H A Dconsoled.cpp71 update_leds(int fd, uint32 modifiers) argument
82 ioctl(fd, KB_SET_LEDS, &lockIO, sizeof(lockIO));
264 int fd = open(path, O_RDONLY); local
265 if (fd >= 0) {
267 if (ioctl(fd, KB_SET_DEBUG_READER, NULL, 0) == 0) {
269 keyboard->device = fd;
274 close(fd);
285 close(fd);
/haiku/src/add-ons/kernel/partitioning_systems/session/
H A Dsession.cpp40 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,
H A DDisc.cpp245 DEBUG_INIT_ETC(NULL, ("fd: %d, buffer: %p, buffer_length: %d",
519 Disc::Disc(int fd) argument
524 DEBUG_INIT_ETC("Disc", ("fd: %d", fd));
541 error = read_table_of_contents(fd, 1, data, kBlockSize, false);
545 error = read_table_of_contents(fd, 1, data, kBlockSize, true);
/haiku/src/add-ons/kernel/file_systems/cdda/
H A Dcdda.cpp485 read_frames(int fd, off_t firstFrame, uint8 *buffer, size_t count) argument
509 if (ioctl(fd, B_SCSI_READ_CD, &read, sizeof(scsi_read_cd)) < 0) {
532 read_table_of_contents(int fd, uint32 track, uint8 format, uint8 *buffer, argument
562 if (ioctl(fd, B_RAW_DEVICE_COMMAND, &raw, sizeof(raw)) == 0
577 read_cdtext(int fd, struct cdtext &cdtext) argument
585 read_table_of_contents(fd, 1, SCSI_TOC_FORMAT_CD_TEXT, buffer,
587 if (read_table_of_contents(fd, 1, SCSI_TOC_FORMAT_CD_TEXT, buffer,
663 read_table_of_contents(int fd, scsi_toc_toc *toc, size_t length) argument
665 status_t status = read_table_of_contents(fd, 1, SCSI_TOC_FORMAT_TOC,
691 read_cdda_data(int fd, off_ argument
[all...]
/haiku/src/build/libroot/
H A Dfs_darwin.cpp20 static int get_path(int fd, const char* path, char fullPath[]);
25 get_path(int fd, const char* path, char fullPath[]) argument
28 if (fstat(fd, &dirst) < 0) {
34 // fd does not point to a directory
39 if (fcntl(fd, F_GETPATH, fullPath) < 0) {
40 // failed to get the path of fd, fcntl() sets errno
110 faccessat(int fd, const char* path, int accessMode, int flag) argument
118 if (fd == AT_FDCWD || (path != NULL && path[0] == '/')) {
119 // call access() ignoring fd
124 if (fd <
140 fchmodat(int fd, const char* path, mode_t mode, int flag) argument
184 fchownat(int fd, const char* path, uid_t owner, gid_t group, int flag) argument
214 fdopendir(int fd) argument
242 fstatat(int fd, const char *path, struct stat *st, int flag) argument
272 mkdirat(int fd, const char *path, mode_t mode) argument
294 mkfifoat(int fd, const char *path, mode_t mode) argument
316 mknodat(int fd, const char *path, mode_t mode, dev_t dev) argument
384 readlinkat(int fd, const char *path, char *buffer, size_t bufferSize) argument
406 symlinkat(const char *oldPath, int fd, const char *newPath) argument
429 unlinkat(int fd, const char *path, int flag) argument
515 futimesat(int fd, const char *path, const struct timeval times[2]) argument
[all...]
/haiku/src/tests/system/libroot/posix/
H A Dtermios.cpp28 int fd = open(argv[1], O_RDONLY); local
29 if (fd < 0) {
34 int err = tcdrain(fd);
38 close(fd);
41 err = tcflow(fd, TCION);
45 close(fd);
49 err = tcflush(fd, TCIOFLUSH);
53 close(fd);
57 close(fd);
H A Dchmod.cpp35 int fd = open(argv[1], O_RDONLY); local
36 if (fd < 0) {
41 if (fchmod(fd, 0666) == -1) {
44 close(fd);
47 close(fd);
H A Dtruncate.cpp52 int fd = open(argv[1], O_RDONLY); local
53 if (fd < 0) {
58 if (ftruncate(fd, newSize) == 0 || errno != EINVAL) {
61 close(fd);
64 close(fd);
/haiku/src/tests/system/network/
H A Dudp_connect.cpp28 int fd = socket(AF_INET, SOCK_DGRAM, 0); local
29 if (fd < 0)
37 if (bind(fd, (sockaddr*)&addr, sizeof(addr)) != 0)
42 if (getsockname(fd, &ours, &ourLength) != 0)
56 if (connect(fd, (sockaddr*)&peer, sizeof(peer)) != 0)
60 if (getsockname(fd, &ours, &ourLength) != 0)
71 ssize_t bytesReceived = recv(fd, buffer, sizeof(buffer), 0);
79 send(fd, argv[2], strlen(argv[2]), 0);
82 send(fd, buffer, strlen(buffer), 0);
86 close(fd);
[all...]
H A Dtcp_connection_test.cpp62 int fd = socket(AF_INET, SOCK_STREAM, 0); local
63 if (fd < 0) {
79 if (bind(fd, (sockaddr*)&clientAddr, sizeof(clientAddr)) < 0) {
87 if (connect(fd, (sockaddr*)&addr, addrLen) == 0) {
92 if (getsockname(fd, (sockaddr*)&clientAddr, &clientAddrLen)
94 && getpeername(fd, (sockaddr*)&serverAddr, &serverAddrLen)
113 if (fd >= 0) {
114 read(fd, buffer, sizeof(buffer));
115 close(fd);
118 // close(fd);
125 int fd = accept(listenerSocket, NULL, 0); local
[all...]
H A Dstop_stack.c10 int fd; local
15 fd = open("/dev/" NET_STACK_DRIVER_PATH, O_RDWR);
16 if (fd < 0)
17 err(fd, "can't open the stack driver");
19 rv = ioctl(fd, NET_STACK_STOP, NULL, 0);
22 rv = close(fd);
H A Dipv46_server.cpp16 void recvLoop(int fd) { argument
19 int ret = recv(fd, buffer, sizeof(buffer) - 1, 0);
84 int fd = socket(socketFamily, socketType, 0); local
85 if (fd < 0) {
90 if (bind(fd, (sockaddr *)&localAddress, localAddress.ss_family == AF_INET ?
99 recvLoop(fd);
103 if (listen(fd, 5) < 0) {
108 int clientfd = accept(fd, NULL, 0);
120 close(fd);
H A Dipv46_client.cpp55 int fd = socket(socketFamily1, socketType, 0); local
56 if (fd < 0) {
65 if (connect(fd, (sockaddr *) &saddr, socketFamily2 == AF_INET ?
68 close(fd);
74 int ret = send(fd, buffer, len, 0);
86 close(fd);
H A Dfirefox_crash.cpp21 int fd = socket(AF_INET, SOCK_STREAM, 0); local
22 if (fd < 0)
26 fcntl(fd, F_SETFL, O_NONBLOCK);
28 return fd;
/haiku/src/tests/system/network/multicast/
H A Dmulticat.c212 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...]
H A Dmultisend.c42 int fd, len, ch; local
72 fd = open_multicast_socket(argv[0], argv[1], source, ttl);
78 if (send(fd, buf, len, 0) < 0)
90 if (send(fd, buf, len, 0) < 0)
103 int fd; local
118 if ((fd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0)
120 if (connect(fd, ai->ai_addr, ai->ai_addrlen) == 0)
122 close(fd);
155 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0)
158 if (bind(fd, sa
[all...]
/haiku/src/tests/system/network/ipv6/
H A Dudp_server.cpp21 recvLoop(int fd) argument
29 int status = recvfrom(fd, buffer, sizeof(buffer) - 1, 0,
58 int fd = socket(socketFamily, SOCK_DGRAM, 0); local
59 if (fd < 0) {
78 if (bind(fd, (sockaddr *)&localAddress, socketFamily == AF_INET ?
85 recvLoop(fd);
H A Dtcp_udp_server.cpp28 recvLoop(int fd) argument
32 int status = recv(fd, buffer, sizeof(buffer) - 1, 0);
99 int fd = socket(socketFamily, socketType, 0); local
100 if (fd < 0) {
105 if (bind(fd, (sockaddr *)&localAddress, localAddress.ss_family == AF_INET ?
114 recvLoop(fd);
117 if (listen(fd, 5) < 0) {
122 int clientfd = accept(fd, NULL, 0);
134 close(fd);
H A Dudp_client.cpp31 int fd = socket(socketFamily, SOCK_DGRAM, 0); local
32 if (fd < 0) {
58 int status = sendto(fd, buffer, length, 0, (sockaddr *) &saddr,
70 close(fd);
H A Draw_server.cpp21 recvLoop(int fd) argument
29 int status = recvfrom(fd, buffer, sizeof(buffer) - 1, 0,
61 int fd = socket(socketFamily, SOCK_RAW, TEST_PROTOCOL); local
62 if (fd < 0) {
78 if (bind(fd, (sockaddr *)&localAddress, socketFamily == AF_INET ?
85 recvLoop(fd);
H A Draw_client.cpp31 int fd = socket(socketFamily, SOCK_RAW, TEST_PROTOCOL); local
32 if (fd < 0) {
51 int status = sendto(fd, buffer, length, 0, (sockaddr *) &saddr,
63 close(fd);
H A Dtcp_udp_client.cpp67 int fd = socket(socketFamily1, socketType, 0); local
68 if (fd < 0) {
77 if (connect(fd, (sockaddr *) &saddr, socketFamily2 == AF_INET ?
80 close(fd);
86 int status = send(fd, buffer, length, 0);
96 close(fd);
H A Dmulticast_sender.cpp47 int fd = socket(socketFamily, SOCK_DGRAM, 0); local
48 if (fd < 0) {
71 if (setsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF,
80 int status = sendto(fd, buffer, length, 0, (sockaddr *) &saddr,
92 close(fd);

Completed in 91 milliseconds

<<11121314151617181920>>