summaryrefslogtreecommitdiff
path: root/lib/btrfs/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2023-03-16 08:29:36 -0600
committerLuke Shumaker <lukeshu@lukeshu.com>2023-03-16 08:29:36 -0600
commitc0f33186aa7a8903c5e7406024f13fad48cd14e3 (patch)
treec8361c8278b07839be9af2ccee3507d324a7a216 /lib/btrfs/Makefile
parentc2925f0f8a5d69369b43de0d2d201291fe5ed9d1 (diff)
parent17833fa13d5a7dcd79ad507fe4abf96b4a4a898b (diff)
Merge branch 'lukeshu/errs'
Diffstat (limited to 'lib/btrfs/Makefile')
-rw-r--r--lib/btrfs/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/btrfs/Makefile b/lib/btrfs/Makefile
index b98a1b7..2c70363 100644
--- a/lib/btrfs/Makefile
+++ b/lib/btrfs/Makefile
@@ -74,10 +74,15 @@ btrfsprim/itemtype.go: btrfsitem/items.txt $(MAKEFILE_LIST)
echo '// Code generated by Make. DO NOT EDIT.'; \
echo; \
echo 'package $(@D)'; \
- echo 'import "fmt"'; \
+ echo 'import ('; \
+ echo ' "fmt"'; \
+ echo ' "math"'; \
+ echo ')'; \
echo 'type ItemType uint8'; \
echo 'const ('; \
sed -E 's,(.*)=([^:]*)(:.*)? (trivial|complex) (.*),\1_KEY ItemType=\2,' $< | uniq; \
+ echo; \
+ echo 'MAX_KEY ItemType = math.MaxUint8'; \
echo ')'; \
echo 'func (t ItemType) String() string {'; \
echo ' switch t {'; \