diff options
author | avg <avg@FreeBSD.org> | 2011-12-17 15:16:54 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2011-12-17 15:16:54 +0000 |
commit | 53f09b7dafb734fd1c82af5d5e7415c7380c60db (patch) | |
tree | ec0a518e9e619f1d03d7c942ce15d3f80c2e2f47 /sys/sys/cons.h | |
parent | d062f5e7d808af770ca939a38c47ac94d6846449 (diff) | |
download | FreeBSD-src-53f09b7dafb734fd1c82af5d5e7415c7380c60db.zip FreeBSD-src-53f09b7dafb734fd1c82af5d5e7415c7380c60db.tar.gz |
introduce cngets, a method for kernel to read a string from console
This is intended as a replacement for libkern's gets and mostly borrows
its implementation. It uses cngrab/cnungrab to delimit kernel's access
to console input.
Note: libkern's gets obviously doesn't share any bits of implementation
iwth libc's gets. They also have different APIs and the former doesn't
have the overflow problems of the latter.
Inspired by: bde
MFC after: 2 months
Diffstat (limited to 'sys/sys/cons.h')
-rw-r--r-- | sys/sys/cons.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/sys/cons.h b/sys/sys/cons.h index bd599c0..79e2574 100644 --- a/sys/sys/cons.h +++ b/sys/sys/cons.h @@ -121,6 +121,7 @@ void cngrab(void); void cnungrab(void); int cncheckc(void); int cngetc(void); +void cngets(char *, size_t, int); void cnputc(int); void cnputs(char *); int cnunavailable(void); |