Lines Matching refs:probe

320 static int probe_ext4dev(struct blkid_probe *probe,  in probe_ext4dev()  argument
361 get_ext2_info(probe->dev, id, buf); in probe_ext4dev()
365 static int probe_ext4(struct blkid_probe *probe, struct blkid_magic *id, in probe_ext4() argument
409 get_ext2_info(probe->dev, id, buf); in probe_ext4()
413 static int probe_ext3(struct blkid_probe *probe, struct blkid_magic *id, in probe_ext3() argument
431 get_ext2_info(probe->dev, id, buf); in probe_ext3()
435 static int probe_ext2(struct blkid_probe *probe, struct blkid_magic *id, in probe_ext2() argument
463 get_ext2_info(probe->dev, id, buf); in probe_ext2()
467 static int probe_jbd(struct blkid_probe *probe, struct blkid_magic *id, in probe_jbd() argument
476 get_ext2_info(probe->dev, id, buf); in probe_jbd()
512 static int probe_fat(struct blkid_probe *probe, in probe_fat() argument
565 dir = (struct vfat_dir_entry *) get_buffer(probe, root_start, in probe_fat()
574 blkid_set_tag(probe->dev, "SEC_TYPE", "msdos", in probe_fat()
592 get_buffer(probe, next_off, buf_size); in probe_fat()
605 buf = get_buffer(probe, fat_entry_off, buf_size); in probe_fat()
627 blkid_set_tag(probe->dev, "LABEL", (const char *) label, label_len); in probe_fat()
628 blkid_set_tag(probe->dev, "UUID", serno, sizeof(serno)-1); in probe_fat()
639 static int probe_fat_nomagic(struct blkid_probe *probe, in probe_fat_nomagic() argument
677 return probe_fat(probe, id, buf); in probe_fat_nomagic()
680 static int probe_ntfs(struct blkid_probe *probe, in probe_ntfs() argument
719 buf_mft = get_buffer(probe, off, mft_record_size); in probe_ntfs()
729 buf_mft = get_buffer(probe, off, mft_record_size); in probe_ntfs()
738 buf_mft = get_buffer(probe, off, mft_record_size); in probe_ntfs()
781 blkid_set_tag(probe->dev, "UUID", uuid_str, 0); in probe_ntfs()
783 blkid_set_tag(probe->dev, "LABEL", label_str, 0); in probe_ntfs()
788 static int probe_xfs(struct blkid_probe *probe, in probe_xfs() argument
799 blkid_set_tag(probe->dev, "LABEL", label, sizeof(xs->xs_fname)); in probe_xfs()
800 set_uuid(probe->dev, xs->xs_uuid, 0); in probe_xfs()
804 static int probe_reiserfs(struct blkid_probe *probe, in probe_reiserfs() argument
825 set_uuid(probe->dev, rs->rs_uuid, 0); in probe_reiserfs()
827 blkid_set_tag(probe->dev, "LABEL", label, sizeof(rs->rs_label)); in probe_reiserfs()
832 static int probe_reiserfs4(struct blkid_probe *probe, in probe_reiserfs4() argument
841 set_uuid(probe->dev, rs4->rs4_uuid, 0); in probe_reiserfs4()
842 blkid_set_tag(probe->dev, "LABEL", (const char *) label, in probe_reiserfs4()
848 static int probe_jfs(struct blkid_probe *probe, in probe_jfs() argument
869 blkid_set_tag(probe->dev, "LABEL", label, sizeof(js->js_label)); in probe_jfs()
870 set_uuid(probe->dev, js->js_uuid, 0); in probe_jfs()
874 static int probe_zfs(struct blkid_probe *probe, struct blkid_magic *id, in probe_zfs() argument
882 blkid_set_tag(probe->dev, "LABEL", pool_name, sizeof(pool_name)); in probe_zfs()
883 set_uuid(probe->dev, pool_guid, 0); in probe_zfs()
888 static int probe_luks(struct blkid_probe *probe, in probe_luks() argument
897 blkid_set_tag(probe->dev, "UUID", uuid, sizeof(uuid)); in probe_luks()
901 static int probe_romfs(struct blkid_probe *probe, in probe_romfs() argument
912 blkid_set_tag(probe->dev, "LABEL", label, 0); in probe_romfs()
916 static int probe_cramfs(struct blkid_probe *probe, in probe_cramfs() argument
927 blkid_set_tag(probe->dev, "LABEL", label, 0); in probe_cramfs()
931 static int probe_swap0(struct blkid_probe *probe, in probe_swap0() argument
935 blkid_set_tag(probe->dev, "UUID", 0, 0); in probe_swap0()
936 blkid_set_tag(probe->dev, "LABEL", 0, 0); in probe_swap0()
940 static int probe_swap1(struct blkid_probe *probe, in probe_swap1() argument
946 probe_swap0(probe, id, buf); in probe_swap1()
953 sws = (struct swap_id_block *) get_buffer(probe, 1024, 1024); in probe_swap1()
965 blkid_set_tag(probe->dev, "LABEL", sws->sws_volume, in probe_swap1()
968 set_uuid(probe->dev, sws->sws_uuid, 0); in probe_swap1()
973 static int probe_iso9660(struct blkid_probe *probe, in probe_iso9660() argument
983 blkid_set_tag(probe->dev, "LABEL", (const char *) label, in probe_iso9660()
993 static int probe_udf(struct blkid_probe *probe, in probe_udf() argument
1005 get_buffer(probe, bs*2048+32768, sizeof(isosb)); in probe_udf()
1016 get_buffer(probe, j*bs*2048+32768, in probe_udf()
1026 return probe_iso9660(probe, id, buf); in probe_udf()
1036 static int probe_ocfs(struct blkid_probe *probe, in probe_ocfs() argument
1049 blkid_set_tag(probe->dev,"SEC_TYPE","ocfs1",sizeof("ocfs1")); in probe_ocfs()
1051 blkid_set_tag(probe->dev,"SEC_TYPE","ntocfs",sizeof("ntocfs")); in probe_ocfs()
1053 blkid_set_tag(probe->dev, "LABEL", ovl.label, ocfslabellen(ovl)); in probe_ocfs()
1054 blkid_set_tag(probe->dev, "MOUNT", ovh.mount, ocfsmountlen(ovh)); in probe_ocfs()
1055 set_uuid(probe->dev, ovl.vol_id, 0); in probe_ocfs()
1059 static int probe_ocfs2(struct blkid_probe *probe, in probe_ocfs2() argument
1067 blkid_set_tag(probe->dev, "LABEL", osb->s_label, sizeof(osb->s_label)); in probe_ocfs2()
1068 set_uuid(probe->dev, osb->s_uuid, 0); in probe_ocfs2()
1072 static int probe_oracleasm(struct blkid_probe *probe, in probe_oracleasm() argument
1080 blkid_set_tag(probe->dev, "LABEL", dl->dl_id, sizeof(dl->dl_id)); in probe_oracleasm()
1084 static int probe_gfs(struct blkid_probe *probe, in probe_gfs() argument
1096 blkid_set_tag(probe->dev, "UUID", 0, 0); in probe_gfs()
1100 blkid_set_tag(probe->dev, "LABEL", label, sizeof(sbd->sb_locktable)); in probe_gfs()
1106 static int probe_gfs2(struct blkid_probe *probe, in probe_gfs2() argument
1118 blkid_set_tag(probe->dev, "UUID", 0, 0); in probe_gfs2()
1122 blkid_set_tag(probe->dev, "LABEL", label, sizeof(sbd->sb_locktable)); in probe_gfs2()
1159 static int probe_hfs(struct blkid_probe *probe __BLKID_ATTR((unused)), in probe_hfs()
1176 blkid_set_tag(probe->dev, "UUID", uuid_str, 0); in probe_hfs()
1178 blkid_set_tag(probe->dev, "LABEL", (char *)hfs->label, hfs->label_len); in probe_hfs()
1183 static int probe_hfsplus(struct blkid_probe *probe, in probe_hfsplus() argument
1224 buf = get_buffer(probe, off + (id->bim_kboff * 1024), in probe_hfsplus()
1242 blkid_set_tag(probe->dev, "UUID", uuid_str, 0); in probe_hfsplus()
1249 buf = get_buffer(probe, off + (cat_block * blocksize), 0x2000); in probe_hfsplus()
1282 buf = get_buffer(probe, off + leaf_off, leaf_node_size); in probe_hfsplus()
1303 blkid_set_tag(probe->dev, "LABEL", label, 0); in probe_hfsplus()
1327 static int probe_lvm2(struct blkid_probe *probe, in probe_lvm2() argument
1369 blkid_set_tag(probe->dev, "UUID", uuid, LVM2_ID_LEN+6); in probe_lvm2()
1374 static int probe_btrfs(struct blkid_probe *probe, in probe_btrfs() argument
1385 blkid_set_tag(probe->dev, "LABEL", label, sizeof(bs->label)); in probe_btrfs()
1386 set_uuid(probe->dev, bs->fsid, 0); in probe_btrfs()
1390 static int probe_f2fs(struct blkid_probe *probe, in probe_f2fs() argument
1397 set_uuid(probe->dev, bs->uuid, 0); in probe_f2fs()
1516 struct blkid_probe probe; in blkid_verify() local
1560 if ((probe.fd = open(dev->bid_name, O_RDONLY)) < 0) { in blkid_verify()
1567 probe.cache = cache; in blkid_verify()
1568 probe.dev = dev; in blkid_verify()
1569 probe.sbbuf = 0; in blkid_verify()
1570 probe.buf = 0; in blkid_verify()
1571 probe.buf_max = 0; in blkid_verify()
1584 if (check_mdraid(probe.fd, uuid) == 0) { in blkid_verify()
1596 buf = get_buffer(&probe, idx << 10, 1024); in blkid_verify()
1605 (id->bim_probe(&probe, id, buf) == 0)) { in blkid_verify()
1644 free(probe.sbbuf); in blkid_verify()
1645 free(probe.buf); in blkid_verify()
1646 if (probe.fd >= 0) in blkid_verify()
1647 close(probe.fd); in blkid_verify()