]> err.no Git - util-linux/commitdiff
blkid: add GFS2 UUID support
authorKarel Zak <kzak@redhat.com>
Mon, 13 Oct 2008 09:34:58 +0000 (11:34 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Feb 2009 22:21:46 +0000 (23:21 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
libs/blkid/src/probers/gfs.c

index 44306dc3f52736f2b6028bad8a669ba31c5d6654..1581ecb7ea15ae3d9e5d11526cf823310cdd9d57 100644 (file)
@@ -69,7 +69,10 @@ struct gfs2_sb {
 
        char sb_lockproto[GFS_LOCKNAME_LEN];
        char sb_locktable[GFS_LOCKNAME_LEN];
-       /* In gfs1, quota and license dinodes followed */
+
+       struct gfs2_inum __pad3; /* Was quota inode in gfs1 */
+       struct gfs2_inum __pad4; /* Was licence inode in gfs1 */
+       uint8_t sb_uuid[16]; /* The UUID maybe 0 for backwards compat */
 };
 
 static int probe_gfs(blkid_probe pr, const struct blkid_idmag *mag)
@@ -87,8 +90,11 @@ static int probe_gfs(blkid_probe pr, const struct blkid_idmag *mag)
                        blkid_probe_set_label(pr,
                                (unsigned char *) sbd->sb_locktable,
                                sizeof(sbd->sb_locktable));
+
+               blkid_probe_set_uuid(pr, sbd->sb_uuid);
                return 0;
        }
+
        return -1;
 }