Пример #1
0
int
prom_mayget(void)
{
	ssize_t rv;
	char c;

	rv = prom_read(prom_stdin_ihandle(), &c, 1, 0, BYTE);
	return (rv == 1 ? (int)c : -1);
}
Пример #2
0
ihandle_t
kmdb_prom_get_handle(char *name)
{
	if (strcmp(name, "stdin") == 0)
		return (prom_stdin_ihandle());
	else if (strcmp(name, "stdout") == 0 || strcmp(name, "stderr") == 0)
		return (prom_stdout_ihandle());
	else
		return (-1);
}