Set internal error returns for OF_peer(), OF_child(), and OF_parent() to
zero, matching the IEEE 1275 standard. Since these internal error paths have never, to my knowledge, been taken, behavior is unchanged. Reported by: gonzo MFC after: 2 weeks
This commit is contained in:
parent
230ff9de53
commit
7dfb211c9d
@ -232,7 +232,7 @@ ofw_std_peer(ofw_t ofw, phandle_t node)
|
||||
|
||||
args.node = node;
|
||||
if (openfirmware(&args) == -1)
|
||||
return (-1);
|
||||
return (0);
|
||||
return (args.next);
|
||||
}
|
||||
|
||||
@ -254,7 +254,7 @@ ofw_std_child(ofw_t ofw, phandle_t node)
|
||||
|
||||
args.node = node;
|
||||
if (openfirmware(&args) == -1)
|
||||
return (-1);
|
||||
return (0);
|
||||
return (args.child);
|
||||
}
|
||||
|
||||
@ -276,7 +276,7 @@ ofw_std_parent(ofw_t ofw, phandle_t node)
|
||||
|
||||
args.node = node;
|
||||
if (openfirmware(&args) == -1)
|
||||
return (-1);
|
||||
return (0);
|
||||
return (args.parent);
|
||||
}
|
||||
|
||||
|
@ -366,7 +366,7 @@ ofw_real_peer(ofw_t ofw, phandle_t node)
|
||||
argsptr = ofw_real_map(&args, sizeof(args));
|
||||
if (openfirmware((void *)argsptr) == -1) {
|
||||
ofw_real_stop();
|
||||
return (-1);
|
||||
return (0);
|
||||
}
|
||||
ofw_real_unmap(argsptr, &args, sizeof(args));
|
||||
ofw_real_stop();
|
||||
@ -395,7 +395,7 @@ ofw_real_child(ofw_t ofw, phandle_t node)
|
||||
argsptr = ofw_real_map(&args, sizeof(args));
|
||||
if (openfirmware((void *)argsptr) == -1) {
|
||||
ofw_real_stop();
|
||||
return (-1);
|
||||
return (0);
|
||||
}
|
||||
ofw_real_unmap(argsptr, &args, sizeof(args));
|
||||
ofw_real_stop();
|
||||
@ -424,7 +424,7 @@ ofw_real_parent(ofw_t ofw, phandle_t node)
|
||||
argsptr = ofw_real_map(&args, sizeof(args));
|
||||
if (openfirmware((void *)argsptr) == -1) {
|
||||
ofw_real_stop();
|
||||
return (-1);
|
||||
return (0);
|
||||
}
|
||||
ofw_real_unmap(argsptr, &args, sizeof(args));
|
||||
ofw_real_stop();
|
||||
|
Loading…
x
Reference in New Issue
Block a user