]> err.no Git - util-linux/commitdiff
blkid: add to reiser
authorKarel Zak <kzak@redhat.com>
Fri, 23 Jan 2009 23:04:20 +0000 (00:04 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Feb 2009 22:35:24 +0000 (23:35 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libs/blkid/src/probers/reiserfs.c
tests/expected/blkid/low-probe-reiser3
tests/expected/blkid/low-probe-reiser4

index 1a2e03c74f197ccfddf040d64c2fab3dc0bedc6d..29e1faa0f40c56f87b0bf05f0aac7f0887db1be9 100644 (file)
@@ -59,13 +59,20 @@ static int probe_reiser(blkid_probe pr, const struct blkid_idmag *mag)
 
        /* LABEL/UUID are only valid for later versions of Reiserfs v3.6. */
        if (mag->magic[6] == '2' || mag->magic[6] == '3') {
-               if (strlen(rs->rs_label))
+               if (*rs->rs_label)
                        blkid_probe_set_label(pr,
                                        (unsigned char *) rs->rs_label,
                                        sizeof(rs->rs_label));
                blkid_probe_set_uuid(pr, rs->rs_uuid);
        }
 
+       if (mag->magic[6] == '3')
+               blkid_probe_set_version(pr, "JR");
+       else if (mag->magic[6] == '2')
+               blkid_probe_set_version(pr, "3.6");
+       else
+               blkid_probe_set_version(pr, "3.5");
+
        return 0;
 }
 
@@ -77,9 +84,10 @@ static int probe_reiser4(blkid_probe pr, const struct blkid_idmag *mag)
        if (!rs4)
                return -1;
 
-       if (strlen((char *) rs4->rs4_label))
+       if (*rs4->rs4_label)
                blkid_probe_set_label(pr, rs4->rs4_label, sizeof(rs4->rs4_label));
        blkid_probe_set_uuid(pr, rs4->rs4_uuid);
+       blkid_probe_set_version(pr, "4");
 
        return 0;
 }
index 8247ac5411cecb2a2895d228230a4a093f6038af..e046c41824422a1f6bdb2852b15c26b1a376ea14 100644 (file)
@@ -4,3 +4,4 @@ ID_FS_TYPE=reiser
 ID_FS_USAGE=filesystem
 ID_FS_UUID=9efe7863-b124-46dc-ad68-8ecd04230a7b
 ID_FS_UUID_ENC=9efe7863-b124-46dc-ad68-8ecd04230a7b
+ID_FS_VERSION=JR
index 83a285cd2589508ed07f4c031e08be7ce0940c88..f1d98b94c4677852f0812d2deeae63d8a341a43e 100644 (file)
@@ -4,3 +4,4 @@ ID_FS_TYPE=reiser4
 ID_FS_USAGE=filesystem
 ID_FS_UUID=9722633c-d69a-4881-b1c8-bedecbbf39d2
 ID_FS_UUID_ENC=9722633c-d69a-4881-b1c8-bedecbbf39d2
+ID_FS_VERSION=4