summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2022-12-26 22:02:13 -0700
committerLuke Shumaker <lukeshu@lukeshu.com>2022-12-26 23:55:42 -0700
commitd5737a0e71b17a97b82ae68e49acc41a08fcc0ad (patch)
tree7378523c12afd0636b78c08a1bfbd5d26bc97087 /lib
parent0bbcd2cadf8a6e1a277a68653ac2f7f95c63ba01 (diff)
cmd/btrfs-rec: Add a utility function for reading JSON files with progress
Diffstat (limited to 'lib')
-rw-r--r--lib/textui/log.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/textui/log.go b/lib/textui/log.go
index 4421074..e94a24f 100644
--- a/lib/textui/log.go
+++ b/lib/textui/log.go
@@ -288,6 +288,8 @@ func fieldOrd(key string) int {
case "btrfsinspect.rebuild-mappings.substep":
return -1
+ case "btrfs.read-json-file":
+ return -1
default:
return 1
}
@@ -303,6 +305,8 @@ func fieldName(key string) string {
return strings.TrimPrefix(key, "btrfsinspect.scandevices.")
case strings.HasPrefix(key, "btrfsinspect.rebuild-mappings."):
return strings.TrimPrefix(key, "btrfsinspect.rebuild-mappings.")
+ case strings.HasPrefix(key, "btrfs."):
+ return strings.TrimPrefix(key, "btrfs.")
default:
return key
}