Lines Matching refs:probe
321 static int probe_ext4dev(struct blkid_probe *probe, in probe_ext4dev() argument
362 get_ext2_info(probe->dev, id, buf); in probe_ext4dev()
366 static int probe_ext4(struct blkid_probe *probe, struct blkid_magic *id, in probe_ext4() argument
410 get_ext2_info(probe->dev, id, buf); in probe_ext4()
414 static int probe_ext3(struct blkid_probe *probe, struct blkid_magic *id, in probe_ext3() argument
432 get_ext2_info(probe->dev, id, buf); in probe_ext3()
436 static int probe_ext2(struct blkid_probe *probe, struct blkid_magic *id, in probe_ext2() argument
464 get_ext2_info(probe->dev, id, buf); in probe_ext2()
468 static int probe_jbd(struct blkid_probe *probe, struct blkid_magic *id, in probe_jbd() argument
477 get_ext2_info(probe->dev, id, buf); in probe_jbd()
513 static int probe_fat(struct blkid_probe *probe, in probe_fat() argument
566 dir = (struct vfat_dir_entry *) get_buffer(probe, root_start, in probe_fat()
575 blkid_set_tag(probe->dev, "SEC_TYPE", "msdos", in probe_fat()
593 get_buffer(probe, next_off, buf_size); in probe_fat()
608 buf = get_buffer(probe, fat_entry_off, buf_size); in probe_fat()
630 blkid_set_tag(probe->dev, "LABEL", (const char *) label, label_len); in probe_fat()
631 blkid_set_tag(probe->dev, "UUID", serno, sizeof(serno)-1); in probe_fat()
642 static int probe_fat_nomagic(struct blkid_probe *probe, in probe_fat_nomagic() argument
680 return probe_fat(probe, id, buf); in probe_fat_nomagic()
683 static int probe_ntfs(struct blkid_probe *probe, in probe_ntfs() argument
722 buf_mft = get_buffer(probe, off, mft_record_size); in probe_ntfs()
732 buf_mft = get_buffer(probe, off, mft_record_size); in probe_ntfs()
741 buf_mft = get_buffer(probe, off, mft_record_size); in probe_ntfs()
784 blkid_set_tag(probe->dev, "UUID", uuid_str, 0); in probe_ntfs()
786 blkid_set_tag(probe->dev, "LABEL", label_str, 0); in probe_ntfs()
791 static int probe_xfs(struct blkid_probe *probe, in probe_xfs() argument
802 blkid_set_tag(probe->dev, "LABEL", label, sizeof(xs->xs_fname)); in probe_xfs()
803 set_uuid(probe->dev, xs->xs_uuid, 0); in probe_xfs()
807 static int probe_reiserfs(struct blkid_probe *probe, in probe_reiserfs() argument
828 set_uuid(probe->dev, rs->rs_uuid, 0); in probe_reiserfs()
830 blkid_set_tag(probe->dev, "LABEL", label, sizeof(rs->rs_label)); in probe_reiserfs()
835 static int probe_reiserfs4(struct blkid_probe *probe, in probe_reiserfs4() argument
844 set_uuid(probe->dev, rs4->rs4_uuid, 0); in probe_reiserfs4()
845 blkid_set_tag(probe->dev, "LABEL", (const char *) label, in probe_reiserfs4()
851 static int probe_jfs(struct blkid_probe *probe, in probe_jfs() argument
872 blkid_set_tag(probe->dev, "LABEL", label, sizeof(js->js_label)); in probe_jfs()
873 set_uuid(probe->dev, js->js_uuid, 0); in probe_jfs()
877 static int probe_zfs(struct blkid_probe *probe __BLKID_ATTR((unused)), in probe_zfs()
886 blkid_set_tag(probe->dev, "LABEL", pool_name, sizeof(pool_name)); in probe_zfs()
887 set_uuid(probe->dev, pool_guid, 0); in probe_zfs()
892 static int probe_luks(struct blkid_probe *probe, in probe_luks() argument
902 blkid_set_tag(probe->dev, "UUID", uuid, 40); in probe_luks()
906 static int probe_romfs(struct blkid_probe *probe, in probe_romfs() argument
917 blkid_set_tag(probe->dev, "LABEL", label, 0); in probe_romfs()
921 static int probe_cramfs(struct blkid_probe *probe, in probe_cramfs() argument
932 blkid_set_tag(probe->dev, "LABEL", label, 0); in probe_cramfs()
936 static int probe_swap0(struct blkid_probe *probe, in probe_swap0() argument
940 blkid_set_tag(probe->dev, "UUID", 0, 0); in probe_swap0()
941 blkid_set_tag(probe->dev, "LABEL", 0, 0); in probe_swap0()
945 static int probe_swap1(struct blkid_probe *probe, in probe_swap1() argument
951 probe_swap0(probe, id, buf); in probe_swap1()
958 sws = (struct swap_id_block *) get_buffer(probe, 1024, 1024); in probe_swap1()
970 blkid_set_tag(probe->dev, "LABEL", sws->sws_volume, in probe_swap1()
973 set_uuid(probe->dev, sws->sws_uuid, 0); in probe_swap1()
978 static int probe_iso9660(struct blkid_probe *probe, in probe_iso9660() argument
988 blkid_set_tag(probe->dev, "LABEL", (const char *) label, in probe_iso9660()
998 static int probe_udf(struct blkid_probe *probe, in probe_udf() argument
1010 get_buffer(probe, (blkid_loff_t) bs*2048+32768, in probe_udf()
1022 get_buffer(probe, j*bs*2048+32768, in probe_udf()
1032 return probe_iso9660(probe, id, buf); in probe_udf()
1042 static int probe_ocfs(struct blkid_probe *probe, in probe_ocfs() argument
1055 blkid_set_tag(probe->dev,"SEC_TYPE","ocfs1",sizeof("ocfs1")); in probe_ocfs()
1057 blkid_set_tag(probe->dev,"SEC_TYPE","ntocfs",sizeof("ntocfs")); in probe_ocfs()
1059 blkid_set_tag(probe->dev, "LABEL", ovl.label, ocfslabellen(ovl)); in probe_ocfs()
1060 blkid_set_tag(probe->dev, "MOUNT", ovh.mount, ocfsmountlen(ovh)); in probe_ocfs()
1061 set_uuid(probe->dev, ovl.vol_id, 0); in probe_ocfs()
1065 static int probe_ocfs2(struct blkid_probe *probe, in probe_ocfs2() argument
1073 blkid_set_tag(probe->dev, "LABEL", osb->s_label, sizeof(osb->s_label)); in probe_ocfs2()
1074 set_uuid(probe->dev, osb->s_uuid, 0); in probe_ocfs2()
1078 static int probe_oracleasm(struct blkid_probe *probe, in probe_oracleasm() argument
1086 blkid_set_tag(probe->dev, "LABEL", dl->dl_id, sizeof(dl->dl_id)); in probe_oracleasm()
1090 static int probe_gfs(struct blkid_probe *probe, in probe_gfs() argument
1102 blkid_set_tag(probe->dev, "UUID", 0, 0); in probe_gfs()
1106 blkid_set_tag(probe->dev, "LABEL", label, sizeof(sbd->sb_locktable)); in probe_gfs()
1112 static int probe_gfs2(struct blkid_probe *probe, in probe_gfs2() argument
1124 blkid_set_tag(probe->dev, "UUID", 0, 0); in probe_gfs2()
1128 blkid_set_tag(probe->dev, "LABEL", label, sizeof(sbd->sb_locktable)); in probe_gfs2()
1196 static int probe_hfs(struct blkid_probe *probe __BLKID_ATTR((unused)), in probe_hfs()
1213 blkid_set_tag(probe->dev, "UUID", uuid_str, 0); in probe_hfs()
1215 blkid_set_tag(probe->dev, "LABEL", (char *)hfs->label, hfs->label_len); in probe_hfs()
1222 static int probe_hfsplus(struct blkid_probe *probe, in probe_hfsplus() argument
1263 buf = get_buffer(probe, off + (id->bim_kboff * 1024), in probe_hfsplus()
1281 blkid_set_tag(probe->dev, "UUID", uuid_str, 0); in probe_hfsplus()
1291 buf = get_buffer(probe, off + ((__u64) cat_block * blocksize), 0x2000); in probe_hfsplus()
1324 buf = get_buffer(probe, off + leaf_off, leaf_node_size); in probe_hfsplus()
1345 blkid_set_tag(probe->dev, "LABEL", label, 0); in probe_hfsplus()
1369 static int probe_lvm2(struct blkid_probe *probe, in probe_lvm2() argument
1411 blkid_set_tag(probe->dev, "UUID", uuid, LVM2_ID_LEN+6); in probe_lvm2()
1416 static int probe_btrfs(struct blkid_probe *probe, in probe_btrfs() argument
1427 blkid_set_tag(probe->dev, "LABEL", label, sizeof(bs->label)); in probe_btrfs()
1428 set_uuid(probe->dev, bs->fsid, 0); in probe_btrfs()
1432 static int probe_f2fs(struct blkid_probe *probe, in probe_f2fs() argument
1439 set_uuid(probe->dev, bs->uuid, 0); in probe_f2fs()
1462 static uint32_t exfat_next_cluster(struct blkid_probe *probe, in exfat_next_cluster() argument
1471 next = (uint32_t *)get_buffer(probe, offset, sizeof (uint32_t)); in exfat_next_cluster()
1477 struct blkid_probe *probe, const struct exfat_super_block *sb) in find_exfat_entry_label() argument
1486 entry = (uint8_t *)get_buffer(probe, offset, EXFAT_ENTRY_SIZE); in find_exfat_entry_label()
1496 cluster = exfat_next_cluster(probe, sb, cluster); in find_exfat_entry_label()
1508 static int probe_exfat(struct blkid_probe *probe, in probe_exfat() argument
1522 label = find_exfat_entry_label(probe, sb); in probe_exfat()
1526 blkid_set_tag(probe->dev, "LABEL", (char *) utf8_label, 0); in probe_exfat()
1528 blkid_set_tag(probe->dev, "LABEL", "disk", 4); in probe_exfat()
1535 blkid_set_tag(probe->dev, "UUID", uuid, strlen(uuid)); in probe_exfat()
1665 struct blkid_probe probe; in blkid_verify() local
1709 if ((probe.fd = open(dev->bid_name, O_RDONLY)) < 0) { in blkid_verify()
1716 probe.cache = cache; in blkid_verify()
1717 probe.dev = dev; in blkid_verify()
1718 probe.sbbuf = 0; in blkid_verify()
1719 probe.buf = 0; in blkid_verify()
1720 probe.buf_max = 0; in blkid_verify()
1733 if (check_mdraid(probe.fd, uuid) == 0) { in blkid_verify()
1745 buf = get_buffer(&probe, (__u64) idx << 10, 1024); in blkid_verify()
1754 (id->bim_probe(&probe, id, buf) == 0)) { in blkid_verify()
1793 free(probe.sbbuf); in blkid_verify()
1794 free(probe.buf); in blkid_verify()
1795 if (probe.fd >= 0) in blkid_verify()
1796 close(probe.fd); in blkid_verify()