volume_id hfs/hfs+ support

Kay Sievers kay.sievers at vrfy.org
Mon Jul 5 17:51:42 PDT 2004


On Mon, Jul 05, 2004 at 10:40:09PM +0200, David Zeuthen wrote:
> On Mon, 2004-07-05 at 21:37 +0200, Kay Sievers wrote:
> > > Very nice, thanks, applied - I've tested this on my Powerbook connected
> > > to my x86 box in Target Disk Mode
> > 
> > This is a really cool feature of this hardware, I like it.
> > 
> 
> Yah, Apple hardware is nice.
> 
> > Hmm, are you sure, you also don't have a label for your hfsplus
> > partition in MacOS? I can't believe it :)
> > 
> 
> I do have a label for my hfsplus partition - I can't find any
> commandline tool to prove it, but it shows in Mac OS X - I even rebooted
> to change the label. If you have some instrumentation for the source I
> can send you traces?

Here are a few more lines. On a working volume I get:

  [I] linux/osspec.c:679 handle_udev_node_created_found_device() : dev_file=/udev/cf is for udi=/org/freedesktop/Hal/devices/temp/84
  get_buffer: read sbbuf len:0x200
  get_buffer: read sbbuf len:0x11000
  probe_hfsplus: catalog start 0x20000, len 0x1e000
  get_buffer: read seekbuf off:0x20000 len:0x1000
  get_buffer: got 0x1000 (4096) bytes
  probe_hfsplus: catalog leaf node 0x1, size 0x1000
  get_buffer: read seekbuf off:0x21000 len:0x1000
  get_buffer: got 0x1000 (4096) bytes
  probe_hfsplus: descriptor type 0xff
  probe_hfsplus: parent id 0x1
  probe_hfsplus: label unicode16 len 18

So, let's fix it. It works pretty nice with "remote debugging" :)

Many thanks,
Kay

-------------- next part --------------
Index: hald/linux/volume_id/volume_id.c
===================================================================
RCS file: /cvs/hal/hal/hald/linux/volume_id/volume_id.c,v
retrieving revision 1.10
diff -u -r1.10 volume_id.c
--- hald/linux/volume_id/volume_id.c	5 Jul 2004 23:42:20 -0000	1.10
+++ hald/linux/volume_id/volume_id.c	6 Jul 2004 00:49:46 -0000
@@ -39,6 +39,7 @@
 
 #include "volume_id.h"
 
+#define DEBUG
 #ifdef DEBUG
 #define dbg(format, arg...)						\
 	do {								\
@@ -914,12 +915,14 @@
 		goto found;
 
 	descr = (struct hfsplus_bnode_descriptor *) buf;
+	dbg("descriptor type 0x%x", descr->type);
 	if (descr->type != HFS_NODE_LEAF)
 		goto found;
 	
 	key = (struct hfsplus_catalog_key *)
 		&buf[sizeof(struct hfsplus_bnode_descriptor)];
 
+	dbg("parent id 0x%x", be32_to_cpu(key->parent_id));
 	if (be32_to_cpu(key->parent_id) != HFSPLUS_POR_CNID)
 		goto found;
 
-------------- next part --------------
_______________________________________________
hal mailing list
hal at freedesktop.org
http://freedesktop.org/mailman/listinfo/hal


More information about the Hal mailing list