file(1) cannot detect UFS2?

Ivan Voras ivoras at fer.hr
Sat Jun 9 22:49:12 UTC 2007


Hi!

I'm trying to use file(1) to detect file system type on partitions, and
so far it's working for any file system I've cared to try (the usual MS
and Linux list) *except* UFS2.

Detecting UFS1 works, though much more verbosely than it needs to be,
but UFS2 isn't detected at all.

I'd like to ask someone familiar with UFS2 to take a quick peak and add
the appropriate rules to the file(1) magic database, if anyone's interested.

At the very least, I need someone to commit this patch:

--- magic.old   Fri Jun  8 17:42:01 2007
+++ magic       Fri Jun  8 17:51:11 2007
@@ -4821,6 +4821,10 @@
 >8320  belong          0               TIME optimization
 >8320  belong          1               SPACE optimization

+66908   lelong          0x19540119      Unix Fast File system v2
(little-endian)
+
+66908   belong          0x19540119      Unix Fast File system v2
(big-endian)
+
 # ext2/ext3 filesystems - Andreas Dilger <adilger at turbolabs.com>
 0x438  leshort         0xEF53          Linux
 >0x44c lelong          x               rev %d


I don't know if it's correct (the offset seems a bit high...), but it
works for me :)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 250 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070609/885228f1/signature.pgp


More information about the freebsd-hackers mailing list