From: Karel Zak Date: Fri, 23 Jan 2009 23:04:20 +0000 (+0100) Subject: blkid: add to reiser X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1646690425fa3f4788e34c8606823f7d8af31b8;p=util-linux blkid: add to reiser Signed-off-by: Karel Zak --- diff --git a/libs/blkid/src/probers/reiserfs.c b/libs/blkid/src/probers/reiserfs.c index 1a2e03c7..29e1faa0 100644 --- a/libs/blkid/src/probers/reiserfs.c +++ b/libs/blkid/src/probers/reiserfs.c @@ -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; } diff --git a/tests/expected/blkid/low-probe-reiser3 b/tests/expected/blkid/low-probe-reiser3 index 8247ac54..e046c418 100644 --- a/tests/expected/blkid/low-probe-reiser3 +++ b/tests/expected/blkid/low-probe-reiser3 @@ -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 diff --git a/tests/expected/blkid/low-probe-reiser4 b/tests/expected/blkid/low-probe-reiser4 index 83a285cd..f1d98b94 100644 --- a/tests/expected/blkid/low-probe-reiser4 +++ b/tests/expected/blkid/low-probe-reiser4 @@ -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