1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-26 16:18:31 +00:00

Real OF systems have an ihandle under /chosen/stdout, not a phandle. Use

the right type.
This commit is contained in:
Nathan Whitehorn 2013-12-01 19:05:32 +00:00
parent fb5b9994b3
commit 02ef3f33de
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=258806

View File

@ -89,13 +89,13 @@ ofw_get_console_phandle_path(phandle_t node, phandle_t *result,
return (ENXIO);
OF_getprop(node, prop, &field, sizeof(field));
/* This property might be a phandle or might be a path. Hooray. */
/* This property might be either a ihandle or path. Hooray. */
output = -1;
if (field.buf[size - 1] == 0)
output = OF_finddevice(field.buf);
if (output == -1 && size == 4)
output = OF_xref_phandle(field.ref);
output = OF_instance_to_package(field.ref);
if (output != -1) {
*result = output;