Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions BuildTools/Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion BuildTools/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ let package = Package(
name: "BuildTools",
platforms: [.macOS(.v10_11)],
dependencies: [
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.48.4"),
.package(url: "https://github.com/nicklockwood/SwiftFormat", from: "0.49.2"),
],
targets: [.target(name: "BuildTools", path: "")]
)
4 changes: 3 additions & 1 deletion eul.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 1240;
LastUpgradeCheck = 1220;
LastUpgradeCheck = 1320;
ORGANIZATIONNAME = "Gao Sun";
TargetAttributes = {
6C2688ED2556762B00FB7306 = {
Expand Down Expand Up @@ -2106,6 +2106,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = SelfUpdate/SelfUpdate.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"SelfUpdate/Preview Content\"";
Expand All @@ -2130,6 +2131,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = SelfUpdate/SelfUpdate.entitlements;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_ASSET_PATHS = "\"SelfUpdate/Preview Content\"";
Expand Down
2 changes: 1 addition & 1 deletion eul.xcodeproj/xcshareddata/xcschemes/eul.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1220"
LastUpgradeVersion = "1320"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
7 changes: 6 additions & 1 deletion eul/Utilities/SMC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,9 @@ public enum SMCKit {
/// - parameter kIOReturn: I/O Kit error code
/// - parameter SMCResult: SMC specific return code
case unknown(kIOReturn: kern_return_t, SMCResult: UInt8)

/// SMCParamStruct size is not desired
case paramStructSizeMismatched
}

/// Connection to the SMC driver
Expand Down Expand Up @@ -380,7 +383,9 @@ public enum SMCKit {
selector: SMCParamStruct.Selector = .kSMCHandleYPCEvent)
throws -> SMCParamStruct
{
assert(MemoryLayout<SMCParamStruct>.stride == 80, "SMCParamStruct size is != 80")
guard MemoryLayout<SMCParamStruct>.stride == 80 else {
throw SMCError.paramStructSizeMismatched
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Нормально, кати


var outputStruct = SMCParamStruct()
let inputStructSize = MemoryLayout<SMCParamStruct>.stride
Expand Down