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

     1  // automatically generated by stateify.
     2  
     3  package mqfs
     4  
     5  import (
     6  	"github.com/nicocha30/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (ft *FilesystemType) StateTypeName() string {
    10  	return "pkg/sentry/fsimpl/mqfs.FilesystemType"
    11  }
    12  
    13  func (ft *FilesystemType) StateFields() []string {
    14  	return []string{}
    15  }
    16  
    17  func (ft *FilesystemType) beforeSave() {}
    18  
    19  // +checklocksignore
    20  func (ft *FilesystemType) StateSave(stateSinkObject state.Sink) {
    21  	ft.beforeSave()
    22  }
    23  
    24  func (ft *FilesystemType) afterLoad() {}
    25  
    26  // +checklocksignore
    27  func (ft *FilesystemType) StateLoad(stateSourceObject state.Source) {
    28  }
    29  
    30  func (fs *filesystem) StateTypeName() string {
    31  	return "pkg/sentry/fsimpl/mqfs.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 (q *queueInode) StateTypeName() string {
    59  	return "pkg/sentry/fsimpl/mqfs.queueInode"
    60  }
    61  
    62  func (q *queueInode) StateFields() []string {
    63  	return []string{
    64  		"DynamicBytesFile",
    65  		"queue",
    66  	}
    67  }
    68  
    69  func (q *queueInode) beforeSave() {}
    70  
    71  // +checklocksignore
    72  func (q *queueInode) StateSave(stateSinkObject state.Sink) {
    73  	q.beforeSave()
    74  	stateSinkObject.Save(0, &q.DynamicBytesFile)
    75  	stateSinkObject.Save(1, &q.queue)
    76  }
    77  
    78  func (q *queueInode) afterLoad() {}
    79  
    80  // +checklocksignore
    81  func (q *queueInode) StateLoad(stateSourceObject state.Source) {
    82  	stateSourceObject.Load(0, &q.DynamicBytesFile)
    83  	stateSourceObject.Load(1, &q.queue)
    84  }
    85  
    86  func (fd *queueFD) StateTypeName() string {
    87  	return "pkg/sentry/fsimpl/mqfs.queueFD"
    88  }
    89  
    90  func (fd *queueFD) StateFields() []string {
    91  	return []string{
    92  		"FileDescriptionDefaultImpl",
    93  		"DynamicBytesFileDescriptionImpl",
    94  		"LockFD",
    95  		"vfsfd",
    96  		"inode",
    97  		"queue",
    98  	}
    99  }
   100  
   101  func (fd *queueFD) beforeSave() {}
   102  
   103  // +checklocksignore
   104  func (fd *queueFD) StateSave(stateSinkObject state.Sink) {
   105  	fd.beforeSave()
   106  	stateSinkObject.Save(0, &fd.FileDescriptionDefaultImpl)
   107  	stateSinkObject.Save(1, &fd.DynamicBytesFileDescriptionImpl)
   108  	stateSinkObject.Save(2, &fd.LockFD)
   109  	stateSinkObject.Save(3, &fd.vfsfd)
   110  	stateSinkObject.Save(4, &fd.inode)
   111  	stateSinkObject.Save(5, &fd.queue)
   112  }
   113  
   114  func (fd *queueFD) afterLoad() {}
   115  
   116  // +checklocksignore
   117  func (fd *queueFD) StateLoad(stateSourceObject state.Source) {
   118  	stateSourceObject.Load(0, &fd.FileDescriptionDefaultImpl)
   119  	stateSourceObject.Load(1, &fd.DynamicBytesFileDescriptionImpl)
   120  	stateSourceObject.Load(2, &fd.LockFD)
   121  	stateSourceObject.Load(3, &fd.vfsfd)
   122  	stateSourceObject.Load(4, &fd.inode)
   123  	stateSourceObject.Load(5, &fd.queue)
   124  }
   125  
   126  func (r *RegistryImpl) StateTypeName() string {
   127  	return "pkg/sentry/fsimpl/mqfs.RegistryImpl"
   128  }
   129  
   130  func (r *RegistryImpl) StateFields() []string {
   131  	return []string{
   132  		"root",
   133  		"fs",
   134  		"mount",
   135  	}
   136  }
   137  
   138  func (r *RegistryImpl) beforeSave() {}
   139  
   140  // +checklocksignore
   141  func (r *RegistryImpl) StateSave(stateSinkObject state.Sink) {
   142  	r.beforeSave()
   143  	stateSinkObject.Save(0, &r.root)
   144  	stateSinkObject.Save(1, &r.fs)
   145  	stateSinkObject.Save(2, &r.mount)
   146  }
   147  
   148  func (r *RegistryImpl) afterLoad() {}
   149  
   150  // +checklocksignore
   151  func (r *RegistryImpl) StateLoad(stateSourceObject state.Source) {
   152  	stateSourceObject.Load(0, &r.root)
   153  	stateSourceObject.Load(1, &r.fs)
   154  	stateSourceObject.Load(2, &r.mount)
   155  }
   156  
   157  func (i *rootInode) StateTypeName() string {
   158  	return "pkg/sentry/fsimpl/mqfs.rootInode"
   159  }
   160  
   161  func (i *rootInode) StateFields() []string {
   162  	return []string{
   163  		"rootInodeRefs",
   164  		"InodeAlwaysValid",
   165  		"InodeAnonymous",
   166  		"InodeAttrs",
   167  		"InodeDirectoryNoNewChildren",
   168  		"InodeNotSymlink",
   169  		"InodeTemporary",
   170  		"InodeWatches",
   171  		"OrderedChildren",
   172  		"locks",
   173  	}
   174  }
   175  
   176  func (i *rootInode) beforeSave() {}
   177  
   178  // +checklocksignore
   179  func (i *rootInode) StateSave(stateSinkObject state.Sink) {
   180  	i.beforeSave()
   181  	stateSinkObject.Save(0, &i.rootInodeRefs)
   182  	stateSinkObject.Save(1, &i.InodeAlwaysValid)
   183  	stateSinkObject.Save(2, &i.InodeAnonymous)
   184  	stateSinkObject.Save(3, &i.InodeAttrs)
   185  	stateSinkObject.Save(4, &i.InodeDirectoryNoNewChildren)
   186  	stateSinkObject.Save(5, &i.InodeNotSymlink)
   187  	stateSinkObject.Save(6, &i.InodeTemporary)
   188  	stateSinkObject.Save(7, &i.InodeWatches)
   189  	stateSinkObject.Save(8, &i.OrderedChildren)
   190  	stateSinkObject.Save(9, &i.locks)
   191  }
   192  
   193  func (i *rootInode) afterLoad() {}
   194  
   195  // +checklocksignore
   196  func (i *rootInode) StateLoad(stateSourceObject state.Source) {
   197  	stateSourceObject.Load(0, &i.rootInodeRefs)
   198  	stateSourceObject.Load(1, &i.InodeAlwaysValid)
   199  	stateSourceObject.Load(2, &i.InodeAnonymous)
   200  	stateSourceObject.Load(3, &i.InodeAttrs)
   201  	stateSourceObject.Load(4, &i.InodeDirectoryNoNewChildren)
   202  	stateSourceObject.Load(5, &i.InodeNotSymlink)
   203  	stateSourceObject.Load(6, &i.InodeTemporary)
   204  	stateSourceObject.Load(7, &i.InodeWatches)
   205  	stateSourceObject.Load(8, &i.OrderedChildren)
   206  	stateSourceObject.Load(9, &i.locks)
   207  }
   208  
   209  func (r *rootInodeRefs) StateTypeName() string {
   210  	return "pkg/sentry/fsimpl/mqfs.rootInodeRefs"
   211  }
   212  
   213  func (r *rootInodeRefs) StateFields() []string {
   214  	return []string{
   215  		"refCount",
   216  	}
   217  }
   218  
   219  func (r *rootInodeRefs) beforeSave() {}
   220  
   221  // +checklocksignore
   222  func (r *rootInodeRefs) StateSave(stateSinkObject state.Sink) {
   223  	r.beforeSave()
   224  	stateSinkObject.Save(0, &r.refCount)
   225  }
   226  
   227  // +checklocksignore
   228  func (r *rootInodeRefs) StateLoad(stateSourceObject state.Source) {
   229  	stateSourceObject.Load(0, &r.refCount)
   230  	stateSourceObject.AfterLoad(r.afterLoad)
   231  }
   232  
   233  func init() {
   234  	state.Register((*FilesystemType)(nil))
   235  	state.Register((*filesystem)(nil))
   236  	state.Register((*queueInode)(nil))
   237  	state.Register((*queueFD)(nil))
   238  	state.Register((*RegistryImpl)(nil))
   239  	state.Register((*rootInode)(nil))
   240  	state.Register((*rootInodeRefs)(nil))
   241  }