123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #include "volume_id_internal.h"
- struct hpfs_super {
- uint8_t magic[4];
- uint8_t version;
- } PACKED;
- #define HPFS_SUPERBLOCK_OFFSET 0x2000
- int FAST_FUNC volume_id_probe_hpfs(struct volume_id *id, uint64_t off)
- {
- struct hpfs_super *hs;
- dbg("probing at offset 0x%llx", (unsigned long long) off);
- hs = volume_id_get_buffer(id, off + HPFS_SUPERBLOCK_OFFSET, 0x200);
- if (hs == NULL)
- return -1;
- if (memcmp(hs->magic, "\x49\xe8\x95\xf9", 4) == 0) {
- return 0;
- }
- return -1;
- }
|