On Thu, Aug 28, 2008 at 11:51:07AM +0300, Elan Ruusamäe wrote:
> On Thursday 28 August 2008 01:20, Szymon Siwek wrote:
> > On Wed, Aug 27, 2008 at 08:33:10PM +0200, Zsolt Udvari wrote:
> > > > What's going on? tent.png looks like proper PNG file. wesnoth builds
> > > > without errors. Is it some problem with Zsolt's filesystem (Macintosh
> > > > HFS, I guess)?
> > >
> > > I don't know what's the problem. E.g. feh and geeqie can show the
> > > tent.png but 'file tent.png' returns the prev error message. I was
> > > wondering too. I'm using reiserfs, so this is very strange :(
> > >
> > > I've unpacked again and same error:
> > >
> > > $ file data/core/images/terrain/tent.png
> > > data/core/images/terrain/tent.png: ERROR: Macintosh HFS Extended
> > > version 61389 data (unclean) vasprintf failed (Invalid or incomplete
> > > multibyte or wide character)
> >
> > OK, I see - file-4.25 is looney and doesn't recognize PNGs.
> 
> no.
> 
> it recognizes file as HFS first, then as PNG, which is wrong imho as PNG has 
> pretty clear mime-magic.
> 
Are you sure? "file *.png" returns "data" for all PNGs on my builder.
BTW I've wrote patch which disables recognizing Macintosh filesystems (it's
insane to use 2-byte magic string)

-- 
Szymon Siwek
--- file-4.25/magic/Magdir/macintosh.orig       2008-08-27 23:19:21.547928744 
+0200
+++ file-4.25/magic/Magdir/macintosh    2008-08-27 23:20:44.042259097 +0200
@@ -272,14 +272,15 @@
 # Alternatively, the boot block is supposed to be zeroed if it's
 # unused, so a simply >0 should suffice.
 
-0x400  beshort                 0xD2D7          Macintosh MFS data
->0     beshort                 0x4C4B          (bootable)
->0x40a beshort                 &0x8000         (locked)
->0x402 beldate-0x7C25B080      x               created: %s,
->0x406 beldate-0x7C25B080      >0              last backup: %s,
->0x414 belong                  x               block size: %d,
->0x412 beshort                 x               number of blocks: %d,
->0x424 pstring                 x               volume name: %s
+# "\xd2\xd7" is has many false positives
+#0x400 beshort                 0xD2D7          Macintosh MFS data
+#>0    beshort                 0x4C4B          (bootable)
+#>0x40a        beshort                 &0x8000         (locked)
+#>0x402        beldate-0x7C25B080      x               created: %s,
+#>0x406        beldate-0x7C25B080      >0              last backup: %s,
+#>0x414        belong                  x               block size: %d,
+#>0x412        beshort                 x               number of blocks: %d,
+#>0x424        pstring                 x               volume name: %s
 
 # "BD" is has many false positives
 #0x400 beshort                 0x4244          Macintosh HFS data
@@ -296,24 +297,25 @@
 #>0x412        beshort                 x               number of blocks: %d,
 #>0x424        pstring                 x               volume name: %s
 
-0x400  beshort                 0x482B          Macintosh HFS Extended
->&0    beshort                 x               version %d data
->0     beshort                 0x4C4B          (bootable)
->0x404 belong                  ^0x00000100     (mounted)
->&2    belong                  &0x00000200     (spared blocks)
->&2    belong                  &0x00000800     (unclean)
->&2    belong                  &0x00008000     (locked)
->&6    string                  x               last mounted by: '%.4s',
+# "H+" is has many false positives
+#0x400 beshort                 0x482B          Macintosh HFS Extended
+#>&0   beshort                 x               version %d data
+#>0    beshort                 0x4C4B          (bootable)
+#>0x404        belong                  ^0x00000100     (mounted)
+#>&2   belong                  &0x00000200     (spared blocks)
+#>&2   belong                  &0x00000800     (unclean)
+#>&2   belong                  &0x00008000     (locked)
+#>&6   string                  x               last mounted by: '%.4s',
 # really, that should be treated as a belong and we print a string
 # based on the value. TN1150 only mentions '8.10' for "MacOS 8.1"
->&14   beldate-0x7C25B080      x               created: %s,
+#>&14  beldate-0x7C25B080      x               created: %s,
 # only the creation date is local time, all other timestamps in HFS+ are UTC.
->&18   bedate-0x7C25B080       x               last modified: %s,
->&22   bedate-0x7C25B080       >0              last backup: %s,
->&26   bedate-0x7C25B080       >0              last checked: %s,
->&38   belong                  x               block size: %d,
->&42   belong                  x               number of blocks: %d,
->&46   belong                  x               free blocks: %d
+#>&18  bedate-0x7C25B080       x               last modified: %s,
+#>&22  bedate-0x7C25B080       >0              last backup: %s,
+#>&26  bedate-0x7C25B080       >0              last checked: %s,
+#>&38  belong                  x               block size: %d,
+#>&42  belong                  x               number of blocks: %d,
+#>&46  belong                  x               free blocks: %d
 
 # I don't think this is really necessary since it doesn't do much and 
 # anything with a valid driver descriptor will also have a valid
_______________________________________________
pld-devel-en mailing list
pld-devel-en@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-devel-en

Reply via email to