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

     1  // automatically generated by stateify.
     2  
     3  package kernfs
     4  
     5  import (
     6  	"github.com/nicocha30/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (l *dentryList) StateTypeName() string {
    10  	return "pkg/sentry/fsimpl/kernfs.dentryList"
    11  }
    12  
    13  func (l *dentryList) StateFields() []string {
    14  	return []string{
    15  		"head",
    16  		"tail",
    17  	}
    18  }
    19  
    20  func (l *dentryList) beforeSave() {}
    21  
    22  // +checklocksignore
    23  func (l *dentryList) StateSave(stateSinkObject state.Sink) {
    24  	l.beforeSave()
    25  	stateSinkObject.Save(0, &l.head)
    26  	stateSinkObject.Save(1, &l.tail)
    27  }
    28  
    29  func (l *dentryList) afterLoad() {}
    30  
    31  // +checklocksignore
    32  func (l *dentryList) StateLoad(stateSourceObject state.Source) {
    33  	stateSourceObject.Load(0, &l.head)
    34  	stateSourceObject.Load(1, &l.tail)
    35  }
    36  
    37  func (e *dentryEntry) StateTypeName() string {
    38  	return "pkg/sentry/fsimpl/kernfs.dentryEntry"
    39  }
    40  
    41  func (e *dentryEntry) StateFields() []string {
    42  	return []string{
    43  		"next",
    44  		"prev",
    45  	}
    46  }
    47  
    48  func (e *dentryEntry) beforeSave() {}
    49  
    50  // +checklocksignore
    51  func (e *dentryEntry) StateSave(stateSinkObject state.Sink) {
    52  	e.beforeSave()
    53  	stateSinkObject.Save(0, &e.next)
    54  	stateSinkObject.Save(1, &e.prev)
    55  }
    56  
    57  func (e *dentryEntry) afterLoad() {}
    58  
    59  // +checklocksignore
    60  func (e *dentryEntry) StateLoad(stateSourceObject state.Source) {
    61  	stateSourceObject.Load(0, &e.next)
    62  	stateSourceObject.Load(1, &e.prev)
    63  }
    64  
    65  func (f *DynamicBytesFile) StateTypeName() string {
    66  	return "pkg/sentry/fsimpl/kernfs.DynamicBytesFile"
    67  }
    68  
    69  func (f *DynamicBytesFile) StateFields() []string {
    70  	return []string{
    71  		"InodeAttrs",
    72  		"InodeNoStatFS",
    73  		"InodeNoopRefCount",
    74  		"InodeNotAnonymous",
    75  		"InodeNotDirectory",
    76  		"InodeNotSymlink",
    77  		"InodeWatches",
    78  		"locks",
    79  		"data",
    80  	}
    81  }
    82  
    83  func (f *DynamicBytesFile) beforeSave() {}
    84  
    85  // +checklocksignore
    86  func (f *DynamicBytesFile) StateSave(stateSinkObject state.Sink) {
    87  	f.beforeSave()
    88  	stateSinkObject.Save(0, &f.InodeAttrs)
    89  	stateSinkObject.Save(1, &f.InodeNoStatFS)
    90  	stateSinkObject.Save(2, &f.InodeNoopRefCount)
    91  	stateSinkObject.Save(3, &f.InodeNotAnonymous)
    92  	stateSinkObject.Save(4, &f.InodeNotDirectory)
    93  	stateSinkObject.Save(5, &f.InodeNotSymlink)
    94  	stateSinkObject.Save(6, &f.InodeWatches)
    95  	stateSinkObject.Save(7, &f.locks)
    96  	stateSinkObject.Save(8, &f.data)
    97  }
    98  
    99  func (f *DynamicBytesFile) afterLoad() {}
   100  
   101  // +checklocksignore
   102  func (f *DynamicBytesFile) StateLoad(stateSourceObject state.Source) {
   103  	stateSourceObject.Load(0, &f.InodeAttrs)
   104  	stateSourceObject.Load(1, &f.InodeNoStatFS)
   105  	stateSourceObject.Load(2, &f.InodeNoopRefCount)
   106  	stateSourceObject.Load(3, &f.InodeNotAnonymous)
   107  	stateSourceObject.Load(4, &f.InodeNotDirectory)
   108  	stateSourceObject.Load(5, &f.InodeNotSymlink)
   109  	stateSourceObject.Load(6, &f.InodeWatches)
   110  	stateSourceObject.Load(7, &f.locks)
   111  	stateSourceObject.Load(8, &f.data)
   112  }
   113  
   114  func (fd *DynamicBytesFD) StateTypeName() string {
   115  	return "pkg/sentry/fsimpl/kernfs.DynamicBytesFD"
   116  }
   117  
   118  func (fd *DynamicBytesFD) StateFields() []string {
   119  	return []string{
   120  		"FileDescriptionDefaultImpl",
   121  		"DynamicBytesFileDescriptionImpl",
   122  		"LockFD",
   123  		"vfsfd",
   124  		"inode",
   125  	}
   126  }
   127  
   128  func (fd *DynamicBytesFD) beforeSave() {}
   129  
   130  // +checklocksignore
   131  func (fd *DynamicBytesFD) StateSave(stateSinkObject state.Sink) {
   132  	fd.beforeSave()
   133  	stateSinkObject.Save(0, &fd.FileDescriptionDefaultImpl)
   134  	stateSinkObject.Save(1, &fd.DynamicBytesFileDescriptionImpl)
   135  	stateSinkObject.Save(2, &fd.LockFD)
   136  	stateSinkObject.Save(3, &fd.vfsfd)
   137  	stateSinkObject.Save(4, &fd.inode)
   138  }
   139  
   140  func (fd *DynamicBytesFD) afterLoad() {}
   141  
   142  // +checklocksignore
   143  func (fd *DynamicBytesFD) StateLoad(stateSourceObject state.Source) {
   144  	stateSourceObject.Load(0, &fd.FileDescriptionDefaultImpl)
   145  	stateSourceObject.Load(1, &fd.DynamicBytesFileDescriptionImpl)
   146  	stateSourceObject.Load(2, &fd.LockFD)
   147  	stateSourceObject.Load(3, &fd.vfsfd)
   148  	stateSourceObject.Load(4, &fd.inode)
   149  }
   150  
   151  func (s *SeekEndConfig) StateTypeName() string {
   152  	return "pkg/sentry/fsimpl/kernfs.SeekEndConfig"
   153  }
   154  
   155  func (s *SeekEndConfig) StateFields() []string {
   156  	return nil
   157  }
   158  
   159  func (g *GenericDirectoryFDOptions) StateTypeName() string {
   160  	return "pkg/sentry/fsimpl/kernfs.GenericDirectoryFDOptions"
   161  }
   162  
   163  func (g *GenericDirectoryFDOptions) StateFields() []string {
   164  	return []string{
   165  		"SeekEnd",
   166  	}
   167  }
   168  
   169  func (g *GenericDirectoryFDOptions) beforeSave() {}
   170  
   171  // +checklocksignore
   172  func (g *GenericDirectoryFDOptions) StateSave(stateSinkObject state.Sink) {
   173  	g.beforeSave()
   174  	stateSinkObject.Save(0, &g.SeekEnd)
   175  }
   176  
   177  func (g *GenericDirectoryFDOptions) afterLoad() {}
   178  
   179  // +checklocksignore
   180  func (g *GenericDirectoryFDOptions) StateLoad(stateSourceObject state.Source) {
   181  	stateSourceObject.Load(0, &g.SeekEnd)
   182  }
   183  
   184  func (fd *GenericDirectoryFD) StateTypeName() string {
   185  	return "pkg/sentry/fsimpl/kernfs.GenericDirectoryFD"
   186  }
   187  
   188  func (fd *GenericDirectoryFD) StateFields() []string {
   189  	return []string{
   190  		"FileDescriptionDefaultImpl",
   191  		"DirectoryFileDescriptionDefaultImpl",
   192  		"LockFD",
   193  		"seekEnd",
   194  		"vfsfd",
   195  		"children",
   196  		"off",
   197  	}
   198  }
   199  
   200  func (fd *GenericDirectoryFD) beforeSave() {}
   201  
   202  // +checklocksignore
   203  func (fd *GenericDirectoryFD) StateSave(stateSinkObject state.Sink) {
   204  	fd.beforeSave()
   205  	stateSinkObject.Save(0, &fd.FileDescriptionDefaultImpl)
   206  	stateSinkObject.Save(1, &fd.DirectoryFileDescriptionDefaultImpl)
   207  	stateSinkObject.Save(2, &fd.LockFD)
   208  	stateSinkObject.Save(3, &fd.seekEnd)
   209  	stateSinkObject.Save(4, &fd.vfsfd)
   210  	stateSinkObject.Save(5, &fd.children)
   211  	stateSinkObject.Save(6, &fd.off)
   212  }
   213  
   214  func (fd *GenericDirectoryFD) afterLoad() {}
   215  
   216  // +checklocksignore
   217  func (fd *GenericDirectoryFD) StateLoad(stateSourceObject state.Source) {
   218  	stateSourceObject.Load(0, &fd.FileDescriptionDefaultImpl)
   219  	stateSourceObject.Load(1, &fd.DirectoryFileDescriptionDefaultImpl)
   220  	stateSourceObject.Load(2, &fd.LockFD)
   221  	stateSourceObject.Load(3, &fd.seekEnd)
   222  	stateSourceObject.Load(4, &fd.vfsfd)
   223  	stateSourceObject.Load(5, &fd.children)
   224  	stateSourceObject.Load(6, &fd.off)
   225  }
   226  
   227  func (i *InodeNoopRefCount) StateTypeName() string {
   228  	return "pkg/sentry/fsimpl/kernfs.InodeNoopRefCount"
   229  }
   230  
   231  func (i *InodeNoopRefCount) StateFields() []string {
   232  	return []string{
   233  		"InodeTemporary",
   234  	}
   235  }
   236  
   237  func (i *InodeNoopRefCount) beforeSave() {}
   238  
   239  // +checklocksignore
   240  func (i *InodeNoopRefCount) StateSave(stateSinkObject state.Sink) {
   241  	i.beforeSave()
   242  	stateSinkObject.Save(0, &i.InodeTemporary)
   243  }
   244  
   245  func (i *InodeNoopRefCount) afterLoad() {}
   246  
   247  // +checklocksignore
   248  func (i *InodeNoopRefCount) StateLoad(stateSourceObject state.Source) {
   249  	stateSourceObject.Load(0, &i.InodeTemporary)
   250  }
   251  
   252  func (i *InodeDirectoryNoNewChildren) StateTypeName() string {
   253  	return "pkg/sentry/fsimpl/kernfs.InodeDirectoryNoNewChildren"
   254  }
   255  
   256  func (i *InodeDirectoryNoNewChildren) StateFields() []string {
   257  	return []string{}
   258  }
   259  
   260  func (i *InodeDirectoryNoNewChildren) beforeSave() {}
   261  
   262  // +checklocksignore
   263  func (i *InodeDirectoryNoNewChildren) StateSave(stateSinkObject state.Sink) {
   264  	i.beforeSave()
   265  }
   266  
   267  func (i *InodeDirectoryNoNewChildren) afterLoad() {}
   268  
   269  // +checklocksignore
   270  func (i *InodeDirectoryNoNewChildren) StateLoad(stateSourceObject state.Source) {
   271  }
   272  
   273  func (i *InodeNotDirectory) StateTypeName() string {
   274  	return "pkg/sentry/fsimpl/kernfs.InodeNotDirectory"
   275  }
   276  
   277  func (i *InodeNotDirectory) StateFields() []string {
   278  	return []string{
   279  		"InodeAlwaysValid",
   280  	}
   281  }
   282  
   283  func (i *InodeNotDirectory) beforeSave() {}
   284  
   285  // +checklocksignore
   286  func (i *InodeNotDirectory) StateSave(stateSinkObject state.Sink) {
   287  	i.beforeSave()
   288  	stateSinkObject.Save(0, &i.InodeAlwaysValid)
   289  }
   290  
   291  func (i *InodeNotDirectory) afterLoad() {}
   292  
   293  // +checklocksignore
   294  func (i *InodeNotDirectory) StateLoad(stateSourceObject state.Source) {
   295  	stateSourceObject.Load(0, &i.InodeAlwaysValid)
   296  }
   297  
   298  func (i *InodeNotSymlink) StateTypeName() string {
   299  	return "pkg/sentry/fsimpl/kernfs.InodeNotSymlink"
   300  }
   301  
   302  func (i *InodeNotSymlink) StateFields() []string {
   303  	return []string{}
   304  }
   305  
   306  func (i *InodeNotSymlink) beforeSave() {}
   307  
   308  // +checklocksignore
   309  func (i *InodeNotSymlink) StateSave(stateSinkObject state.Sink) {
   310  	i.beforeSave()
   311  }
   312  
   313  func (i *InodeNotSymlink) afterLoad() {}
   314  
   315  // +checklocksignore
   316  func (i *InodeNotSymlink) StateLoad(stateSourceObject state.Source) {
   317  }
   318  
   319  func (a *InodeAttrs) StateTypeName() string {
   320  	return "pkg/sentry/fsimpl/kernfs.InodeAttrs"
   321  }
   322  
   323  func (a *InodeAttrs) StateFields() []string {
   324  	return []string{
   325  		"devMajor",
   326  		"devMinor",
   327  		"ino",
   328  		"mode",
   329  		"uid",
   330  		"gid",
   331  		"nlink",
   332  		"blockSize",
   333  		"atime",
   334  		"mtime",
   335  		"ctime",
   336  	}
   337  }
   338  
   339  func (a *InodeAttrs) beforeSave() {}
   340  
   341  // +checklocksignore
   342  func (a *InodeAttrs) StateSave(stateSinkObject state.Sink) {
   343  	a.beforeSave()
   344  	stateSinkObject.Save(0, &a.devMajor)
   345  	stateSinkObject.Save(1, &a.devMinor)
   346  	stateSinkObject.Save(2, &a.ino)
   347  	stateSinkObject.Save(3, &a.mode)
   348  	stateSinkObject.Save(4, &a.uid)
   349  	stateSinkObject.Save(5, &a.gid)
   350  	stateSinkObject.Save(6, &a.nlink)
   351  	stateSinkObject.Save(7, &a.blockSize)
   352  	stateSinkObject.Save(8, &a.atime)
   353  	stateSinkObject.Save(9, &a.mtime)
   354  	stateSinkObject.Save(10, &a.ctime)
   355  }
   356  
   357  func (a *InodeAttrs) afterLoad() {}
   358  
   359  // +checklocksignore
   360  func (a *InodeAttrs) StateLoad(stateSourceObject state.Source) {
   361  	stateSourceObject.Load(0, &a.devMajor)
   362  	stateSourceObject.Load(1, &a.devMinor)
   363  	stateSourceObject.Load(2, &a.ino)
   364  	stateSourceObject.Load(3, &a.mode)
   365  	stateSourceObject.Load(4, &a.uid)
   366  	stateSourceObject.Load(5, &a.gid)
   367  	stateSourceObject.Load(6, &a.nlink)
   368  	stateSourceObject.Load(7, &a.blockSize)
   369  	stateSourceObject.Load(8, &a.atime)
   370  	stateSourceObject.Load(9, &a.mtime)
   371  	stateSourceObject.Load(10, &a.ctime)
   372  }
   373  
   374  func (s *slot) StateTypeName() string {
   375  	return "pkg/sentry/fsimpl/kernfs.slot"
   376  }
   377  
   378  func (s *slot) StateFields() []string {
   379  	return []string{
   380  		"name",
   381  		"inode",
   382  		"static",
   383  		"slotEntry",
   384  	}
   385  }
   386  
   387  func (s *slot) beforeSave() {}
   388  
   389  // +checklocksignore
   390  func (s *slot) StateSave(stateSinkObject state.Sink) {
   391  	s.beforeSave()
   392  	stateSinkObject.Save(0, &s.name)
   393  	stateSinkObject.Save(1, &s.inode)
   394  	stateSinkObject.Save(2, &s.static)
   395  	stateSinkObject.Save(3, &s.slotEntry)
   396  }
   397  
   398  func (s *slot) afterLoad() {}
   399  
   400  // +checklocksignore
   401  func (s *slot) StateLoad(stateSourceObject state.Source) {
   402  	stateSourceObject.Load(0, &s.name)
   403  	stateSourceObject.Load(1, &s.inode)
   404  	stateSourceObject.Load(2, &s.static)
   405  	stateSourceObject.Load(3, &s.slotEntry)
   406  }
   407  
   408  func (o *OrderedChildrenOptions) StateTypeName() string {
   409  	return "pkg/sentry/fsimpl/kernfs.OrderedChildrenOptions"
   410  }
   411  
   412  func (o *OrderedChildrenOptions) StateFields() []string {
   413  	return []string{
   414  		"Writable",
   415  	}
   416  }
   417  
   418  func (o *OrderedChildrenOptions) beforeSave() {}
   419  
   420  // +checklocksignore
   421  func (o *OrderedChildrenOptions) StateSave(stateSinkObject state.Sink) {
   422  	o.beforeSave()
   423  	stateSinkObject.Save(0, &o.Writable)
   424  }
   425  
   426  func (o *OrderedChildrenOptions) afterLoad() {}
   427  
   428  // +checklocksignore
   429  func (o *OrderedChildrenOptions) StateLoad(stateSourceObject state.Source) {
   430  	stateSourceObject.Load(0, &o.Writable)
   431  }
   432  
   433  func (o *OrderedChildren) StateTypeName() string {
   434  	return "pkg/sentry/fsimpl/kernfs.OrderedChildren"
   435  }
   436  
   437  func (o *OrderedChildren) StateFields() []string {
   438  	return []string{
   439  		"writable",
   440  		"order",
   441  		"set",
   442  	}
   443  }
   444  
   445  func (o *OrderedChildren) beforeSave() {}
   446  
   447  // +checklocksignore
   448  func (o *OrderedChildren) StateSave(stateSinkObject state.Sink) {
   449  	o.beforeSave()
   450  	stateSinkObject.Save(0, &o.writable)
   451  	stateSinkObject.Save(1, &o.order)
   452  	stateSinkObject.Save(2, &o.set)
   453  }
   454  
   455  func (o *OrderedChildren) afterLoad() {}
   456  
   457  // +checklocksignore
   458  func (o *OrderedChildren) StateLoad(stateSourceObject state.Source) {
   459  	stateSourceObject.Load(0, &o.writable)
   460  	stateSourceObject.Load(1, &o.order)
   461  	stateSourceObject.Load(2, &o.set)
   462  }
   463  
   464  func (i *InodeSymlink) StateTypeName() string {
   465  	return "pkg/sentry/fsimpl/kernfs.InodeSymlink"
   466  }
   467  
   468  func (i *InodeSymlink) StateFields() []string {
   469  	return []string{
   470  		"InodeNotDirectory",
   471  	}
   472  }
   473  
   474  func (i *InodeSymlink) beforeSave() {}
   475  
   476  // +checklocksignore
   477  func (i *InodeSymlink) StateSave(stateSinkObject state.Sink) {
   478  	i.beforeSave()
   479  	stateSinkObject.Save(0, &i.InodeNotDirectory)
   480  }
   481  
   482  func (i *InodeSymlink) afterLoad() {}
   483  
   484  // +checklocksignore
   485  func (i *InodeSymlink) StateLoad(stateSourceObject state.Source) {
   486  	stateSourceObject.Load(0, &i.InodeNotDirectory)
   487  }
   488  
   489  func (s *StaticDirectory) StateTypeName() string {
   490  	return "pkg/sentry/fsimpl/kernfs.StaticDirectory"
   491  }
   492  
   493  func (s *StaticDirectory) StateFields() []string {
   494  	return []string{
   495  		"InodeAlwaysValid",
   496  		"InodeAttrs",
   497  		"InodeDirectoryNoNewChildren",
   498  		"InodeNoStatFS",
   499  		"InodeNotAnonymous",
   500  		"InodeNotSymlink",
   501  		"InodeTemporary",
   502  		"InodeWatches",
   503  		"OrderedChildren",
   504  		"StaticDirectoryRefs",
   505  		"locks",
   506  		"fdOpts",
   507  	}
   508  }
   509  
   510  func (s *StaticDirectory) beforeSave() {}
   511  
   512  // +checklocksignore
   513  func (s *StaticDirectory) StateSave(stateSinkObject state.Sink) {
   514  	s.beforeSave()
   515  	stateSinkObject.Save(0, &s.InodeAlwaysValid)
   516  	stateSinkObject.Save(1, &s.InodeAttrs)
   517  	stateSinkObject.Save(2, &s.InodeDirectoryNoNewChildren)
   518  	stateSinkObject.Save(3, &s.InodeNoStatFS)
   519  	stateSinkObject.Save(4, &s.InodeNotAnonymous)
   520  	stateSinkObject.Save(5, &s.InodeNotSymlink)
   521  	stateSinkObject.Save(6, &s.InodeTemporary)
   522  	stateSinkObject.Save(7, &s.InodeWatches)
   523  	stateSinkObject.Save(8, &s.OrderedChildren)
   524  	stateSinkObject.Save(9, &s.StaticDirectoryRefs)
   525  	stateSinkObject.Save(10, &s.locks)
   526  	stateSinkObject.Save(11, &s.fdOpts)
   527  }
   528  
   529  func (s *StaticDirectory) afterLoad() {}
   530  
   531  // +checklocksignore
   532  func (s *StaticDirectory) StateLoad(stateSourceObject state.Source) {
   533  	stateSourceObject.Load(0, &s.InodeAlwaysValid)
   534  	stateSourceObject.Load(1, &s.InodeAttrs)
   535  	stateSourceObject.Load(2, &s.InodeDirectoryNoNewChildren)
   536  	stateSourceObject.Load(3, &s.InodeNoStatFS)
   537  	stateSourceObject.Load(4, &s.InodeNotAnonymous)
   538  	stateSourceObject.Load(5, &s.InodeNotSymlink)
   539  	stateSourceObject.Load(6, &s.InodeTemporary)
   540  	stateSourceObject.Load(7, &s.InodeWatches)
   541  	stateSourceObject.Load(8, &s.OrderedChildren)
   542  	stateSourceObject.Load(9, &s.StaticDirectoryRefs)
   543  	stateSourceObject.Load(10, &s.locks)
   544  	stateSourceObject.Load(11, &s.fdOpts)
   545  }
   546  
   547  func (i *InodeAlwaysValid) StateTypeName() string {
   548  	return "pkg/sentry/fsimpl/kernfs.InodeAlwaysValid"
   549  }
   550  
   551  func (i *InodeAlwaysValid) StateFields() []string {
   552  	return []string{}
   553  }
   554  
   555  func (i *InodeAlwaysValid) beforeSave() {}
   556  
   557  // +checklocksignore
   558  func (i *InodeAlwaysValid) StateSave(stateSinkObject state.Sink) {
   559  	i.beforeSave()
   560  }
   561  
   562  func (i *InodeAlwaysValid) afterLoad() {}
   563  
   564  // +checklocksignore
   565  func (i *InodeAlwaysValid) StateLoad(stateSourceObject state.Source) {
   566  }
   567  
   568  func (i *InodeTemporary) StateTypeName() string {
   569  	return "pkg/sentry/fsimpl/kernfs.InodeTemporary"
   570  }
   571  
   572  func (i *InodeTemporary) StateFields() []string {
   573  	return []string{}
   574  }
   575  
   576  func (i *InodeTemporary) beforeSave() {}
   577  
   578  // +checklocksignore
   579  func (i *InodeTemporary) StateSave(stateSinkObject state.Sink) {
   580  	i.beforeSave()
   581  }
   582  
   583  func (i *InodeTemporary) afterLoad() {}
   584  
   585  // +checklocksignore
   586  func (i *InodeTemporary) StateLoad(stateSourceObject state.Source) {
   587  }
   588  
   589  func (i *InodeNoStatFS) StateTypeName() string {
   590  	return "pkg/sentry/fsimpl/kernfs.InodeNoStatFS"
   591  }
   592  
   593  func (i *InodeNoStatFS) StateFields() []string {
   594  	return []string{}
   595  }
   596  
   597  func (i *InodeNoStatFS) beforeSave() {}
   598  
   599  // +checklocksignore
   600  func (i *InodeNoStatFS) StateSave(stateSinkObject state.Sink) {
   601  	i.beforeSave()
   602  }
   603  
   604  func (i *InodeNoStatFS) afterLoad() {}
   605  
   606  // +checklocksignore
   607  func (i *InodeNoStatFS) StateLoad(stateSourceObject state.Source) {
   608  }
   609  
   610  func (i *InodeWatches) StateTypeName() string {
   611  	return "pkg/sentry/fsimpl/kernfs.InodeWatches"
   612  }
   613  
   614  func (i *InodeWatches) StateFields() []string {
   615  	return []string{
   616  		"watches",
   617  	}
   618  }
   619  
   620  func (i *InodeWatches) beforeSave() {}
   621  
   622  // +checklocksignore
   623  func (i *InodeWatches) StateSave(stateSinkObject state.Sink) {
   624  	i.beforeSave()
   625  	stateSinkObject.Save(0, &i.watches)
   626  }
   627  
   628  func (i *InodeWatches) afterLoad() {}
   629  
   630  // +checklocksignore
   631  func (i *InodeWatches) StateLoad(stateSourceObject state.Source) {
   632  	stateSourceObject.Load(0, &i.watches)
   633  }
   634  
   635  func (i *InodeAnonymous) StateTypeName() string {
   636  	return "pkg/sentry/fsimpl/kernfs.InodeAnonymous"
   637  }
   638  
   639  func (i *InodeAnonymous) StateFields() []string {
   640  	return []string{}
   641  }
   642  
   643  func (i *InodeAnonymous) beforeSave() {}
   644  
   645  // +checklocksignore
   646  func (i *InodeAnonymous) StateSave(stateSinkObject state.Sink) {
   647  	i.beforeSave()
   648  }
   649  
   650  func (i *InodeAnonymous) afterLoad() {}
   651  
   652  // +checklocksignore
   653  func (i *InodeAnonymous) StateLoad(stateSourceObject state.Source) {
   654  }
   655  
   656  func (i *InodeNotAnonymous) StateTypeName() string {
   657  	return "pkg/sentry/fsimpl/kernfs.InodeNotAnonymous"
   658  }
   659  
   660  func (i *InodeNotAnonymous) StateFields() []string {
   661  	return []string{}
   662  }
   663  
   664  func (i *InodeNotAnonymous) beforeSave() {}
   665  
   666  // +checklocksignore
   667  func (i *InodeNotAnonymous) StateSave(stateSinkObject state.Sink) {
   668  	i.beforeSave()
   669  }
   670  
   671  func (i *InodeNotAnonymous) afterLoad() {}
   672  
   673  // +checklocksignore
   674  func (i *InodeNotAnonymous) StateLoad(stateSourceObject state.Source) {
   675  }
   676  
   677  func (fs *Filesystem) StateTypeName() string {
   678  	return "pkg/sentry/fsimpl/kernfs.Filesystem"
   679  }
   680  
   681  func (fs *Filesystem) StateFields() []string {
   682  	return []string{
   683  		"vfsfs",
   684  		"deferredDecRefs",
   685  		"nextInoMinusOne",
   686  		"cachedDentries",
   687  		"cachedDentriesLen",
   688  		"MaxCachedDentries",
   689  		"root",
   690  	}
   691  }
   692  
   693  func (fs *Filesystem) beforeSave() {}
   694  
   695  // +checklocksignore
   696  func (fs *Filesystem) StateSave(stateSinkObject state.Sink) {
   697  	fs.beforeSave()
   698  	stateSinkObject.Save(0, &fs.vfsfs)
   699  	stateSinkObject.Save(1, &fs.deferredDecRefs)
   700  	stateSinkObject.Save(2, &fs.nextInoMinusOne)
   701  	stateSinkObject.Save(3, &fs.cachedDentries)
   702  	stateSinkObject.Save(4, &fs.cachedDentriesLen)
   703  	stateSinkObject.Save(5, &fs.MaxCachedDentries)
   704  	stateSinkObject.Save(6, &fs.root)
   705  }
   706  
   707  func (fs *Filesystem) afterLoad() {}
   708  
   709  // +checklocksignore
   710  func (fs *Filesystem) StateLoad(stateSourceObject state.Source) {
   711  	stateSourceObject.Load(0, &fs.vfsfs)
   712  	stateSourceObject.Load(1, &fs.deferredDecRefs)
   713  	stateSourceObject.Load(2, &fs.nextInoMinusOne)
   714  	stateSourceObject.Load(3, &fs.cachedDentries)
   715  	stateSourceObject.Load(4, &fs.cachedDentriesLen)
   716  	stateSourceObject.Load(5, &fs.MaxCachedDentries)
   717  	stateSourceObject.Load(6, &fs.root)
   718  }
   719  
   720  func (d *Dentry) StateTypeName() string {
   721  	return "pkg/sentry/fsimpl/kernfs.Dentry"
   722  }
   723  
   724  func (d *Dentry) StateFields() []string {
   725  	return []string{
   726  		"vfsd",
   727  		"refs",
   728  		"fs",
   729  		"flags",
   730  		"parent",
   731  		"name",
   732  		"cached",
   733  		"dentryEntry",
   734  		"children",
   735  		"inode",
   736  		"deleted",
   737  	}
   738  }
   739  
   740  func (d *Dentry) beforeSave() {}
   741  
   742  // +checklocksignore
   743  func (d *Dentry) StateSave(stateSinkObject state.Sink) {
   744  	d.beforeSave()
   745  	stateSinkObject.Save(0, &d.vfsd)
   746  	stateSinkObject.Save(1, &d.refs)
   747  	stateSinkObject.Save(2, &d.fs)
   748  	stateSinkObject.Save(3, &d.flags)
   749  	stateSinkObject.Save(4, &d.parent)
   750  	stateSinkObject.Save(5, &d.name)
   751  	stateSinkObject.Save(6, &d.cached)
   752  	stateSinkObject.Save(7, &d.dentryEntry)
   753  	stateSinkObject.Save(8, &d.children)
   754  	stateSinkObject.Save(9, &d.inode)
   755  	stateSinkObject.Save(10, &d.deleted)
   756  }
   757  
   758  // +checklocksignore
   759  func (d *Dentry) StateLoad(stateSourceObject state.Source) {
   760  	stateSourceObject.Load(0, &d.vfsd)
   761  	stateSourceObject.Load(1, &d.refs)
   762  	stateSourceObject.Load(2, &d.fs)
   763  	stateSourceObject.Load(3, &d.flags)
   764  	stateSourceObject.Load(4, &d.parent)
   765  	stateSourceObject.Load(5, &d.name)
   766  	stateSourceObject.Load(6, &d.cached)
   767  	stateSourceObject.Load(7, &d.dentryEntry)
   768  	stateSourceObject.Load(8, &d.children)
   769  	stateSourceObject.Load(9, &d.inode)
   770  	stateSourceObject.Load(10, &d.deleted)
   771  	stateSourceObject.AfterLoad(d.afterLoad)
   772  }
   773  
   774  func (i *inodePlatformFile) StateTypeName() string {
   775  	return "pkg/sentry/fsimpl/kernfs.inodePlatformFile"
   776  }
   777  
   778  func (i *inodePlatformFile) StateFields() []string {
   779  	return []string{
   780  		"hostFD",
   781  		"fdRefs",
   782  		"fileMapper",
   783  	}
   784  }
   785  
   786  func (i *inodePlatformFile) beforeSave() {}
   787  
   788  // +checklocksignore
   789  func (i *inodePlatformFile) StateSave(stateSinkObject state.Sink) {
   790  	i.beforeSave()
   791  	stateSinkObject.Save(0, &i.hostFD)
   792  	stateSinkObject.Save(1, &i.fdRefs)
   793  	stateSinkObject.Save(2, &i.fileMapper)
   794  }
   795  
   796  // +checklocksignore
   797  func (i *inodePlatformFile) StateLoad(stateSourceObject state.Source) {
   798  	stateSourceObject.Load(0, &i.hostFD)
   799  	stateSourceObject.Load(1, &i.fdRefs)
   800  	stateSourceObject.Load(2, &i.fileMapper)
   801  	stateSourceObject.AfterLoad(i.afterLoad)
   802  }
   803  
   804  func (i *CachedMappable) StateTypeName() string {
   805  	return "pkg/sentry/fsimpl/kernfs.CachedMappable"
   806  }
   807  
   808  func (i *CachedMappable) StateFields() []string {
   809  	return []string{
   810  		"mappings",
   811  		"pf",
   812  	}
   813  }
   814  
   815  func (i *CachedMappable) beforeSave() {}
   816  
   817  // +checklocksignore
   818  func (i *CachedMappable) StateSave(stateSinkObject state.Sink) {
   819  	i.beforeSave()
   820  	stateSinkObject.Save(0, &i.mappings)
   821  	stateSinkObject.Save(1, &i.pf)
   822  }
   823  
   824  func (i *CachedMappable) afterLoad() {}
   825  
   826  // +checklocksignore
   827  func (i *CachedMappable) StateLoad(stateSourceObject state.Source) {
   828  	stateSourceObject.Load(0, &i.mappings)
   829  	stateSourceObject.Load(1, &i.pf)
   830  }
   831  
   832  func (l *slotList) StateTypeName() string {
   833  	return "pkg/sentry/fsimpl/kernfs.slotList"
   834  }
   835  
   836  func (l *slotList) StateFields() []string {
   837  	return []string{
   838  		"head",
   839  		"tail",
   840  	}
   841  }
   842  
   843  func (l *slotList) beforeSave() {}
   844  
   845  // +checklocksignore
   846  func (l *slotList) StateSave(stateSinkObject state.Sink) {
   847  	l.beforeSave()
   848  	stateSinkObject.Save(0, &l.head)
   849  	stateSinkObject.Save(1, &l.tail)
   850  }
   851  
   852  func (l *slotList) afterLoad() {}
   853  
   854  // +checklocksignore
   855  func (l *slotList) StateLoad(stateSourceObject state.Source) {
   856  	stateSourceObject.Load(0, &l.head)
   857  	stateSourceObject.Load(1, &l.tail)
   858  }
   859  
   860  func (e *slotEntry) StateTypeName() string {
   861  	return "pkg/sentry/fsimpl/kernfs.slotEntry"
   862  }
   863  
   864  func (e *slotEntry) StateFields() []string {
   865  	return []string{
   866  		"next",
   867  		"prev",
   868  	}
   869  }
   870  
   871  func (e *slotEntry) beforeSave() {}
   872  
   873  // +checklocksignore
   874  func (e *slotEntry) StateSave(stateSinkObject state.Sink) {
   875  	e.beforeSave()
   876  	stateSinkObject.Save(0, &e.next)
   877  	stateSinkObject.Save(1, &e.prev)
   878  }
   879  
   880  func (e *slotEntry) afterLoad() {}
   881  
   882  // +checklocksignore
   883  func (e *slotEntry) StateLoad(stateSourceObject state.Source) {
   884  	stateSourceObject.Load(0, &e.next)
   885  	stateSourceObject.Load(1, &e.prev)
   886  }
   887  
   888  func (r *StaticDirectoryRefs) StateTypeName() string {
   889  	return "pkg/sentry/fsimpl/kernfs.StaticDirectoryRefs"
   890  }
   891  
   892  func (r *StaticDirectoryRefs) StateFields() []string {
   893  	return []string{
   894  		"refCount",
   895  	}
   896  }
   897  
   898  func (r *StaticDirectoryRefs) beforeSave() {}
   899  
   900  // +checklocksignore
   901  func (r *StaticDirectoryRefs) StateSave(stateSinkObject state.Sink) {
   902  	r.beforeSave()
   903  	stateSinkObject.Save(0, &r.refCount)
   904  }
   905  
   906  // +checklocksignore
   907  func (r *StaticDirectoryRefs) StateLoad(stateSourceObject state.Source) {
   908  	stateSourceObject.Load(0, &r.refCount)
   909  	stateSourceObject.AfterLoad(r.afterLoad)
   910  }
   911  
   912  func (s *StaticSymlink) StateTypeName() string {
   913  	return "pkg/sentry/fsimpl/kernfs.StaticSymlink"
   914  }
   915  
   916  func (s *StaticSymlink) StateFields() []string {
   917  	return []string{
   918  		"InodeAttrs",
   919  		"InodeNoopRefCount",
   920  		"InodeNotAnonymous",
   921  		"InodeSymlink",
   922  		"InodeNoStatFS",
   923  		"InodeWatches",
   924  		"target",
   925  	}
   926  }
   927  
   928  func (s *StaticSymlink) beforeSave() {}
   929  
   930  // +checklocksignore
   931  func (s *StaticSymlink) StateSave(stateSinkObject state.Sink) {
   932  	s.beforeSave()
   933  	stateSinkObject.Save(0, &s.InodeAttrs)
   934  	stateSinkObject.Save(1, &s.InodeNoopRefCount)
   935  	stateSinkObject.Save(2, &s.InodeNotAnonymous)
   936  	stateSinkObject.Save(3, &s.InodeSymlink)
   937  	stateSinkObject.Save(4, &s.InodeNoStatFS)
   938  	stateSinkObject.Save(5, &s.InodeWatches)
   939  	stateSinkObject.Save(6, &s.target)
   940  }
   941  
   942  func (s *StaticSymlink) afterLoad() {}
   943  
   944  // +checklocksignore
   945  func (s *StaticSymlink) StateLoad(stateSourceObject state.Source) {
   946  	stateSourceObject.Load(0, &s.InodeAttrs)
   947  	stateSourceObject.Load(1, &s.InodeNoopRefCount)
   948  	stateSourceObject.Load(2, &s.InodeNotAnonymous)
   949  	stateSourceObject.Load(3, &s.InodeSymlink)
   950  	stateSourceObject.Load(4, &s.InodeNoStatFS)
   951  	stateSourceObject.Load(5, &s.InodeWatches)
   952  	stateSourceObject.Load(6, &s.target)
   953  }
   954  
   955  func (dir *syntheticDirectory) StateTypeName() string {
   956  	return "pkg/sentry/fsimpl/kernfs.syntheticDirectory"
   957  }
   958  
   959  func (dir *syntheticDirectory) StateFields() []string {
   960  	return []string{
   961  		"InodeAlwaysValid",
   962  		"InodeAttrs",
   963  		"InodeNoStatFS",
   964  		"InodeNotAnonymous",
   965  		"InodeNotSymlink",
   966  		"InodeWatches",
   967  		"OrderedChildren",
   968  		"syntheticDirectoryRefs",
   969  		"locks",
   970  	}
   971  }
   972  
   973  func (dir *syntheticDirectory) beforeSave() {}
   974  
   975  // +checklocksignore
   976  func (dir *syntheticDirectory) StateSave(stateSinkObject state.Sink) {
   977  	dir.beforeSave()
   978  	stateSinkObject.Save(0, &dir.InodeAlwaysValid)
   979  	stateSinkObject.Save(1, &dir.InodeAttrs)
   980  	stateSinkObject.Save(2, &dir.InodeNoStatFS)
   981  	stateSinkObject.Save(3, &dir.InodeNotAnonymous)
   982  	stateSinkObject.Save(4, &dir.InodeNotSymlink)
   983  	stateSinkObject.Save(5, &dir.InodeWatches)
   984  	stateSinkObject.Save(6, &dir.OrderedChildren)
   985  	stateSinkObject.Save(7, &dir.syntheticDirectoryRefs)
   986  	stateSinkObject.Save(8, &dir.locks)
   987  }
   988  
   989  func (dir *syntheticDirectory) afterLoad() {}
   990  
   991  // +checklocksignore
   992  func (dir *syntheticDirectory) StateLoad(stateSourceObject state.Source) {
   993  	stateSourceObject.Load(0, &dir.InodeAlwaysValid)
   994  	stateSourceObject.Load(1, &dir.InodeAttrs)
   995  	stateSourceObject.Load(2, &dir.InodeNoStatFS)
   996  	stateSourceObject.Load(3, &dir.InodeNotAnonymous)
   997  	stateSourceObject.Load(4, &dir.InodeNotSymlink)
   998  	stateSourceObject.Load(5, &dir.InodeWatches)
   999  	stateSourceObject.Load(6, &dir.OrderedChildren)
  1000  	stateSourceObject.Load(7, &dir.syntheticDirectoryRefs)
  1001  	stateSourceObject.Load(8, &dir.locks)
  1002  }
  1003  
  1004  func (r *syntheticDirectoryRefs) StateTypeName() string {
  1005  	return "pkg/sentry/fsimpl/kernfs.syntheticDirectoryRefs"
  1006  }
  1007  
  1008  func (r *syntheticDirectoryRefs) StateFields() []string {
  1009  	return []string{
  1010  		"refCount",
  1011  	}
  1012  }
  1013  
  1014  func (r *syntheticDirectoryRefs) beforeSave() {}
  1015  
  1016  // +checklocksignore
  1017  func (r *syntheticDirectoryRefs) StateSave(stateSinkObject state.Sink) {
  1018  	r.beforeSave()
  1019  	stateSinkObject.Save(0, &r.refCount)
  1020  }
  1021  
  1022  // +checklocksignore
  1023  func (r *syntheticDirectoryRefs) StateLoad(stateSourceObject state.Source) {
  1024  	stateSourceObject.Load(0, &r.refCount)
  1025  	stateSourceObject.AfterLoad(r.afterLoad)
  1026  }
  1027  
  1028  func init() {
  1029  	state.Register((*dentryList)(nil))
  1030  	state.Register((*dentryEntry)(nil))
  1031  	state.Register((*DynamicBytesFile)(nil))
  1032  	state.Register((*DynamicBytesFD)(nil))
  1033  	state.Register((*SeekEndConfig)(nil))
  1034  	state.Register((*GenericDirectoryFDOptions)(nil))
  1035  	state.Register((*GenericDirectoryFD)(nil))
  1036  	state.Register((*InodeNoopRefCount)(nil))
  1037  	state.Register((*InodeDirectoryNoNewChildren)(nil))
  1038  	state.Register((*InodeNotDirectory)(nil))
  1039  	state.Register((*InodeNotSymlink)(nil))
  1040  	state.Register((*InodeAttrs)(nil))
  1041  	state.Register((*slot)(nil))
  1042  	state.Register((*OrderedChildrenOptions)(nil))
  1043  	state.Register((*OrderedChildren)(nil))
  1044  	state.Register((*InodeSymlink)(nil))
  1045  	state.Register((*StaticDirectory)(nil))
  1046  	state.Register((*InodeAlwaysValid)(nil))
  1047  	state.Register((*InodeTemporary)(nil))
  1048  	state.Register((*InodeNoStatFS)(nil))
  1049  	state.Register((*InodeWatches)(nil))
  1050  	state.Register((*InodeAnonymous)(nil))
  1051  	state.Register((*InodeNotAnonymous)(nil))
  1052  	state.Register((*Filesystem)(nil))
  1053  	state.Register((*Dentry)(nil))
  1054  	state.Register((*inodePlatformFile)(nil))
  1055  	state.Register((*CachedMappable)(nil))
  1056  	state.Register((*slotList)(nil))
  1057  	state.Register((*slotEntry)(nil))
  1058  	state.Register((*StaticDirectoryRefs)(nil))
  1059  	state.Register((*StaticSymlink)(nil))
  1060  	state.Register((*syntheticDirectory)(nil))
  1061  	state.Register((*syntheticDirectoryRefs)(nil))
  1062  }