From c30c43f3690931218b88680b337d11a57a2fdc45 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 17 Mar 2023 01:46:40 -0400 Subject: tree-wide: Ensure that all existing type doc comments follow the expected format This is a notable improvement in the docs for btrfsitem. --- lib/btrfs/btrfsitem/item_dir.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lib/btrfs/btrfsitem/item_dir.go') diff --git a/lib/btrfs/btrfsitem/item_dir.go b/lib/btrfs/btrfsitem/item_dir.go index c1b3c09..cd16d57 100644 --- a/lib/btrfs/btrfsitem/item_dir.go +++ b/lib/btrfs/btrfsitem/item_dir.go @@ -19,10 +19,14 @@ func NameHash(dat []byte) uint64 { return uint64(^crc32.Update(1, crc32.MakeTable(crc32.Castagnoli), dat)) } -// key.objectid = inode of directory containing this entry -// key.offset = -// - for DIR_ITEM and XATTR_ITEM = NameHash(name) -// - for DIR_INDEX = index id in the directory (starting at 2, because "." and "..") +// A DirEntry is an member of a directory. +// +// Key: +// +// key.objectid = inode of directory containing this entry +// key.offset = one of: +// - for DIR_ITEM and XATTR_ITEM = NameHash(name) +// - for DIR_INDEX = index id in the directory (starting at 2, because of "." and "..") type DirEntry struct { // complex DIR_ITEM=84 DIR_INDEX=96 XATTR_ITEM=24 Location btrfsprim.Key `bin:"off=0x0, siz=0x11"` TransID int64 `bin:"off=0x11, siz=8"` -- cgit v1.2.3-2-g168b