diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-07-23 14:13:28 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-07-23 13:30:23 +0000 |
| commit | 53c2e8ad91fd5f64989a4e6a923926990130b5cd (patch) | |
| tree | a4ba74c7dcaebf772436725f3ccf2e4e65baa659 /vm/isolated | |
| parent | e50e8da5c493b37bff754d816c11218eba03d715 (diff) | |
vmimpl: refactor VM type registration
Pass Type struct directly during registration.
This allows to add additional optional parameters to VM types
without changing all VM implementations.
We we will need to add SupportsSnapshots flag and one flag to resolve #5028.
With this change it will be possible to add "SupportsSnapshots: true"
to just one VM type implemenetation.
Diffstat (limited to 'vm/isolated')
| -rwxr-xr-x | vm/isolated/isolated.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vm/isolated/isolated.go b/vm/isolated/isolated.go index 99e7ad78a..3b8b8720d 100755 --- a/vm/isolated/isolated.go +++ b/vm/isolated/isolated.go @@ -24,7 +24,9 @@ import ( const pstoreConsoleFile = "/sys/fs/pstore/console-ramoops-0" func init() { - vmimpl.Register("isolated", ctor, false) + vmimpl.Register("isolated", vmimpl.Type{ + Ctor: ctor, + }) } type Config struct { |
