Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153468825
D47855.id147320.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D47855.id147320.diff
View Options
diff --git a/usr.sbin/fstyp/fstyp.c b/usr.sbin/fstyp/fstyp.c
--- a/usr.sbin/fstyp/fstyp.c
+++ b/usr.sbin/fstyp/fstyp.c
@@ -60,19 +60,35 @@
bool unmountable;
const char *precache_encoding;
} fstypes[] = {
- { "apfs", &fstyp_apfs, true, NULL },
- { "befs", &fstyp_befs, false, NULL },
+ /* last sector of geli device */
+ { "geli", &fstyp_geli, true, NULL },
+ /*
+ * ufs headers have four different areas, searched in this order:
+ * offsets: 64k, 8k, 0k, 256k + 8192 bytes
+ */
+ { "ufs", &fstyp_ufs, false, NULL },
+ /* offset 32768 + 512 bytes */
{ "cd9660", &fstyp_cd9660, false, NULL },
- { "exfat", &fstyp_exfat, false, EXFAT_ENC },
+ /* offset 1024 + 512 bytes */
+ { "hfs+", &fstyp_hfsp, false, NULL },
+ /* offset 1024 + 512 bytes */
{ "ext2fs", &fstyp_ext2fs, false, NULL },
- { "geli", &fstyp_geli, true, NULL },
+ /* offset 512 + 36 bytes */
+ { "befs", &fstyp_befs, false, NULL },
+ /* offset 0 + 40 bytes */
+ { "apfs", &fstyp_apfs, true, NULL },
+ /* offset 0 + 512 bytes (for initial signature check) */
+ { "exfat", &fstyp_exfat, false, EXFAT_ENC },
+ /* offset 0 + 1928 bytes */
{ "hammer", &fstyp_hammer, true, NULL },
+ /* offset 0 + 65536 bytes (for initial signature check) */
{ "hammer2", &fstyp_hammer2, true, NULL },
- { "hfs+", &fstyp_hfsp, false, NULL },
+ /* offset 0 + 512 bytes (for initial signature check) */
{ "msdosfs", &fstyp_msdosfs, false, NULL },
+ /* offset 0 + 512 bytes (for initial signature check) */
{ "ntfs", &fstyp_ntfs, false, NTFS_ENC },
- { "ufs", &fstyp_ufs, false, NULL },
#ifdef HAVE_ZFS
+ /* offset 0 + 256k */
{ "zfs", &fstyp_zfs, true, NULL },
#endif
{ NULL, NULL, NULL, NULL }
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 22, 8:29 AM (12 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31965026
Default Alt Text
D47855.id147320.diff (1 KB)
Attached To
Mode
D47855: fstyp: search for file systems labels by largest offset first
Attached
Detach File
Event Timeline
Log In to Comment