Skip to content

Commit

Permalink
add new error codes for save, restore, network block device, and USB …
Browse files Browse the repository at this point in the history
…device errors
  • Loading branch information
Code-Hex committed Nov 20, 2024
1 parent 179f6bb commit 588bd00
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 3 deletions.
24 changes: 21 additions & 3 deletions errorcode_string.go

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

38 changes: 38 additions & 0 deletions vzerror.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ const (
// ErrorNotSupported represents the operation is not supported.
// Available from macOS 13.0 and above.
ErrorNotSupported

// ErrorSave represents the save operation failed.
// Available from macOS 14.0 and above.
ErrorSave

// ErrorRestore represents the restore operation failed.
// Available from macOS 14.0 and above.
ErrorRestore
)

/* macOS installation errors. */
Expand Down Expand Up @@ -75,3 +83,33 @@ const (
// Available from macOS 13.0 and above.
ErrorInstallationFailed
)

/* Network Block Device errors. */
const (
// ErrorNetworkBlockDeviceNegotiationFailed represents the connection or the negotiation with the NBD server failed.
// Available from macOS 14.0 and above.
ErrorNetworkBlockDeviceNegotiationFailed ErrorCode = 20001 + iota

// ErrorNetworkBlockDeviceDisconnected represents the NBD client is disconnected from the server.
// Available from macOS 14.0 and above.
ErrorNetworkBlockDeviceDisconnected
)

/* USB device hot-plug errors. */
const (
// ErrorUSBControllerNotFound represents controller not found.
// Available from macOS 15.0 and above.
ErrorUSBControllerNotFound ErrorCode = 30001 + iota

// ErrorDeviceAlreadyAttached represents Device is already attached.
// Available from macOS 15.0 and above.
ErrorDeviceAlreadyAttached

// ErrorDeviceInitializationFailure represents device initialization failure.
// Available from macOS 15.0 and above.
ErrorDeviceInitializationFailure

// ErrorDeviceNotFound represents device not found.
// Available from macOS 15.0 and above.
ErrorDeviceNotFound
)

0 comments on commit 588bd00

Please sign in to comment.