2 * volume_id - reads filesystem label and uuid
4 * Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation version 2 of the License.
26 #include "libvolume_id.h"
29 struct jfs_super_block {
42 #define JFS_SUPERBLOCK_OFFSET 0x8000
44 int volume_id_probe_jfs(struct volume_id *id, uint64_t off, uint64_t size)
46 struct jfs_super_block *js;
48 info("probing at offset 0x%llx\n", (unsigned long long) off);
50 js = (struct jfs_super_block *) volume_id_get_buffer(id, off + JFS_SUPERBLOCK_OFFSET, 0x200);
54 if (memcmp(js->magic, "JFS1", 4) != 0)
57 volume_id_set_label_raw(id, js->label, 16);
58 volume_id_set_label_string(id, js->label, 16);
59 volume_id_set_uuid(id, js->uuid, 0, UUID_DCE);
61 volume_id_set_usage(id, VOLUME_ID_FILESYSTEM);