hotfix: invert OFW_TRUE match on call/call-method
This commit is contained in:
parent
2c26ebac07
commit
2c474e8e25
2 changed files with 8 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ofw"
|
name = "ofw"
|
||||||
description = "basic interfacing with OpenFirmware (former IEEE standard 1275)"
|
description = "basic interfacing with OpenFirmware (former IEEE standard 1275)"
|
||||||
version = "0.2.0"
|
version = "0.2.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
authors = ["Niko Chow-Stuart <nikocs@voremicrocomputers.com>"]
|
authors = ["Niko Chow-Stuart <nikocs@voremicrocomputers.com>"]
|
||||||
repository = "https://git.gaycatgirl.sex/voremicrocomputers/vap_os/ofw"
|
repository = "https://git.gaycatgirl.sex/voremicrocomputers/vap_os/ofw"
|
||||||
|
|
11
src/lib.rs
11
src/lib.rs
|
@ -201,13 +201,16 @@ pub fn ofw_call(entry_fn: EntryFunction, service: NTSTR, num_args: i32, num_rets
|
||||||
|
|
||||||
let result: bool;
|
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")]
|
#[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")]
|
#[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
|
result
|
||||||
|
@ -259,11 +262,11 @@ pub fn ofw_call_method(entry_fn: EntryFunction, ihandle: IHandle, method: NTSTR,
|
||||||
|
|
||||||
#[cfg(target_arch = "powerpc")]
|
#[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")]
|
#[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
|
result
|
||||||
|
|
Loading…
Add table
Reference in a new issue