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 13int 14main(void) 15{ 16 int nb; 17 18 assert(ioctl(STDIN_FILENO, FIONREAD, &nb) == 0); 19 printf("%d", nb); 20 return (0); 21} 22 23