diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-09-11 02:02:31 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-09-11 02:02:31 +0900 |
| commit | 6265aea73a5f4933f4837bc1298c22fcd39b6f4f (patch) | |
| tree | 6e6f3c8c642747c761df40d1bb387e443424daa7 /system/system.go | |
| parent | c8a0effe908c22c350c5c492b0e5bbeefc8749f1 (diff) | |
system: partial I inherit dispatcher
This enables I struct methods to be checked.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'system/system.go')
| -rw-r--r-- | system/system.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/system.go b/system/system.go index 134e7cee..ea6d9d58 100644 --- a/system/system.go +++ b/system/system.go @@ -4,7 +4,6 @@ package system import ( "context" "errors" - "log" "strings" ) @@ -116,14 +115,15 @@ func (sys *I) Commit() error { sys.committed = true sp := New(sys.ctx, sys.uid) + sp.syscallDispatcher = sys.syscallDispatcher sp.ops = make([]Op, 0, len(sys.ops)) // prevent copies during commits defer func() { // sp is set to nil when all ops are applied if sp != nil { // rollback partial commit - msg.Verbosef("commit faulted after %d ops, rolling back partial commit", len(sp.ops)) + sys.verbosef("commit faulted after %d ops, rolling back partial commit", len(sp.ops)) if err := sp.Revert(nil); err != nil { - printJoinedError(log.Println, "cannot revert partial commit:", err) + printJoinedError(sys.println, "cannot revert partial commit:", err) } } }() |
