github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/sentry/fsimpl/pipefs/pipefs_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package pipefs
     4  
     5  import (
     6  	"github.com/nicocha30/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (f *filesystemType) StateTypeName() string {
    10  	return "pkg/sentry/fsimpl/pipefs.filesystemType"
    11  }
    12  
    13  func (f *filesystemType) StateFields() []string {
    14  	return []string{}
    15  }
    16  
    17  func (f *filesystemType) beforeSave() {}
    18  
    19  // +checklocksignore
    20  func (f *filesystemType) StateSave(stateSinkObject state.Sink) {
    21  	f.beforeSave()
    22  }
    23  
    24  func (f *filesystemType) afterLoad() {}
    25  
    26  // +checklocksignore
    27  func (f *filesystemType) StateLoad(stateSourceObject state.Source) {
    28  }
    29  
    30  func (fs *filesystem) StateTypeName() string {
    31  	return "pkg/sentry/fsimpl/pipefs.filesystem"
    32  }
    33  
    34  func (fs *filesystem) StateFields() []string {
    35  	return []string{
    36  		"Filesystem",
    37  		"devMinor",
    38  	}
    39  }
    40  
    41  func (fs *filesystem) beforeSave() {}
    42  
    43  // +checklocksignore
    44  func (fs *filesystem) StateSave(stateSinkObject state.Sink) {
    45  	fs.beforeSave()
    46  	stateSinkObject.Save(0, &fs.Filesystem)
    47  	stateSinkObject.Save(1, &fs.devMinor)
    48  }
    49  
    50  func (fs *filesystem) afterLoad() {}
    51  
    52  // +checklocksignore
    53  func (fs *filesystem) StateLoad(stateSourceObject state.Source) {
    54  	stateSourceObject.Load(0, &fs.Filesystem)
    55  	stateSourceObject.Load(1, &fs.devMinor)
    56  }
    57  
    58  func (i *inode) StateTypeName() string {
    59  	return "pkg/sentry/fsimpl/pipefs.inode"
    60  }
    61  
    62  func (i *inode) StateFields() []string {
    63  	return []string{
    64  		"InodeAnonymous",
    65  		"InodeNotDirectory",
    66  		"InodeNotSymlink",
    67  		"InodeNoopRefCount",
    68  		"InodeWatches",
    69  		"locks",
    70  		"pipe",
    71  		"ino",
    72  		"uid",
    73  		"gid",
    74  		"ctime",
    75  	}
    76  }
    77  
    78  func (i *inode) beforeSave() {}
    79  
    80  // +checklocksignore
    81  func (i *inode) StateSave(stateSinkObject state.Sink) {
    82  	i.beforeSave()
    83  	stateSinkObject.Save(0, &i.InodeAnonymous)
    84  	stateSinkObject.Save(1, &i.InodeNotDirectory)
    85  	stateSinkObject.Save(2, &i.InodeNotSymlink)
    86  	stateSinkObject.Save(3, &i.InodeNoopRefCount)
    87  	stateSinkObject.Save(4, &i.InodeWatches)
    88  	stateSinkObject.Save(5, &i.locks)
    89  	stateSinkObject.Save(6, &i.pipe)
    90  	stateSinkObject.Save(7, &i.ino)
    91  	stateSinkObject.Save(8, &i.uid)
    92  	stateSinkObject.Save(9, &i.gid)
    93  	stateSinkObject.Save(10, &i.ctime)
    94  }
    95  
    96  func (i *inode) afterLoad() {}
    97  
    98  // +checklocksignore
    99  func (i *inode) StateLoad(stateSourceObject state.Source) {
   100  	stateSourceObject.Load(0, &i.InodeAnonymous)
   101  	stateSourceObject.Load(1, &i.InodeNotDirectory)
   102  	stateSourceObject.Load(2, &i.InodeNotSymlink)
   103  	stateSourceObject.Load(3, &i.InodeNoopRefCount)
   104  	stateSourceObject.Load(4, &i.InodeWatches)
   105  	stateSourceObject.Load(5, &i.locks)
   106  	stateSourceObject.Load(6, &i.pipe)
   107  	stateSourceObject.Load(7, &i.ino)
   108  	stateSourceObject.Load(8, &i.uid)
   109  	stateSourceObject.Load(9, &i.gid)
   110  	stateSourceObject.Load(10, &i.ctime)
   111  }
   112  
   113  func init() {
   114  	state.Register((*filesystemType)(nil))
   115  	state.Register((*filesystem)(nil))
   116  	state.Register((*inode)(nil))
   117  }