github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/sentry/fsutil/fsutil_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package fsutil
     4  
     5  import (
     6  	"github.com/ttpreport/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (d *DirtyInfo) StateTypeName() string {
    10  	return "pkg/sentry/fsutil.DirtyInfo"
    11  }
    12  
    13  func (d *DirtyInfo) StateFields() []string {
    14  	return []string{
    15  		"Keep",
    16  	}
    17  }
    18  
    19  func (d *DirtyInfo) beforeSave() {}
    20  
    21  // +checklocksignore
    22  func (d *DirtyInfo) StateSave(stateSinkObject state.Sink) {
    23  	d.beforeSave()
    24  	stateSinkObject.Save(0, &d.Keep)
    25  }
    26  
    27  func (d *DirtyInfo) afterLoad() {}
    28  
    29  // +checklocksignore
    30  func (d *DirtyInfo) StateLoad(stateSourceObject state.Source) {
    31  	stateSourceObject.Load(0, &d.Keep)
    32  }
    33  
    34  func (f *HostFileMapper) StateTypeName() string {
    35  	return "pkg/sentry/fsutil.HostFileMapper"
    36  }
    37  
    38  func (f *HostFileMapper) StateFields() []string {
    39  	return []string{
    40  		"refs",
    41  	}
    42  }
    43  
    44  func (f *HostFileMapper) beforeSave() {}
    45  
    46  // +checklocksignore
    47  func (f *HostFileMapper) StateSave(stateSinkObject state.Sink) {
    48  	f.beforeSave()
    49  	stateSinkObject.Save(0, &f.refs)
    50  }
    51  
    52  // +checklocksignore
    53  func (f *HostFileMapper) StateLoad(stateSourceObject state.Source) {
    54  	stateSourceObject.Load(0, &f.refs)
    55  	stateSourceObject.AfterLoad(f.afterLoad)
    56  }
    57  
    58  func init() {
    59  	state.Register((*DirtyInfo)(nil))
    60  	state.Register((*HostFileMapper)(nil))
    61  }