2016-10-25 09:03:35 +02:00
|
|
|
From 27ec95a88943d858433a492940c694bac4bc54d0 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Jeff Mahoney <jeffm@jeffm.io>
|
|
|
|
Date: Thu, 20 Oct 2016 11:29:21 -0400
|
|
|
|
Subject: [PATCH] Add BTRFS Filesystem Metadata Image
|
|
|
|
Patch-mainline: Submitted to file@mx.gw.com, 20 Oct 2016
|
|
|
|
|
|
|
|
The btrfs-image in its uncompressed form contains a directly usable
|
|
|
|
superblock. Rather than duplicate the superblock printer, split
|
|
|
|
that out and use it with both the on-disk superblock and the ones
|
|
|
|
contained within the image.
|
2017-03-02 14:25:41 +01:00
|
|
|
|
2016-10-25 09:03:35 +02:00
|
|
|
---
|
2017-03-02 14:25:41 +01:00
|
|
|
magic/Magdir/filesystems | 37 +++++++++++++++++++++++--------------
|
2016-10-25 09:03:35 +02:00
|
|
|
1 file changed, 23 insertions(+), 14 deletions(-)
|
|
|
|
|
2017-06-06 10:38:22 +02:00
|
|
|
Index: file-5.31/magic/Magdir/filesystems
|
|
|
|
===================================================================
|
|
|
|
--- file-5.31.orig/magic/Magdir/filesystems
|
|
|
|
+++ file-5.31/magic/Magdir/filesystems
|
|
|
|
@@ -2246,20 +2246,29 @@
|
2016-10-25 09:03:35 +02:00
|
|
|
>>0x10060 string >\0 lockproto %s)
|
|
|
|
|
|
|
|
# Russell Coker <russell@coker.com.au>
|
|
|
|
-0x10040 string _BHRfS_M BTRFS Filesystem
|
|
|
|
->0x1012b string >\0 label "%s",
|
|
|
|
->0x10090 lelong x sectorsize %d,
|
|
|
|
->0x10094 lelong x nodesize %d,
|
|
|
|
->0x10098 lelong x leafsize %d,
|
|
|
|
->0x10020 belong x UUID=%08x-
|
|
|
|
->0x10024 beshort x \b%04x-
|
|
|
|
->0x10026 beshort x \b%04x-
|
|
|
|
->0x10028 beshort x \b%04x-
|
|
|
|
->0x1002a beshort x \b%04x
|
|
|
|
->0x1002c belong x \b%08x,
|
|
|
|
->0x10078 lequad x %lld/
|
|
|
|
->0x10070 lequad x \b%lld bytes used,
|
|
|
|
->0x10088 lequad x %lld devices
|
|
|
|
+0x10040 string _BHRfS_M
|
|
|
|
+>0x10000 use btrfs_super_block
|
|
|
|
+0 name btrfs_super_block
|
|
|
|
+>0x40 string _BHRfS_M BTRFS Filesystem
|
|
|
|
+>0x12b string >\0 label "%s",
|
|
|
|
+>0x90 lelong x sectorsize %d,
|
|
|
|
+>0x94 lelong x nodesize %d,
|
|
|
|
+>0x98 lelong x leafsize %d,
|
|
|
|
+>0x20 belong x UUID=%08x-
|
|
|
|
+>0x24 beshort x \b%04x-
|
|
|
|
+>0x26 beshort x \b%04x-
|
|
|
|
+>0x28 beshort x \b%04x-
|
|
|
|
+>0x2a beshort x \b%04x
|
|
|
|
+>0x2c belong x \b%08x,
|
|
|
|
+>0x78 lequad x %lld/
|
|
|
|
+>0x70 lequad x \b%lld bytes used,
|
|
|
|
+>0x88 lequad x %lld devices
|
|
|
|
+
|
2017-03-02 14:25:41 +01:00
|
|
|
+0 lequad 0xbd5c25e27295668b BTRFS Filesystem Metadata Image
|
|
|
|
+>20 byte 1 \b, zlib compressed
|
|
|
|
+>20 byte 0 \b, uncompressed
|
|
|
|
+>>0x440 string _BHRfS_M \b, contains
|
2016-10-25 09:03:35 +02:00
|
|
|
+>>>0x400 use btrfs_super_block
|
|
|
|
|
|
|
|
# dvdisaster's .ecc
|
|
|
|
# From: "Nelson A. de Oliveira" <naoliv@gmail.com>
|