From 5597bd8b267e33ac1034268c88778f8f8e91c28f Mon Sep 17 00:00:00 2001 From: Jakob Cornell Date: Mon, 21 Feb 2022 13:18:01 -0600 Subject: [PATCH] Make the verify script check both v1 and v2 entities I'm not entirely sure this will work on disks that mix v1 and v2 entities. --- disk_jumble/src/disk_jumble/verify.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/disk_jumble/src/disk_jumble/verify.py b/disk_jumble/src/disk_jumble/verify.py index 684739d..c63f876 100644 --- a/disk_jumble/src/disk_jumble/verify.py +++ b/disk_jumble/src/disk_jumble/verify.py @@ -371,7 +371,6 @@ if __name__ == "__main__": raise ValueError() parser = argparse.ArgumentParser() - parser.add_argument("entity_version", choices = ["1", "2"]) parser.add_argument("disk_id", type = int) parser.add_argument( "read_tries", @@ -384,7 +383,5 @@ if __name__ == "__main__": conn.autocommit = True path = f"/dev/mapper/diskjumble-{args.disk_id}" with open(path, "rb", buffering = _READ_BUFFER_SIZE) as disk_file: - if args.entity_version == "1": - do_verify(conn, args.disk_id, SECTOR_SIZE, disk_file, _READ_BUFFER_SIZE, args.read_tries) - else: - do_verify_v2(conn, args.disk_id, disk_file, _READ_BUFFER_SIZE, args.read_tries) + do_verify(conn, args.disk_id, SECTOR_SIZE, disk_file, _READ_BUFFER_SIZE, args.read_tries) + do_verify_v2(conn, args.disk_id, disk_file, _READ_BUFFER_SIZE, args.read_tries) -- 2.30.2