Skip to content

Commit 2fc350e

Browse files
committed
Shutdown: Cleanup
1 parent ed429ed commit 2fc350e

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

MacHyperVSupport/IntegrationComponents/Shutdown/HyperVShutdownUserClient.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ const IOExternalMethodDispatch HyperVShutdownUserClient::sShutdownMethods[kHyper
1414
{ // kHyperVShutdownUserClientMethodReportShutdownAbility
1515
reinterpret_cast<IOExternalMethodAction>(&HyperVShutdownUserClient::methodReportShutdownAbility), // Method pointer
1616
1, // Num of scalar input values
17-
0, // Num of struct input values
17+
0, // Size of struct input
1818
0, // Num of scalar output values
19-
0 // Num of struct output values
19+
0 // Size of struct output
2020
}
2121
};
2222

@@ -68,6 +68,7 @@ IOReturn HyperVShutdownUserClient::externalMethod(uint32_t selector, IOExternalM
6868

6969
return super::externalMethod(selector, arguments, dispatch, target, reference);
7070
}
71+
#else
7172
#endif
7273

7374
IOReturn HyperVShutdownUserClient::notifyClientApplication(HyperVShutdownUserClientNotificationType type) {

MacHyperVSupport/IntegrationComponents/Shutdown/HyperVShutdownUserClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <libkern/OSTypes.h>
1212
#include <mach/message.h>
1313

14-
typedef enum {
14+
typedef enum : UInt32 {
1515
kHyperVShutdownUserClientMethodReportShutdownAbility,
1616

1717
kHyperVShutdownUserClientMethodNumberOfMethods

MacHyperVSupport/IntegrationComponents/Shutdown/HyperVShutdownUserClientInternal.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class HyperVShutdownUserClient : public HyperVICUserClient {
1515
OSDeclareDefaultStructors(HyperVShutdownUserClient);
1616
HVDeclareLogFunctions("shutuser");
1717
typedef HyperVICUserClient super;
18-
18+
1919
private:
2020
bool _isShutdownSupported = false;
2121

@@ -25,6 +25,10 @@ class HyperVShutdownUserClient : public HyperVICUserClient {
2525
#endif
2626

2727
IOReturn notifyClientApplication(HyperVShutdownUserClientNotificationType type);
28+
29+
//
30+
// Userspace external methods.
31+
//
2832
static IOReturn methodReportShutdownAbility(HyperVShutdownUserClient *target, void *ref, IOExternalMethodArguments *args);
2933

3034
public:

0 commit comments

Comments
 (0)