pr->size -= pr->off;
}
- DBG(DEBUG_LOWPROBE, printf("ready for low-probing, offset=%jd, size=%jd\n",
- pr->off, pr->size));
-
if (pr->size <= 1440 * 1024 && !S_ISCHR(sb.st_mode))
pr->flags |= BLKID_TINY_DEV;
if (S_ISBLK(sb.st_mode) && ioctl(fd, CDROM_GET_CAPABILITY, NULL) >= 0)
pr->flags |= BLKID_CDROM_DEV;
#endif
+
+ DBG(DEBUG_LOWPROBE, printf("ready for low-probing, offset=%jd, size=%jd\n",
+ pr->off, pr->size));
+ DBG(DEBUG_LOWPROBE, printf("whole-disk: %s, regfile: %s\n",
+ blkid_probe_is_wholedisk(pr) ?"YES" : "NO",
+ S_ISREG(pr->mode) ? "YES" : "NO"));
+
return 0;
err:
DBG(DEBUG_LOWPROBE,
if (pr->size < 0x10000)
return -1;
+ if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
+ return -1;
+
off = ((pr->size / 0x200)-1) * 0x200;
ad = (struct adaptec_metadata *)
blkid_probe_get_buffer(pr,
if (pr->size < 0x10000)
return -1;
+ if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
+ return -1;
off = ((pr->size / 0x200) - 11) * 0x200;
hpt = (struct hpt45x_metadata *)
return 0;
}
+static int probe_highpoint37x(blkid_probe pr, const struct blkid_idmag *mag)
+{
+ if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
+ return -1;
+ return 0;
+}
+
+
const struct blkid_idinfo highpoint45x_idinfo = {
.name = "hpt45x_raid_member",
.usage = BLKID_USAGE_RAID,
const struct blkid_idinfo highpoint37x_idinfo = {
.name = "hpt37x_raid_member",
.usage = BLKID_USAGE_RAID,
+ .probefunc = probe_highpoint37x,
.magics = {
/*
* Superblok offset: 4608 bytes (9 sectors)
if (pr->size < 0x10000)
return -1;
+ if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
+ return -1;
off = ((pr->size / 0x200) - 2) * 0x200;
isw = (struct isw_metadata *)
if (pr->size < 0x10000)
return -1;
+ if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
+ return -1;
off = ((pr->size / 0x200) - 1) * 0x200;
jm = (struct jm_metadata *)
if (pr->size < 0x10000)
return -1;
+ if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
+ return -1;
off = ((pr->size / 0x200) - 1) * 0x200;
lsi = (struct lsi_metadata *)
if (pr->size < 0x10000)
return -1;
+ if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
+ return -1;
off = ((pr->size / 0x200) - 2) * 0x200;
nv = (struct nv_metadata *)
if (pr->size < 0x40000)
return -1;
+ if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
+ return -1;
for (i = 0; sectors[i] != 0; i++) {
uint64_t off;
if (pr->size < 0x10000)
return -1;
+ if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
+ return -1;
off = ((pr->size / 0x200) - 1) * 0x200;
if (pr->size < 0x10000)
return -1;
+ if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
+ return -1;
off = ((pr->size / 0x200)-1) * 0x200;