x86: add PAGE_KERNEL_EXEC_NOCACHE
[wrt350n-kernel.git] / arch / ppc / boot / of1275 / ofstdio.c
blob10abbe32b31f6603835b7e15ab204f4e5715cc83
1 /*
2 * Copyright (C) Paul Mackerras 1997.
3 * Copyright (C) Leigh Brown 2002.
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version
8 * 2 of the License, or (at your option) any later version.
9 */
11 #include "of1275.h"
13 int
14 ofstdio(ihandle *stdin, ihandle *stdout, ihandle *stderr)
16 ihandle in, out;
17 phandle chosen;
19 if ((chosen = finddevice("/chosen")) == OF_INVALID_HANDLE)
20 goto err;
21 if (getprop(chosen, "stdout", &out, sizeof(out)) != 4)
22 goto err;
23 if (getprop(chosen, "stdin", &in, sizeof(in)) != 4)
24 goto err;
26 *stdin = in;
27 *stdout = out;
28 *stderr = out;
29 return 0;
30 err:
31 return -1;