From 6265aea73a5f4933f4837bc1298c22fcd39b6f4f Mon Sep 17 00:00:00 2001 From: Ophestra Date: Thu, 11 Sep 2025 02:02:31 +0900 Subject: system: partial I inherit dispatcher This enables I struct methods to be checked. Signed-off-by: Ophestra --- system/system.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/system.go') 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) } } }() -- cgit v1.3.1