github.com/ttpreport/gvisor-ligolo@v0.0.0-20240123134145-a858404967ba/pkg/sentry/fsimpl/devpts/devpts_state_autogen.go (about)

     1  // automatically generated by stateify.
     2  
     3  package devpts
     4  
     5  import (
     6  	"github.com/ttpreport/gvisor-ligolo/pkg/state"
     7  )
     8  
     9  func (fstype *FilesystemType) StateTypeName() string {
    10  	return "pkg/sentry/fsimpl/devpts.FilesystemType"
    11  }
    12  
    13  func (fstype *FilesystemType) StateFields() []string {
    14  	return []string{
    15  		"initErr",
    16  		"fs",
    17  		"root",
    18  	}
    19  }
    20  
    21  func (fstype *FilesystemType) beforeSave() {}
    22  
    23  // +checklocksignore
    24  func (fstype *FilesystemType) StateSave(stateSinkObject state.Sink) {
    25  	fstype.beforeSave()
    26  	stateSinkObject.Save(0, &fstype.initErr)
    27  	stateSinkObject.Save(1, &fstype.fs)
    28  	stateSinkObject.Save(2, &fstype.root)
    29  }
    30  
    31  func (fstype *FilesystemType) afterLoad() {}
    32  
    33  // +checklocksignore
    34  func (fstype *FilesystemType) StateLoad(stateSourceObject state.Source) {
    35  	stateSourceObject.Load(0, &fstype.initErr)
    36  	stateSourceObject.Load(1, &fstype.fs)
    37  	stateSourceObject.Load(2, &fstype.root)
    38  }
    39  
    40  func (fs *filesystem) StateTypeName() string {
    41  	return "pkg/sentry/fsimpl/devpts.filesystem"
    42  }
    43  
    44  func (fs *filesystem) StateFields() []string {
    45  	return []string{
    46  		"Filesystem",
    47  		"devMinor",
    48  	}
    49  }
    50  
    51  func (fs *filesystem) beforeSave() {}
    52  
    53  // +checklocksignore
    54  func (fs *filesystem) StateSave(stateSinkObject state.Sink) {
    55  	fs.beforeSave()
    56  	stateSinkObject.Save(0, &fs.Filesystem)
    57  	stateSinkObject.Save(1, &fs.devMinor)
    58  }
    59  
    60  func (fs *filesystem) afterLoad() {}
    61  
    62  // +checklocksignore
    63  func (fs *filesystem) StateLoad(stateSourceObject state.Source) {
    64  	stateSourceObject.Load(0, &fs.Filesystem)
    65  	stateSourceObject.Load(1, &fs.devMinor)
    66  }
    67  
    68  func (i *rootInode) StateTypeName() string {
    69  	return "pkg/sentry/fsimpl/devpts.rootInode"
    70  }
    71  
    72  func (i *rootInode) StateFields() []string {
    73  	return []string{
    74  		"implStatFS",
    75  		"InodeAlwaysValid",
    76  		"InodeAttrs",
    77  		"InodeDirectoryNoNewChildren",
    78  		"InodeNotAnonymous",
    79  		"InodeNotSymlink",
    80  		"InodeTemporary",
    81  		"InodeWatches",
    82  		"OrderedChildren",
    83  		"rootInodeRefs",
    84  		"locks",
    85  		"master",
    86  		"replicas",
    87  		"nextIdx",
    88  	}
    89  }
    90  
    91  func (i *rootInode) beforeSave() {}
    92  
    93  // +checklocksignore
    94  func (i *rootInode) StateSave(stateSinkObject state.Sink) {
    95  	i.beforeSave()
    96  	stateSinkObject.Save(0, &i.implStatFS)
    97  	stateSinkObject.Save(1, &i.InodeAlwaysValid)
    98  	stateSinkObject.Save(2, &i.InodeAttrs)
    99  	stateSinkObject.Save(3, &i.InodeDirectoryNoNewChildren)
   100  	stateSinkObject.Save(4, &i.InodeNotAnonymous)
   101  	stateSinkObject.Save(5, &i.InodeNotSymlink)
   102  	stateSinkObject.Save(6, &i.InodeTemporary)
   103  	stateSinkObject.Save(7, &i.InodeWatches)
   104  	stateSinkObject.Save(8, &i.OrderedChildren)
   105  	stateSinkObject.Save(9, &i.rootInodeRefs)
   106  	stateSinkObject.Save(10, &i.locks)
   107  	stateSinkObject.Save(11, &i.master)
   108  	stateSinkObject.Save(12, &i.replicas)
   109  	stateSinkObject.Save(13, &i.nextIdx)
   110  }
   111  
   112  func (i *rootInode) afterLoad() {}
   113  
   114  // +checklocksignore
   115  func (i *rootInode) StateLoad(stateSourceObject state.Source) {
   116  	stateSourceObject.Load(0, &i.implStatFS)
   117  	stateSourceObject.Load(1, &i.InodeAlwaysValid)
   118  	stateSourceObject.Load(2, &i.InodeAttrs)
   119  	stateSourceObject.Load(3, &i.InodeDirectoryNoNewChildren)
   120  	stateSourceObject.Load(4, &i.InodeNotAnonymous)
   121  	stateSourceObject.Load(5, &i.InodeNotSymlink)
   122  	stateSourceObject.Load(6, &i.InodeTemporary)
   123  	stateSourceObject.Load(7, &i.InodeWatches)
   124  	stateSourceObject.Load(8, &i.OrderedChildren)
   125  	stateSourceObject.Load(9, &i.rootInodeRefs)
   126  	stateSourceObject.Load(10, &i.locks)
   127  	stateSourceObject.Load(11, &i.master)
   128  	stateSourceObject.Load(12, &i.replicas)
   129  	stateSourceObject.Load(13, &i.nextIdx)
   130  }
   131  
   132  func (i *implStatFS) StateTypeName() string {
   133  	return "pkg/sentry/fsimpl/devpts.implStatFS"
   134  }
   135  
   136  func (i *implStatFS) StateFields() []string {
   137  	return []string{}
   138  }
   139  
   140  func (i *implStatFS) beforeSave() {}
   141  
   142  // +checklocksignore
   143  func (i *implStatFS) StateSave(stateSinkObject state.Sink) {
   144  	i.beforeSave()
   145  }
   146  
   147  func (i *implStatFS) afterLoad() {}
   148  
   149  // +checklocksignore
   150  func (i *implStatFS) StateLoad(stateSourceObject state.Source) {
   151  }
   152  
   153  func (l *lineDiscipline) StateTypeName() string {
   154  	return "pkg/sentry/fsimpl/devpts.lineDiscipline"
   155  }
   156  
   157  func (l *lineDiscipline) StateFields() []string {
   158  	return []string{
   159  		"size",
   160  		"inQueue",
   161  		"outQueue",
   162  		"termios",
   163  		"column",
   164  		"numReplicas",
   165  		"masterWaiter",
   166  		"replicaWaiter",
   167  		"terminal",
   168  	}
   169  }
   170  
   171  func (l *lineDiscipline) beforeSave() {}
   172  
   173  // +checklocksignore
   174  func (l *lineDiscipline) StateSave(stateSinkObject state.Sink) {
   175  	l.beforeSave()
   176  	stateSinkObject.Save(0, &l.size)
   177  	stateSinkObject.Save(1, &l.inQueue)
   178  	stateSinkObject.Save(2, &l.outQueue)
   179  	stateSinkObject.Save(3, &l.termios)
   180  	stateSinkObject.Save(4, &l.column)
   181  	stateSinkObject.Save(5, &l.numReplicas)
   182  	stateSinkObject.Save(6, &l.masterWaiter)
   183  	stateSinkObject.Save(7, &l.replicaWaiter)
   184  	stateSinkObject.Save(8, &l.terminal)
   185  }
   186  
   187  func (l *lineDiscipline) afterLoad() {}
   188  
   189  // +checklocksignore
   190  func (l *lineDiscipline) StateLoad(stateSourceObject state.Source) {
   191  	stateSourceObject.Load(0, &l.size)
   192  	stateSourceObject.Load(1, &l.inQueue)
   193  	stateSourceObject.Load(2, &l.outQueue)
   194  	stateSourceObject.Load(3, &l.termios)
   195  	stateSourceObject.Load(4, &l.column)
   196  	stateSourceObject.Load(5, &l.numReplicas)
   197  	stateSourceObject.Load(6, &l.masterWaiter)
   198  	stateSourceObject.Load(7, &l.replicaWaiter)
   199  	stateSourceObject.Load(8, &l.terminal)
   200  }
   201  
   202  func (o *outputQueueTransformer) StateTypeName() string {
   203  	return "pkg/sentry/fsimpl/devpts.outputQueueTransformer"
   204  }
   205  
   206  func (o *outputQueueTransformer) StateFields() []string {
   207  	return []string{}
   208  }
   209  
   210  func (o *outputQueueTransformer) beforeSave() {}
   211  
   212  // +checklocksignore
   213  func (o *outputQueueTransformer) StateSave(stateSinkObject state.Sink) {
   214  	o.beforeSave()
   215  }
   216  
   217  func (o *outputQueueTransformer) afterLoad() {}
   218  
   219  // +checklocksignore
   220  func (o *outputQueueTransformer) StateLoad(stateSourceObject state.Source) {
   221  }
   222  
   223  func (i *inputQueueTransformer) StateTypeName() string {
   224  	return "pkg/sentry/fsimpl/devpts.inputQueueTransformer"
   225  }
   226  
   227  func (i *inputQueueTransformer) StateFields() []string {
   228  	return []string{}
   229  }
   230  
   231  func (i *inputQueueTransformer) beforeSave() {}
   232  
   233  // +checklocksignore
   234  func (i *inputQueueTransformer) StateSave(stateSinkObject state.Sink) {
   235  	i.beforeSave()
   236  }
   237  
   238  func (i *inputQueueTransformer) afterLoad() {}
   239  
   240  // +checklocksignore
   241  func (i *inputQueueTransformer) StateLoad(stateSourceObject state.Source) {
   242  }
   243  
   244  func (mi *masterInode) StateTypeName() string {
   245  	return "pkg/sentry/fsimpl/devpts.masterInode"
   246  }
   247  
   248  func (mi *masterInode) StateFields() []string {
   249  	return []string{
   250  		"implStatFS",
   251  		"InodeAttrs",
   252  		"InodeNoopRefCount",
   253  		"InodeNotAnonymous",
   254  		"InodeNotDirectory",
   255  		"InodeNotSymlink",
   256  		"InodeWatches",
   257  		"locks",
   258  		"root",
   259  	}
   260  }
   261  
   262  func (mi *masterInode) beforeSave() {}
   263  
   264  // +checklocksignore
   265  func (mi *masterInode) StateSave(stateSinkObject state.Sink) {
   266  	mi.beforeSave()
   267  	stateSinkObject.Save(0, &mi.implStatFS)
   268  	stateSinkObject.Save(1, &mi.InodeAttrs)
   269  	stateSinkObject.Save(2, &mi.InodeNoopRefCount)
   270  	stateSinkObject.Save(3, &mi.InodeNotAnonymous)
   271  	stateSinkObject.Save(4, &mi.InodeNotDirectory)
   272  	stateSinkObject.Save(5, &mi.InodeNotSymlink)
   273  	stateSinkObject.Save(6, &mi.InodeWatches)
   274  	stateSinkObject.Save(7, &mi.locks)
   275  	stateSinkObject.Save(8, &mi.root)
   276  }
   277  
   278  func (mi *masterInode) afterLoad() {}
   279  
   280  // +checklocksignore
   281  func (mi *masterInode) StateLoad(stateSourceObject state.Source) {
   282  	stateSourceObject.Load(0, &mi.implStatFS)
   283  	stateSourceObject.Load(1, &mi.InodeAttrs)
   284  	stateSourceObject.Load(2, &mi.InodeNoopRefCount)
   285  	stateSourceObject.Load(3, &mi.InodeNotAnonymous)
   286  	stateSourceObject.Load(4, &mi.InodeNotDirectory)
   287  	stateSourceObject.Load(5, &mi.InodeNotSymlink)
   288  	stateSourceObject.Load(6, &mi.InodeWatches)
   289  	stateSourceObject.Load(7, &mi.locks)
   290  	stateSourceObject.Load(8, &mi.root)
   291  }
   292  
   293  func (mfd *masterFileDescription) StateTypeName() string {
   294  	return "pkg/sentry/fsimpl/devpts.masterFileDescription"
   295  }
   296  
   297  func (mfd *masterFileDescription) StateFields() []string {
   298  	return []string{
   299  		"vfsfd",
   300  		"FileDescriptionDefaultImpl",
   301  		"LockFD",
   302  		"inode",
   303  		"t",
   304  	}
   305  }
   306  
   307  func (mfd *masterFileDescription) beforeSave() {}
   308  
   309  // +checklocksignore
   310  func (mfd *masterFileDescription) StateSave(stateSinkObject state.Sink) {
   311  	mfd.beforeSave()
   312  	stateSinkObject.Save(0, &mfd.vfsfd)
   313  	stateSinkObject.Save(1, &mfd.FileDescriptionDefaultImpl)
   314  	stateSinkObject.Save(2, &mfd.LockFD)
   315  	stateSinkObject.Save(3, &mfd.inode)
   316  	stateSinkObject.Save(4, &mfd.t)
   317  }
   318  
   319  func (mfd *masterFileDescription) afterLoad() {}
   320  
   321  // +checklocksignore
   322  func (mfd *masterFileDescription) StateLoad(stateSourceObject state.Source) {
   323  	stateSourceObject.Load(0, &mfd.vfsfd)
   324  	stateSourceObject.Load(1, &mfd.FileDescriptionDefaultImpl)
   325  	stateSourceObject.Load(2, &mfd.LockFD)
   326  	stateSourceObject.Load(3, &mfd.inode)
   327  	stateSourceObject.Load(4, &mfd.t)
   328  }
   329  
   330  func (q *queue) StateTypeName() string {
   331  	return "pkg/sentry/fsimpl/devpts.queue"
   332  }
   333  
   334  func (q *queue) StateFields() []string {
   335  	return []string{
   336  		"readBuf",
   337  		"waitBuf",
   338  		"waitBufLen",
   339  		"readable",
   340  		"transformer",
   341  	}
   342  }
   343  
   344  func (q *queue) beforeSave() {}
   345  
   346  // +checklocksignore
   347  func (q *queue) StateSave(stateSinkObject state.Sink) {
   348  	q.beforeSave()
   349  	stateSinkObject.Save(0, &q.readBuf)
   350  	stateSinkObject.Save(1, &q.waitBuf)
   351  	stateSinkObject.Save(2, &q.waitBufLen)
   352  	stateSinkObject.Save(3, &q.readable)
   353  	stateSinkObject.Save(4, &q.transformer)
   354  }
   355  
   356  func (q *queue) afterLoad() {}
   357  
   358  // +checklocksignore
   359  func (q *queue) StateLoad(stateSourceObject state.Source) {
   360  	stateSourceObject.Load(0, &q.readBuf)
   361  	stateSourceObject.Load(1, &q.waitBuf)
   362  	stateSourceObject.Load(2, &q.waitBufLen)
   363  	stateSourceObject.Load(3, &q.readable)
   364  	stateSourceObject.Load(4, &q.transformer)
   365  }
   366  
   367  func (ri *replicaInode) StateTypeName() string {
   368  	return "pkg/sentry/fsimpl/devpts.replicaInode"
   369  }
   370  
   371  func (ri *replicaInode) StateFields() []string {
   372  	return []string{
   373  		"implStatFS",
   374  		"InodeAttrs",
   375  		"InodeNoopRefCount",
   376  		"InodeNotAnonymous",
   377  		"InodeNotDirectory",
   378  		"InodeNotSymlink",
   379  		"InodeWatches",
   380  		"locks",
   381  		"root",
   382  		"t",
   383  	}
   384  }
   385  
   386  func (ri *replicaInode) beforeSave() {}
   387  
   388  // +checklocksignore
   389  func (ri *replicaInode) StateSave(stateSinkObject state.Sink) {
   390  	ri.beforeSave()
   391  	stateSinkObject.Save(0, &ri.implStatFS)
   392  	stateSinkObject.Save(1, &ri.InodeAttrs)
   393  	stateSinkObject.Save(2, &ri.InodeNoopRefCount)
   394  	stateSinkObject.Save(3, &ri.InodeNotAnonymous)
   395  	stateSinkObject.Save(4, &ri.InodeNotDirectory)
   396  	stateSinkObject.Save(5, &ri.InodeNotSymlink)
   397  	stateSinkObject.Save(6, &ri.InodeWatches)
   398  	stateSinkObject.Save(7, &ri.locks)
   399  	stateSinkObject.Save(8, &ri.root)
   400  	stateSinkObject.Save(9, &ri.t)
   401  }
   402  
   403  func (ri *replicaInode) afterLoad() {}
   404  
   405  // +checklocksignore
   406  func (ri *replicaInode) StateLoad(stateSourceObject state.Source) {
   407  	stateSourceObject.Load(0, &ri.implStatFS)
   408  	stateSourceObject.Load(1, &ri.InodeAttrs)
   409  	stateSourceObject.Load(2, &ri.InodeNoopRefCount)
   410  	stateSourceObject.Load(3, &ri.InodeNotAnonymous)
   411  	stateSourceObject.Load(4, &ri.InodeNotDirectory)
   412  	stateSourceObject.Load(5, &ri.InodeNotSymlink)
   413  	stateSourceObject.Load(6, &ri.InodeWatches)
   414  	stateSourceObject.Load(7, &ri.locks)
   415  	stateSourceObject.Load(8, &ri.root)
   416  	stateSourceObject.Load(9, &ri.t)
   417  }
   418  
   419  func (rfd *replicaFileDescription) StateTypeName() string {
   420  	return "pkg/sentry/fsimpl/devpts.replicaFileDescription"
   421  }
   422  
   423  func (rfd *replicaFileDescription) StateFields() []string {
   424  	return []string{
   425  		"vfsfd",
   426  		"FileDescriptionDefaultImpl",
   427  		"LockFD",
   428  		"inode",
   429  	}
   430  }
   431  
   432  func (rfd *replicaFileDescription) beforeSave() {}
   433  
   434  // +checklocksignore
   435  func (rfd *replicaFileDescription) StateSave(stateSinkObject state.Sink) {
   436  	rfd.beforeSave()
   437  	stateSinkObject.Save(0, &rfd.vfsfd)
   438  	stateSinkObject.Save(1, &rfd.FileDescriptionDefaultImpl)
   439  	stateSinkObject.Save(2, &rfd.LockFD)
   440  	stateSinkObject.Save(3, &rfd.inode)
   441  }
   442  
   443  func (rfd *replicaFileDescription) afterLoad() {}
   444  
   445  // +checklocksignore
   446  func (rfd *replicaFileDescription) StateLoad(stateSourceObject state.Source) {
   447  	stateSourceObject.Load(0, &rfd.vfsfd)
   448  	stateSourceObject.Load(1, &rfd.FileDescriptionDefaultImpl)
   449  	stateSourceObject.Load(2, &rfd.LockFD)
   450  	stateSourceObject.Load(3, &rfd.inode)
   451  }
   452  
   453  func (r *rootInodeRefs) StateTypeName() string {
   454  	return "pkg/sentry/fsimpl/devpts.rootInodeRefs"
   455  }
   456  
   457  func (r *rootInodeRefs) StateFields() []string {
   458  	return []string{
   459  		"refCount",
   460  	}
   461  }
   462  
   463  func (r *rootInodeRefs) beforeSave() {}
   464  
   465  // +checklocksignore
   466  func (r *rootInodeRefs) StateSave(stateSinkObject state.Sink) {
   467  	r.beforeSave()
   468  	stateSinkObject.Save(0, &r.refCount)
   469  }
   470  
   471  // +checklocksignore
   472  func (r *rootInodeRefs) StateLoad(stateSourceObject state.Source) {
   473  	stateSourceObject.Load(0, &r.refCount)
   474  	stateSourceObject.AfterLoad(r.afterLoad)
   475  }
   476  
   477  func (t *Terminal) StateTypeName() string {
   478  	return "pkg/sentry/fsimpl/devpts.Terminal"
   479  }
   480  
   481  func (t *Terminal) StateFields() []string {
   482  	return []string{
   483  		"n",
   484  		"ld",
   485  		"masterKTTY",
   486  		"replicaKTTY",
   487  	}
   488  }
   489  
   490  func (t *Terminal) beforeSave() {}
   491  
   492  // +checklocksignore
   493  func (t *Terminal) StateSave(stateSinkObject state.Sink) {
   494  	t.beforeSave()
   495  	stateSinkObject.Save(0, &t.n)
   496  	stateSinkObject.Save(1, &t.ld)
   497  	stateSinkObject.Save(2, &t.masterKTTY)
   498  	stateSinkObject.Save(3, &t.replicaKTTY)
   499  }
   500  
   501  func (t *Terminal) afterLoad() {}
   502  
   503  // +checklocksignore
   504  func (t *Terminal) StateLoad(stateSourceObject state.Source) {
   505  	stateSourceObject.Load(0, &t.n)
   506  	stateSourceObject.Load(1, &t.ld)
   507  	stateSourceObject.Load(2, &t.masterKTTY)
   508  	stateSourceObject.Load(3, &t.replicaKTTY)
   509  }
   510  
   511  func init() {
   512  	state.Register((*FilesystemType)(nil))
   513  	state.Register((*filesystem)(nil))
   514  	state.Register((*rootInode)(nil))
   515  	state.Register((*implStatFS)(nil))
   516  	state.Register((*lineDiscipline)(nil))
   517  	state.Register((*outputQueueTransformer)(nil))
   518  	state.Register((*inputQueueTransformer)(nil))
   519  	state.Register((*masterInode)(nil))
   520  	state.Register((*masterFileDescription)(nil))
   521  	state.Register((*queue)(nil))
   522  	state.Register((*replicaInode)(nil))
   523  	state.Register((*replicaFileDescription)(nil))
   524  	state.Register((*rootInodeRefs)(nil))
   525  	state.Register((*Terminal)(nil))
   526  }