|
AquilaOS documentation
How it works, and its code
|
/dev/null (character device 1, 3): reading it gives nothing, the end of the file at once, and what is written to it is thrown away. More...
#include <core/system.h>#include <dev/dev.h>#include <fs/posix.h>#include <aquila/errno.h>#include <memdev.h>Go to the source code of this file.
Functions | |
| static ssize_t | nulldev_read (struct devid *dd, off_t offset, struct iobuf *io) |
| Reads nothing: /dev/null is always at its end. | |
| static ssize_t | nulldev_write (struct devid *dd, off_t offset, struct iobuf *io) |
| Takes all that is written, and throws it away. | |
Variables | |
| struct dev | nulldev |
/dev/null (character device 1, 3): reading it gives nothing, the end of the file at once, and what is written to it is thrown away.
Definition in file null.c.
Reads nothing: /dev/null is always at its end.
Definition at line 16 of file null.c.
References nulldev_read().
Referenced by nulldev_read().
Takes all that is written, and throws it away.
Definition at line 22 of file null.c.
References iobuf_skip(), nulldev_write(), and iobuf::resid.
Referenced by nulldev_write().
| struct dev nulldev |
Definition at line 13 of file null.c.
Referenced by memdev_mux().