Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-src
Path: blob/main/tests/sys/kern/tty/fionread.c
39483 views
1
/*-
2
* Copyright (c) 2024 Kyle Evans <[email protected]>
3
*
4
* SPDX-License-Identifier: BSD-2-Clause
5
*/
6
7
#include <sys/ioctl.h>
8
9
#include <assert.h>
10
#include <stdio.h>
11
#include <unistd.h>
12
13
int
14
main(void)
15
{
16
int nb;
17
18
assert(ioctl(STDIN_FILENO, FIONREAD, &nb) == 0);
19
printf("%d", nb);
20
return (0);
21
}
22
23