X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=extras%2Fvolume_id%2Fvolume_id%2Fntfs.c;h=f9df0e9cc366a8c8ecff4ac231d5f0f0c24bd048;hb=b0f57eb066cd897dab536ee37daab4239d136d4c;hp=84d6fbb84381249047716b067f0a85b90bf9e913;hpb=e4d4a557e53c3fbcf14bd1bb29686fd884905b53;p=elogind.git diff --git a/extras/volume_id/volume_id/ntfs.c b/extras/volume_id/volume_id/ntfs.c index 84d6fbb84..f9df0e9cc 100644 --- a/extras/volume_id/volume_id/ntfs.c +++ b/extras/volume_id/volume_id/ntfs.c @@ -118,7 +118,7 @@ int volume_id_probe_ntfs(struct volume_id *id, __u64 off) const __u8 *buf; const __u8 *val; - dbg("probing at offset %llu", off); + dbg("probing at offset 0x%llx", (unsigned long long) off); ns = (struct ntfs_super_block *) volume_id_get_buffer(id, off, 0x200); if (ns == NULL) @@ -142,8 +142,8 @@ int volume_id_probe_ntfs(struct volume_id *id, __u64 off) dbg("sectorsize 0x%x", sector_size); dbg("clustersize 0x%x", cluster_size); - dbg("mftcluster %lli", mft_cluster); - dbg("mftoffset 0x%llx", mft_off); + dbg("mftcluster %llu", (unsigned long long) mft_cluster); + dbg("mftoffset 0x%llx", (unsigned long long) mft_off); dbg("cluster per mft_record %i", ns->cluster_per_mft_record); dbg("mft record size %i", mft_record_size); @@ -184,7 +184,7 @@ int volume_id_probe_ntfs(struct volume_id *id, __u64 off) if (attr_type == MFT_RECORD_ATTR_VOLUME_INFO) { dbg("found info, len %i", val_len); info = (struct volume_info*) (((__u8 *) attr) + val_off); - snprintf(id->type_version, VOLUME_ID_FORMAT_SIZE-1, + snprintf(id->type_version, sizeof(id->type_version)-1, "%u.%u", info->major_ver, info->minor_ver); }