summaryrefslogtreecommitdiff
path: root/cmd/btrfs-rec/inspect_dumpsums.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2022-08-09 16:01:20 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2022-08-17 22:50:57 -0600
commit286db83409b56de7b0ac3a74709018c01de43f44 (patch)
tree147229cdaebb3fa8681bc6e07e3cce6fd40300ae /cmd/btrfs-rec/inspect_dumpsums.go
parent51659255af92e050ce0d2bca65629512a833eae4 (diff)
cli: wip: Rethink the "scan" CLI commands
Diffstat (limited to 'cmd/btrfs-rec/inspect_dumpsums.go')
-rw-r--r--cmd/btrfs-rec/inspect_dumpsums.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/cmd/btrfs-rec/inspect_dumpsums.go b/cmd/btrfs-rec/inspect_dumpsums.go
deleted file mode 100644
index 28ae7ef..0000000
--- a/cmd/btrfs-rec/inspect_dumpsums.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (C) 2022 Luke Shumaker <lukeshu@lukeshu.com>
-//
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-package main
-
-import (
- "os"
-
- "github.com/datawire/dlib/dlog"
- "github.com/datawire/ocibuild/pkg/cliutil"
- "github.com/spf13/cobra"
-
- "git.lukeshu.com/btrfs-progs-ng/lib/btrfs"
- "git.lukeshu.com/btrfs-progs-ng/lib/btrfsprogs/btrfsinspect/rebuildmappings"
-)
-
-func init() {
- inspectors = append(inspectors, subcommand{
- Command: cobra.Command{
- Use: "dump-sums",
- Short: "Dump a buncha checksums as JSON",
- Args: cliutil.WrapPositionalArgs(cobra.NoArgs),
- },
- RunE: func(fs *btrfs.FS, cmd *cobra.Command, _ []string) error {
- ctx := cmd.Context()
- sums, err := rebuildmappings.SumEverything(ctx, fs)
- if err != nil {
- return err
- }
- dlog.Info(ctx, "Writing sums as gob to stdout...")
- return rebuildmappings.WriteAllSums(os.Stdout, sums)
- },
- })
-}