I got tired of waiting for HAL to add support for the reiser4 filesystem. I found out that the change was in CVS. No problem I thought I'll update to the new vesion.
How complicated can it be? What I didn't know is that it depended on a newer ( CVS ) version of dus. Both CVS version of HAL and dbus were API incompatible with previous verions. That broke a long list of programs that depended on them. BAD MOVE.
I downgraded back to stable versions. I then backported the reiser4 support from the CVS version. AND IT WORKED!!
It even worked better than the version in CVS. That one needed a rule in HAL's fdi file to differentiate reiser4 from reiserfs ( using the version number ) so that the correct filesystem name is written to fstab.
However my version doens't need that. :)
one word: nifty.
The patch comes as is. no guarantees, use at your own risk etc..
diff -Naur hal-0.4.7/hald/linux/volume_id/volume_id.c hal-0.4.7-reiser4/hald/linux/volume_id/volume_id.c
--- hal-0.4.7/hald/linux/volume_id/volume_id.c 2005-01-17 22:01:53.000000000 +0200
+++ hal-0.4.7-reiser4/hald/linux/volume_id/volume_id.c 2005-03-03 09:34:34.000000000 +0200
@@ -661,6 +661,24 @@
__u8 label[16];
} __attribute__((__packed__)) *rs;
+ struct reiser4_super_block {
+ __u8 magic[16];
+ __u16 dummy[2];
+ __u8 uuid[16];
+ __u8 label[16];
+ __u64 dummy2;
+ } __attribute__((__packed__)) *rs4;
+
+ rs4 = (struct reiser4_super_block *)
+ get_buffer(id, off + REISERFS_SUPERBLOCK_OFFSET, 0x200);
+ if (rs4 == NULL)
+ return -1;
+
+ if (strncmp(rs4->magic, "ReIsEr4", 7) == 0) {
+ strcpy(id->type_version, "4");
+ goto found4;
+ }
+
rs = (struct reiserfs_super_block *)
get_buffer(id, off + REISERFS_SUPERBLOCK_OFFSET, 0x200);
if (rs == NULL)
@@ -688,6 +706,18 @@
return -1;
+found4:
+ set_label_raw(id, rs->label, 16);
+ set_label_string(id, rs->label, 16);
+ set_uuid(id, rs->uuid, UUID_DCE);
+
+ id->usage_id = VOLUME_ID_FILESYSTEM;
+ id->type_id = VOLUME_ID_REISERFS;
+ id->type = "reiser4";
+
+ return 0;
+
+
found:
set_label_raw(id, rs->label, 16);
set_label_string(id, rs->label, 16);
Comments
HAL daemon
did you get HAL running in slackware ?
running hald as root dont start the service at all
I used to be indecisive .. but now I'm not so sure
I don't have slackware.
first make sure you created the user and group you compile hald to use. Make sure no other hald is running ( maybe started by the system startup scripts ).
killall hald
then run it like this :
hald --daemon=no verbose=yes
to get a picture of what it is doing, and where it is failing.
also look in /var/log/everything.log ( or the appropriate log file ).
Post what you find here.