summaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2011-12-17 15:16:54 +0000
committeravg <avg@FreeBSD.org>2011-12-17 15:16:54 +0000
commit53f09b7dafb734fd1c82af5d5e7415c7380c60db (patch)
treeec0a518e9e619f1d03d7c942ce15d3f80c2e2f47 /sys/sys
parentd062f5e7d808af770ca939a38c47ac94d6846449 (diff)
downloadFreeBSD-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')
-rw-r--r--sys/sys/cons.h1
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);
OpenPOWER on IntegriCloud