diff options
author | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
---|---|---|
committer | Adam <you@example.com> | 2020-05-17 05:51:50 +0200 |
commit | e611b132f9b8abe35b362e5870b74bce94a1e58e (patch) | |
tree | a5781d2ec0e085eeca33cf350cf878f2efea6fe5 /private/ntos/boot/veneer/vrcons.c | |
download | NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.gz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.bz2 NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.lz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.xz NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.tar.zst NT4.0-e611b132f9b8abe35b362e5870b74bce94a1e58e.zip |
Diffstat (limited to '')
-rw-r--r-- | private/ntos/boot/veneer/vrcons.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/private/ntos/boot/veneer/vrcons.c b/private/ntos/boot/veneer/vrcons.c new file mode 100644 index 000000000..e28a188f6 --- /dev/null +++ b/private/ntos/boot/veneer/vrcons.c @@ -0,0 +1,55 @@ +/*++ + + Copyright (c) 1995 FirePower Systems, Inc. + + $RCSfile: vrcons.c $ + $Revision: 1.6 $ + $Date: 1996/02/17 00:34:54 $ + $Locker: $ + +Copyright (c) 1994 FirmWorks, Mountain View CA USA. All rights reserved. + +Module Name: + + vrconsole.c + +--*/ + +#include "veneer.h" + +ihandle ConsoleIn = 0, ConsoleOut = 0; + +/* + * Look up either the stdin or stdout and return an NT path to + * the device. The console argument should be either "stdin" or + * "stdout". + */ + +PCHAR +VrFindConsolePath(char *console) +{ + phandle chosen; + ihandle console_ih; + PCONFIGURATION_NODE node; + + chosen = OFFinddevice("/chosen"); + console_ih = get_int_prop(chosen, console); + + if (console_ih == -1) { + return (NULL); + } + + if (strcmp(console, "stdin") == 0) { + ConsoleIn = console_ih; + } + if (strcmp(console, "stdout") == 0) { + ConsoleOut = console_ih; + } + + node = InstanceToNode(console_ih); + if (node == NULL) { + fatal("VrFindConsolePath: cannot locate %s node\n", console); + } + + return (NodeToArcPath(node)); +} |