hotfix: invert OFW_TRUE match on call/call-method

This commit is contained in:
husky 2023-07-20 22:23:30 -07:00
parent 2c26ebac07
commit 2c474e8e25
No known key found for this signature in database
GPG key ID: 6B3D8CB511646891
2 changed files with 8 additions and 5 deletions

View file

@ -1,7 +1,7 @@
[package]
name = "ofw"
description = "basic interfacing with OpenFirmware (former IEEE standard 1275)"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
authors = ["Niko Chow-Stuart <nikocs@voremicrocomputers.com>"]
repository = "https://git.gaycatgirl.sex/voremicrocomputers/vap_os/ofw"

View file

@ -201,13 +201,16 @@ pub fn ofw_call(entry_fn: EntryFunction, service: NTSTR, num_args: i32, num_rets
let result: bool;
// note: i cannot figure out why we must match against !OFW_TRUE instead of OFW_TRUE,
// i haven't found anything in either the ieee 1275 doc or the ppc extension saying that
// this is the case, but it is
#[cfg(target_arch = "powerpc")]
{
result = entry_fn(&mut generic_args as *mut _ as *mut Args) == OFW_TRUE;
result = entry_fn(&mut generic_args as *mut _ as *mut Args) != OFW_TRUE;
}
#[cfg(target_arch = "x86_64")]
{
result = entry_fn(&mut generic_args as *mut _ as *mut Args) == OFW_TRUE;
result = entry_fn(&mut generic_args as *mut _ as *mut Args) != OFW_TRUE;
}
result
@ -259,11 +262,11 @@ pub fn ofw_call_method(entry_fn: EntryFunction, ihandle: IHandle, method: NTSTR,
#[cfg(target_arch = "powerpc")]
{
result = entry_fn(&mut call_method_args as *mut _ as *mut Args) == OFW_TRUE;
result = entry_fn(&mut call_method_args as *mut _ as *mut Args) != OFW_TRUE;
}
#[cfg(target_arch = "x86_64")]
{
result = entry_fn(&mut call_method_args as *mut _ as *mut Args) == OFW_TRUE;
result = entry_fn(&mut call_method_args as *mut _ as *mut Args) != OFW_TRUE;
}
result