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

     1  // automatically generated by stateify.
     2  
     3  package sys
     4  
     5  import (
     6  	"github.com/nicocha30/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (r *dirRefs) StateTypeName() string {
    10  	return "pkg/sentry/fsimpl/sys.dirRefs"
    11  }
    12  
    13  func (r *dirRefs) StateFields() []string {
    14  	return []string{
    15  		"refCount",
    16  	}
    17  }
    18  
    19  func (r *dirRefs) beforeSave() {}
    20  
    21  // +checklocksignore
    22  func (r *dirRefs) StateSave(stateSinkObject state.Sink) {
    23  	r.beforeSave()
    24  	stateSinkObject.Save(0, &r.refCount)
    25  }
    26  
    27  // +checklocksignore
    28  func (r *dirRefs) StateLoad(stateSourceObject state.Source) {
    29  	stateSourceObject.Load(0, &r.refCount)
    30  	stateSourceObject.AfterLoad(r.afterLoad)
    31  }
    32  
    33  func (i *kcovInode) StateTypeName() string {
    34  	return "pkg/sentry/fsimpl/sys.kcovInode"
    35  }
    36  
    37  func (i *kcovInode) StateFields() []string {
    38  	return []string{
    39  		"InodeAttrs",
    40  		"InodeNoopRefCount",
    41  		"InodeNotAnonymous",
    42  		"InodeNotDirectory",
    43  		"InodeNotSymlink",
    44  		"InodeWatches",
    45  		"implStatFS",
    46  	}
    47  }
    48  
    49  func (i *kcovInode) beforeSave() {}
    50  
    51  // +checklocksignore
    52  func (i *kcovInode) StateSave(stateSinkObject state.Sink) {
    53  	i.beforeSave()
    54  	stateSinkObject.Save(0, &i.InodeAttrs)
    55  	stateSinkObject.Save(1, &i.InodeNoopRefCount)
    56  	stateSinkObject.Save(2, &i.InodeNotAnonymous)
    57  	stateSinkObject.Save(3, &i.InodeNotDirectory)
    58  	stateSinkObject.Save(4, &i.InodeNotSymlink)
    59  	stateSinkObject.Save(5, &i.InodeWatches)
    60  	stateSinkObject.Save(6, &i.implStatFS)
    61  }
    62  
    63  func (i *kcovInode) afterLoad() {}
    64  
    65  // +checklocksignore
    66  func (i *kcovInode) StateLoad(stateSourceObject state.Source) {
    67  	stateSourceObject.Load(0, &i.InodeAttrs)
    68  	stateSourceObject.Load(1, &i.InodeNoopRefCount)
    69  	stateSourceObject.Load(2, &i.InodeNotAnonymous)
    70  	stateSourceObject.Load(3, &i.InodeNotDirectory)
    71  	stateSourceObject.Load(4, &i.InodeNotSymlink)
    72  	stateSourceObject.Load(5, &i.InodeWatches)
    73  	stateSourceObject.Load(6, &i.implStatFS)
    74  }
    75  
    76  func (fd *kcovFD) StateTypeName() string {
    77  	return "pkg/sentry/fsimpl/sys.kcovFD"
    78  }
    79  
    80  func (fd *kcovFD) StateFields() []string {
    81  	return []string{
    82  		"FileDescriptionDefaultImpl",
    83  		"NoLockFD",
    84  		"vfsfd",
    85  		"inode",
    86  		"kcov",
    87  	}
    88  }
    89  
    90  func (fd *kcovFD) beforeSave() {}
    91  
    92  // +checklocksignore
    93  func (fd *kcovFD) StateSave(stateSinkObject state.Sink) {
    94  	fd.beforeSave()
    95  	stateSinkObject.Save(0, &fd.FileDescriptionDefaultImpl)
    96  	stateSinkObject.Save(1, &fd.NoLockFD)
    97  	stateSinkObject.Save(2, &fd.vfsfd)
    98  	stateSinkObject.Save(3, &fd.inode)
    99  	stateSinkObject.Save(4, &fd.kcov)
   100  }
   101  
   102  func (fd *kcovFD) afterLoad() {}
   103  
   104  // +checklocksignore
   105  func (fd *kcovFD) StateLoad(stateSourceObject state.Source) {
   106  	stateSourceObject.Load(0, &fd.FileDescriptionDefaultImpl)
   107  	stateSourceObject.Load(1, &fd.NoLockFD)
   108  	stateSourceObject.Load(2, &fd.vfsfd)
   109  	stateSourceObject.Load(3, &fd.inode)
   110  	stateSourceObject.Load(4, &fd.kcov)
   111  }
   112  
   113  func (gf *groTimeoutFile) StateTypeName() string {
   114  	return "pkg/sentry/fsimpl/sys.groTimeoutFile"
   115  }
   116  
   117  func (gf *groTimeoutFile) StateFields() []string {
   118  	return []string{
   119  		"implStatFS",
   120  		"DynamicBytesFile",
   121  		"idx",
   122  		"stk",
   123  	}
   124  }
   125  
   126  func (gf *groTimeoutFile) beforeSave() {}
   127  
   128  // +checklocksignore
   129  func (gf *groTimeoutFile) StateSave(stateSinkObject state.Sink) {
   130  	gf.beforeSave()
   131  	stateSinkObject.Save(0, &gf.implStatFS)
   132  	stateSinkObject.Save(1, &gf.DynamicBytesFile)
   133  	stateSinkObject.Save(2, &gf.idx)
   134  	stateSinkObject.Save(3, &gf.stk)
   135  }
   136  
   137  func (gf *groTimeoutFile) afterLoad() {}
   138  
   139  // +checklocksignore
   140  func (gf *groTimeoutFile) StateLoad(stateSourceObject state.Source) {
   141  	stateSourceObject.Load(0, &gf.implStatFS)
   142  	stateSourceObject.Load(1, &gf.DynamicBytesFile)
   143  	stateSourceObject.Load(2, &gf.idx)
   144  	stateSourceObject.Load(3, &gf.stk)
   145  }
   146  
   147  func (fsType *FilesystemType) StateTypeName() string {
   148  	return "pkg/sentry/fsimpl/sys.FilesystemType"
   149  }
   150  
   151  func (fsType *FilesystemType) StateFields() []string {
   152  	return []string{}
   153  }
   154  
   155  func (fsType *FilesystemType) beforeSave() {}
   156  
   157  // +checklocksignore
   158  func (fsType *FilesystemType) StateSave(stateSinkObject state.Sink) {
   159  	fsType.beforeSave()
   160  }
   161  
   162  func (fsType *FilesystemType) afterLoad() {}
   163  
   164  // +checklocksignore
   165  func (fsType *FilesystemType) StateLoad(stateSourceObject state.Source) {
   166  }
   167  
   168  func (i *InternalData) StateTypeName() string {
   169  	return "pkg/sentry/fsimpl/sys.InternalData"
   170  }
   171  
   172  func (i *InternalData) StateFields() []string {
   173  	return []string{
   174  		"ProductName",
   175  		"EnableAccelSysfs",
   176  	}
   177  }
   178  
   179  func (i *InternalData) beforeSave() {}
   180  
   181  // +checklocksignore
   182  func (i *InternalData) StateSave(stateSinkObject state.Sink) {
   183  	i.beforeSave()
   184  	stateSinkObject.Save(0, &i.ProductName)
   185  	stateSinkObject.Save(1, &i.EnableAccelSysfs)
   186  }
   187  
   188  func (i *InternalData) afterLoad() {}
   189  
   190  // +checklocksignore
   191  func (i *InternalData) StateLoad(stateSourceObject state.Source) {
   192  	stateSourceObject.Load(0, &i.ProductName)
   193  	stateSourceObject.Load(1, &i.EnableAccelSysfs)
   194  }
   195  
   196  func (fs *filesystem) StateTypeName() string {
   197  	return "pkg/sentry/fsimpl/sys.filesystem"
   198  }
   199  
   200  func (fs *filesystem) StateFields() []string {
   201  	return []string{
   202  		"Filesystem",
   203  		"devMinor",
   204  	}
   205  }
   206  
   207  func (fs *filesystem) beforeSave() {}
   208  
   209  // +checklocksignore
   210  func (fs *filesystem) StateSave(stateSinkObject state.Sink) {
   211  	fs.beforeSave()
   212  	stateSinkObject.Save(0, &fs.Filesystem)
   213  	stateSinkObject.Save(1, &fs.devMinor)
   214  }
   215  
   216  func (fs *filesystem) afterLoad() {}
   217  
   218  // +checklocksignore
   219  func (fs *filesystem) StateLoad(stateSourceObject state.Source) {
   220  	stateSourceObject.Load(0, &fs.Filesystem)
   221  	stateSourceObject.Load(1, &fs.devMinor)
   222  }
   223  
   224  func (d *dir) StateTypeName() string {
   225  	return "pkg/sentry/fsimpl/sys.dir"
   226  }
   227  
   228  func (d *dir) StateFields() []string {
   229  	return []string{
   230  		"dirRefs",
   231  		"InodeAlwaysValid",
   232  		"InodeAttrs",
   233  		"InodeDirectoryNoNewChildren",
   234  		"InodeNotAnonymous",
   235  		"InodeNotSymlink",
   236  		"InodeTemporary",
   237  		"InodeWatches",
   238  		"OrderedChildren",
   239  		"locks",
   240  	}
   241  }
   242  
   243  func (d *dir) beforeSave() {}
   244  
   245  // +checklocksignore
   246  func (d *dir) StateSave(stateSinkObject state.Sink) {
   247  	d.beforeSave()
   248  	stateSinkObject.Save(0, &d.dirRefs)
   249  	stateSinkObject.Save(1, &d.InodeAlwaysValid)
   250  	stateSinkObject.Save(2, &d.InodeAttrs)
   251  	stateSinkObject.Save(3, &d.InodeDirectoryNoNewChildren)
   252  	stateSinkObject.Save(4, &d.InodeNotAnonymous)
   253  	stateSinkObject.Save(5, &d.InodeNotSymlink)
   254  	stateSinkObject.Save(6, &d.InodeTemporary)
   255  	stateSinkObject.Save(7, &d.InodeWatches)
   256  	stateSinkObject.Save(8, &d.OrderedChildren)
   257  	stateSinkObject.Save(9, &d.locks)
   258  }
   259  
   260  func (d *dir) afterLoad() {}
   261  
   262  // +checklocksignore
   263  func (d *dir) StateLoad(stateSourceObject state.Source) {
   264  	stateSourceObject.Load(0, &d.dirRefs)
   265  	stateSourceObject.Load(1, &d.InodeAlwaysValid)
   266  	stateSourceObject.Load(2, &d.InodeAttrs)
   267  	stateSourceObject.Load(3, &d.InodeDirectoryNoNewChildren)
   268  	stateSourceObject.Load(4, &d.InodeNotAnonymous)
   269  	stateSourceObject.Load(5, &d.InodeNotSymlink)
   270  	stateSourceObject.Load(6, &d.InodeTemporary)
   271  	stateSourceObject.Load(7, &d.InodeWatches)
   272  	stateSourceObject.Load(8, &d.OrderedChildren)
   273  	stateSourceObject.Load(9, &d.locks)
   274  }
   275  
   276  func (c *cpuFile) StateTypeName() string {
   277  	return "pkg/sentry/fsimpl/sys.cpuFile"
   278  }
   279  
   280  func (c *cpuFile) StateFields() []string {
   281  	return []string{
   282  		"implStatFS",
   283  		"DynamicBytesFile",
   284  		"maxCores",
   285  	}
   286  }
   287  
   288  func (c *cpuFile) beforeSave() {}
   289  
   290  // +checklocksignore
   291  func (c *cpuFile) StateSave(stateSinkObject state.Sink) {
   292  	c.beforeSave()
   293  	stateSinkObject.Save(0, &c.implStatFS)
   294  	stateSinkObject.Save(1, &c.DynamicBytesFile)
   295  	stateSinkObject.Save(2, &c.maxCores)
   296  }
   297  
   298  func (c *cpuFile) afterLoad() {}
   299  
   300  // +checklocksignore
   301  func (c *cpuFile) StateLoad(stateSourceObject state.Source) {
   302  	stateSourceObject.Load(0, &c.implStatFS)
   303  	stateSourceObject.Load(1, &c.DynamicBytesFile)
   304  	stateSourceObject.Load(2, &c.maxCores)
   305  }
   306  
   307  func (i *implStatFS) StateTypeName() string {
   308  	return "pkg/sentry/fsimpl/sys.implStatFS"
   309  }
   310  
   311  func (i *implStatFS) StateFields() []string {
   312  	return []string{}
   313  }
   314  
   315  func (i *implStatFS) beforeSave() {}
   316  
   317  // +checklocksignore
   318  func (i *implStatFS) StateSave(stateSinkObject state.Sink) {
   319  	i.beforeSave()
   320  }
   321  
   322  func (i *implStatFS) afterLoad() {}
   323  
   324  // +checklocksignore
   325  func (i *implStatFS) StateLoad(stateSourceObject state.Source) {
   326  }
   327  
   328  func (s *staticFile) StateTypeName() string {
   329  	return "pkg/sentry/fsimpl/sys.staticFile"
   330  }
   331  
   332  func (s *staticFile) StateFields() []string {
   333  	return []string{
   334  		"DynamicBytesFile",
   335  		"StaticData",
   336  	}
   337  }
   338  
   339  func (s *staticFile) beforeSave() {}
   340  
   341  // +checklocksignore
   342  func (s *staticFile) StateSave(stateSinkObject state.Sink) {
   343  	s.beforeSave()
   344  	stateSinkObject.Save(0, &s.DynamicBytesFile)
   345  	stateSinkObject.Save(1, &s.StaticData)
   346  }
   347  
   348  func (s *staticFile) afterLoad() {}
   349  
   350  // +checklocksignore
   351  func (s *staticFile) StateLoad(stateSourceObject state.Source) {
   352  	stateSourceObject.Load(0, &s.DynamicBytesFile)
   353  	stateSourceObject.Load(1, &s.StaticData)
   354  }
   355  
   356  func (hf *hostFile) StateTypeName() string {
   357  	return "pkg/sentry/fsimpl/sys.hostFile"
   358  }
   359  
   360  func (hf *hostFile) StateFields() []string {
   361  	return []string{
   362  		"DynamicBytesFile",
   363  		"hostPath",
   364  	}
   365  }
   366  
   367  func (hf *hostFile) beforeSave() {}
   368  
   369  // +checklocksignore
   370  func (hf *hostFile) StateSave(stateSinkObject state.Sink) {
   371  	hf.beforeSave()
   372  	stateSinkObject.Save(0, &hf.DynamicBytesFile)
   373  	stateSinkObject.Save(1, &hf.hostPath)
   374  }
   375  
   376  func (hf *hostFile) afterLoad() {}
   377  
   378  // +checklocksignore
   379  func (hf *hostFile) StateLoad(stateSourceObject state.Source) {
   380  	stateSourceObject.Load(0, &hf.DynamicBytesFile)
   381  	stateSourceObject.Load(1, &hf.hostPath)
   382  }
   383  
   384  func init() {
   385  	state.Register((*dirRefs)(nil))
   386  	state.Register((*kcovInode)(nil))
   387  	state.Register((*kcovFD)(nil))
   388  	state.Register((*groTimeoutFile)(nil))
   389  	state.Register((*FilesystemType)(nil))
   390  	state.Register((*InternalData)(nil))
   391  	state.Register((*filesystem)(nil))
   392  	state.Register((*dir)(nil))
   393  	state.Register((*cpuFile)(nil))
   394  	state.Register((*implStatFS)(nil))
   395  	state.Register((*staticFile)(nil))
   396  	state.Register((*hostFile)(nil))
   397  }