Searched refs:fd (Results 226 - 250 of 571) sorted by path

1234567891011>>

/haiku/src/system/libroot/posix/unistd/
H A Dlseek.c15 lseek(int fd, off_t pos, int whence) argument
17 off_t result = _kern_seek(fd, pos, whence);
H A Dread.c24 read(int fd, void* buffer, size_t bufferSize) argument
26 ssize_t status = _kern_read(fd, -1, buffer, bufferSize);
33 read_pos(int fd, off_t pos, void* buffer, size_t bufferSize) argument
38 RETURN_AND_SET_ERRNO_TEST_CANCEL(_kern_read(fd, pos, buffer, bufferSize));
43 pread(int fd, void* buffer, size_t bufferSize, off_t pos) argument
48 RETURN_AND_SET_ERRNO_TEST_CANCEL(_kern_read(fd, pos, buffer, bufferSize));
H A Dterminal.c21 isatty(int fd) argument
25 return _kern_ioctl(fd, TCGETA, &termios, sizeof(struct termios)) == B_OK;
47 tcsetpgrp(int fd, pid_t pgrpid) argument
49 return ioctl(fd, TIOCSPGRP, &pgrpid);
54 tcgetpgrp(int fd) argument
57 int status = ioctl(fd, TIOCGPGRP, &foregroundProcess);
H A Dtruncate.c33 ftruncate(int fd, off_t newSize) argument
39 status = _kern_write_stat(fd, NULL, false, &stat, sizeof(struct stat),
H A Dttyname.c22 * give the name of a tty fd. threadsafe.
23 * @param fd the tty to get the name from.
29 ttyname_r(int fd, char *buffer, size_t bufferSize) argument
34 if (fstat(fd, &fdStat) < 0)
37 if (!S_ISCHR(fdStat.st_mode) || !isatty(fd))
41 if (ioctl(fd, B_GET_PATH_FOR_DEVICE, buffer, bufferSize) < 0)
48 * give the name of a tty fd.
49 * @param fd the tty to get the name from.
53 ttyname(int fd) argument
57 int err = ttyname_r(fd, pathnam
[all...]
H A Dwrite.c22 write(int fd, void const *buffer, size_t bufferSize) argument
24 int status = _kern_write(fd, -1, buffer, bufferSize);
31 write_pos(int fd, off_t pos, const void *buffer, size_t bufferSize) argument
36 RETURN_AND_SET_ERRNO_TEST_CANCEL(_kern_write(fd, pos, buffer, bufferSize));
41 pwrite(int fd, const void *buffer, size_t bufferSize, off_t pos) argument
46 RETURN_AND_SET_ERRNO_TEST_CANCEL(_kern_write(fd, pos, buffer, bufferSize));
/haiku/src/system/runtime_loader/
H A Delf_haiku_version.h11 void analyze_image_haiku_version_and_abi(int fd, image_t* image,
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/tests/add-ons/kernel/drivers/random/
H A Drandom_test.cpp16 int fd = open(kRandomDevice, O_RDONLY); local
17 if (fd < 0) {
24 ssize_t bytesRead = read(fd, buffer, sizeof(buffer));
/haiku/src/tests/add-ons/kernel/drivers/tty/
H A Dtty-test.cpp68 void Add(int fd) argument
70 if (fd < 0 || fd >= FD_SETSIZE) {
71 fprintf(stderr, "FDSet::Add(%d): Invalid FD.\n", fd);
75 FD_SET(fd, this);
76 if (fd >= fCount)
77 fCount = fd + 1;
133 void AddReadFD(int fd) argument
135 fReadSet.Add(fd);
138 void AddWriteFD(int fd) argument
143 AddErrorFD(int fd) argument
305 WriteUntilBlock(int fd) argument
336 ReadDontFail(int fd, int32 size) argument
360 WriteDontFail(int fd, int32 size) argument
385 SetEcho(int fd) argument
407 int fd = open(path, O_RDWR | (master ? 0 : O_NOCTTY)); local
420 close_tty(int &fd) argument
668 int fd = (fTestMaster ? fMaster : fSlave); local
773 int fd = (fTestMaster ? fMaster : fSlave); local
784 int fd = (fTestMaster ? fMaster : fSlave); local
837 int fd = (fTestMaster ? fMaster : fSlave); local
[all...]
/haiku/src/tests/add-ons/kernel/file_systems/bfs/
H A Dbfs_attribute_iterator_test.cpp85 int fd = file.Dup(); local
86 if (fd < 0)
95 DIR* dir = fs_fopen_attr_dir(fd);
121 close(fd);
137 int fd = file.Dup(); local
138 if (fd < 0)
147 DIR* dir = fs_fopen_attr_dir(fd);
173 close(fd);
/haiku/src/tests/add-ons/kernel/file_systems/bfs/fragmenter/
H A Dfragmenter.cpp61 read_from(int fd, off_t pos, void *buffer, size_t size) argument
63 if (lseek(fd, pos, SEEK_SET) < 0
64 || read(fd, buffer, size) != (int)size) {
73 write_to(int fd, off_t pos, const void *buffer, size_t size) argument
75 if (lseek(fd, pos, SEEK_SET) < 0
76 || write(fd, buffer, size) != (int)size) {
147 int fd = open(fileName, O_RDWR); local
148 if (fd < 0) {
156 read_from(fd, 512, &superBlock, sizeof(superBlock));
167 if (fstat(fd,
[all...]
/haiku/src/tests/add-ons/kernel/file_systems/cdda/
H A Dcdda_text.cpp44 int fd = open(argv[1], O_RDONLY); local
45 if (fd < 0)
51 status_t status = read_table_of_contents(fd, toc, sizeof(buffer));
59 read_cdtext(fd, text);
64 close(fd);
/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);
/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/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);
H A Dplaywav.cpp18 int fd = -1; variable
48 size = read(fd, buffer, SIZE);
80 fd = open(argv[1], O_RDONLY);
81 if (fd < 0) {
86 lseek(fd, 44, SEEK_SET);
132 close(fd);
/haiku/src/tests/kits/media/soundplayer/
H A DSoundPlayerTest.cpp14 int fd = -1; variable
21 if (size != (size_t)read(fd, buffer, size)) {
29 fd = open((argc > 1) ? argv[1] : FILENAME, O_RDONLY);
30 if (fd < 0)
33 lseek(fd, 44, SEEK_SET); // skip wav header
74 lseek(fd, 10000000, SEEK_CUR); // skip 10 MB
129 close(fd);
/haiku/src/tests/kits/net/
H A Dlink_echo.cpp43 link_client(int fd, const BNetworkAddress& server) argument
52 if (sendto(fd, buffer, length, 0, server, server.Length()) < 0) {
59 ssize_t bytesRead = recvfrom(fd, buffer, kBufferSize - 1, 0, NULL,
73 link_server(int fd) argument
80 ssize_t bytesRead = recvfrom(fd, buffer, kBufferSize - 1, 0, client,
99 if (sendto(fd, buffer, bytesRead, 0, client, client.Length()) < 0) {
153 int fd = socket(AF_LINK, SOCK_DGRAM, 0); local
154 if (fd < 0)
161 if (bind(fd, link, link.Length()) != 0)
165 if (getsockname(fd, lin
[all...]
/haiku/src/tests/libs/bsd/
H A Dforkpty.c10 int fd = -1; local
13 if ((pid = forkpty(&fd, NULL, NULL, NULL)) < 0)
25 return fd;
34 int fd = do_fork(); local
40 n = read (fd, s, 1);
/haiku/src/tests/misc/
H A Dwritev-test.cpp11 int fd = open("testfile", O_CREAT | O_RDWR, 0666); local
13 if (fd < 0) {
21 ret = writev(fd, &vec1, 0x80000001);
28 ret = writev(fd, &vec2, 1);
35 ret = writev(fd, &vec3, 0xfff);
41 close(fd);
/haiku/src/tests/servers/input/comm/
H A Darea.c16 int fd = open ("/tmp/input_area.bin", O_WRONLY | O_CREAT | O_TRUNC, 0644); local
17 if (fd >= 0) {
18 write (fd, appBuffer, 0x1000);
19 close (fd);
/haiku/src/tests/system/kernel/device_manager/
H A Ddm_wrapper.c11 static int fd; variable
17 fd = open(device, 0);
18 if (fd < 0)
25 close(fd);
36 return ioctl(fd, params.magic, &params, sizeof(params));
46 return ioctl(fd, params.magic, &params, sizeof(params));
56 return ioctl(fd, params.magic, &params, sizeof(params));
66 return ioctl(fd, params.magic, &params, sizeof(params));
76 return ioctl(fd, params.magic, &params, sizeof(params));

Completed in 144 milliseconds

1234567891011>>