ntfs-3g源码改动:
1、ntfscluster.c 400行while改为如下,目的是便于输出结果用grep,sed或awk加工
while ((rec = find_attribute(AT_UNUSED, ctx))) {
ntfs_log_info(" 0x%02x - ", (int)le32_to_cpu(rec->type));
if (rec->non_resident) {
ntfs_log_info("non-resident\n");
runs = ntfs_mapping_pairs_decompress(vol, rec, NULL);
if (runs) {
ntfs_log_info(" INODE ATTR RUN# VCN LCN Length\n");
for (i = 0; runs[i].length > 0; i++) {
ntfs_log_info(" %8lld 0x%02x %8lld %8lld %8lld %8lld\n",
(long long)(ino->mft_no & 0x0000FFFFFFFFFFFFUL),
(int)le32_to_cpu(rec->type),
(long long)i,
(long long)runs[i].vcn,
(long long)runs[i].lcn,
(long long)
runs[i].length);
}
ntfs_log_info(" [INFO]:0x%02xRuns:%d,Inode:%lld,path:%s\n",
(int)le32_to_cpu(rec->type),
i,
(long long)(ino->mft_no & 0x0000FFFFFFFFFFFFUL),
buffer);
free(runs);
}
} else {
ntfs_log_info("resident\n");
}
}
Linux中生成考核用的NTFS文件系统(2)
内容版权声明:除非注明,否则皆为本站原创文章。