-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Implement wslc session enter #40088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement wslc session enter #40088
Changes from all commits
65866a7
25cded4
3f1f21c
f60dfc6
12220d3
7126321
4d3e776
d34feb9
be47b01
ddd96b6
b949278
f4b2c7b
324b0fe
8381446
19e5616
72a42e3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -415,6 +415,15 @@ interface IWSLCVirtualMachine : IUnknown | |
| HRESULT RemoveShare([in] REFGUID ShareId); | ||
| } | ||
|
|
||
| typedef enum _WSLCSessionStorageFlags | ||
| { | ||
| WSLCSessionStorageFlagsNone = 0, | ||
| WSLCSessionStorageFlagsNoCreate = 1, // Open an existing storage path, but don't create a new one. | ||
| WSLCSessionStorageFlagsValid = WSLCSessionStorageFlagsNoCreate | ||
| } WSLCSessionStorageFlags; | ||
|
|
||
| cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(WSLCSessionStorageFlags);") | ||
|
|
||
| // Settings for IWSLCSessionManager::CreateSession - full session configuration | ||
| typedef struct _WSLCSessionSettings { | ||
| LPCWSTR DisplayName; | ||
|
|
@@ -427,6 +436,7 @@ typedef struct _WSLCSessionSettings { | |
| [unique] ITerminationCallback* TerminationCallback; | ||
| WSLCFeatureFlags FeatureFlags; | ||
| WSLCHandle DmesgOutput; | ||
| WSLCSessionStorageFlags StorageFlags; | ||
|
|
||
|
Comment on lines
427
to
440
|
||
| // Below options are used for debugging purposes only. | ||
| [unique] LPCWSTR RootVhdOverride; | ||
|
|
@@ -554,6 +564,7 @@ typedef struct _WSLCSessionInitSettings | |
| ULONG CreatorPid; | ||
| LPCWSTR DisplayName; | ||
| LPCWSTR StoragePath; | ||
| WSLCSessionStorageFlags StorageFlags; | ||
| ULONGLONG MaximumStorageSizeMb; | ||
|
Comment on lines
564
to
568
|
||
| ULONG BootTimeoutMs; | ||
| WSLCNetworkingMode NetworkingMode; | ||
|
|
@@ -681,6 +692,9 @@ typedef enum _WSLCSessionFlags | |
| WSLCSessionFlagsOpenExisting = 2, // Open an existing session if the name is in use. | ||
| } WSLCSessionFlags; | ||
|
|
||
| cpp_quote("DEFINE_ENUM_FLAG_OPERATORS(WSLCSessionFlags);") | ||
|
|
||
|
|
||
| [ | ||
| uuid(82A7ABC8-6B50-43FC-AB96-15FBBE7E8760), | ||
| pointer_default(unique), | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -72,6 +72,7 @@ _(Remove, "rm", NO_ALIAS, Kind::Flag, L | |||||
| /*_(Scheme, "scheme", NO_ALIAS, Kind::Value, Localization::WSLCCLI_SchemeArgDescription())*/ \ | ||||||
| _(Session, "session", NO_ALIAS, Kind::Value, Localization::WSLCCLI_SessionIdArgDescription()) \ | ||||||
| _(SessionId, "session-id", NO_ALIAS, Kind::Positional, Localization::WSLCCLI_SessionIdPositionalArgDescription()) \ | ||||||
| _(StoragePath, "storage-path", NO_ALIAS, Kind::Positional, L"Path to the session storage directory") \ | ||||||
|
||||||
| _(StoragePath, "storage-path", NO_ALIAS, Kind::Positional, L"Path to the session storage directory") \ | |
| _(StoragePath, "storage-path", NO_ALIAS, Kind::Positional, Localization::WSLCCLI_SessionStoragePositionalArgDescription()) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MessageWslcSessionStorageNotFoundcurrently says "No WSLC session found in '{}'", but it’s used when the storage path doesn’t exist / can’t be opened. This reads like a lookup failure by name rather than a filesystem/storage issue. Consider rewording to reference the storage path (e.g., "No WSLC session storage found at '{}'" or similar) to make the error actionable.