unfinished but im tired
This commit is contained in:
parent
71f9c1ce63
commit
d693c8cfb1
13 changed files with 457 additions and 531 deletions
|
@ -259,18 +259,6 @@ namespace os {
|
|||
.total_bytes = stat.f_blocks * stat.f_frsize,
|
||||
};
|
||||
}
|
||||
|
||||
fn GetPackageCount() -> Result<u64, DracError> {
|
||||
BPackageKit::BPackageRoster roster;
|
||||
BPackageKit::BPackageInfoSet packageList;
|
||||
|
||||
const status_t status = roster.GetActivePackages(BPackageKit::B_PACKAGE_INSTALLATION_LOCATION_SYSTEM, packageList);
|
||||
|
||||
if (status != B_OK)
|
||||
return Err(DracError(DracErrorCode::ApiUnavailable, "Failed to get active package list"));
|
||||
|
||||
return static_cast<u64>(packageList.CountInfos());
|
||||
}
|
||||
} // namespace os
|
||||
|
||||
#endif // __HAIKU__
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue