@@ -25,18 +25,14 @@ type fanotifyEventInfoHeader struct {
25
25
Len uint16
26
26
}
27
27
28
- type kernelFSID struct {
29
- val [2 ]int32
30
- }
31
-
32
28
// FanotifyEventInfoFID represents a unique file identifier info record.
33
29
// This structure is used for records of types FAN_EVENT_INFO_TYPE_FID,
34
30
// FAN_EVENT_INFO_TYPE_DFID and FAN_EVENT_INFO_TYPE_DFID_NAME.
35
31
// For FAN_EVENT_INFO_TYPE_DFID_NAME there is additionally a null terminated
36
32
// name immediately after the file handle.
37
33
type fanotifyEventInfoFID struct {
38
34
Header fanotifyEventInfoHeader
39
- fsid kernelFSID
35
+ fsid unix. Fsid
40
36
fileHandle byte
41
37
}
42
38
@@ -332,7 +328,7 @@ func getFileHandle(metadataLen uint16, buf []byte, i int) *unix.FileHandle {
332
328
var fhType int32 // this is int handle_type; but Go uses int32
333
329
334
330
sizeOfFanotifyEventInfoHeader := uint32 (unsafe .Sizeof (fanotifyEventInfoHeader {}))
335
- sizeOfKernelFSIDType := uint32 (unsafe .Sizeof (kernelFSID {}))
331
+ sizeOfKernelFSIDType := uint32 (unsafe .Sizeof (unix. Fsid {}))
336
332
sizeOfUint32 := uint32 (unsafe .Sizeof (fhSize ))
337
333
j := uint32 (i ) + uint32 (metadataLen ) + sizeOfFanotifyEventInfoHeader + sizeOfKernelFSIDType
338
334
binary .Read (bytes .NewReader (buf [j :j + sizeOfUint32 ]), binary .LittleEndian , & fhSize )
@@ -350,7 +346,7 @@ func getFileHandleWithName(metadataLen uint16, buf []byte, i int) (*unix.FileHan
350
346
var nameBytes bytes.Buffer
351
347
352
348
sizeOfFanotifyEventInfoHeader := uint32 (unsafe .Sizeof (fanotifyEventInfoHeader {}))
353
- sizeOfKernelFSIDType := uint32 (unsafe .Sizeof (kernelFSID {}))
349
+ sizeOfKernelFSIDType := uint32 (unsafe .Sizeof (unix. Fsid {}))
354
350
sizeOfUint32 := uint32 (unsafe .Sizeof (fhSize ))
355
351
j := uint32 (i ) + uint32 (metadataLen ) + sizeOfFanotifyEventInfoHeader + sizeOfKernelFSIDType
356
352
binary .Read (bytes .NewReader (buf [j :j + sizeOfUint32 ]), binary .LittleEndian , & fhSize )
0 commit comments