haze: implement GetObjectPropList
This commit is contained in:
@@ -111,6 +111,14 @@ namespace haze {
|
||||
}
|
||||
|
||||
constexpr void Deallocate(void *p, size_t n) {
|
||||
/* Check for overflow in alignment. */
|
||||
if (!util::CanAddWithoutOverflow(n, alignof(u64) - 1)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Align the amount to satisfy allocation for u64. */
|
||||
n = util::AlignUp(n, alignof(u64));
|
||||
|
||||
/* If the pointer was the last allocation, return the memory to the heap. */
|
||||
if (static_cast<u8 *>(p) + n == this->GetNextAddress()) {
|
||||
m_next_address = this->GetNextAddress() - n;
|
||||
|
||||
@@ -83,6 +83,7 @@ namespace haze {
|
||||
Result GetObjectPropDesc(PtpDataParser &dp);
|
||||
Result GetObjectPropValue(PtpDataParser &dp);
|
||||
Result SetObjectPropValue(PtpDataParser &dp);
|
||||
Result GetObjectPropList(PtpDataParser &dp);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@ namespace haze {
|
||||
PtpOperationCode_MtpGetObjectPropDesc,
|
||||
PtpOperationCode_MtpGetObjectPropValue,
|
||||
PtpOperationCode_MtpSetObjectPropValue,
|
||||
PtpOperationCode_MtpGetObjPropList,
|
||||
PtpOperationCode_AndroidGetPartialObject64,
|
||||
PtpOperationCode_AndroidSendPartialObject,
|
||||
PtpOperationCode_AndroidTruncateObject,
|
||||
|
||||
@@ -38,5 +38,7 @@ namespace haze {
|
||||
R_DEFINE_ERROR_RESULT(UnknownPropertyCode, 14);
|
||||
R_DEFINE_ERROR_RESULT(InvalidPropertyValue, 15);
|
||||
R_DEFINE_ERROR_RESULT(InvalidArgument, 16);
|
||||
R_DEFINE_ERROR_RESULT(GroupSpecified, 17);
|
||||
R_DEFINE_ERROR_RESULT(DepthSpecified, 18);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user