summaryrefslogtreecommitdiffstats
path: root/libblkid/src/superblocks/ntfs.c
Commit message (Collapse)AuthorAgeFilesLines
* libblkid: do not interpret NTFS as MBRKarel Zak2019-07-171-1/+23
| | | | | | | | | | | | | | | # mkntfs -Q -F /dev/sdc old version: # ./blkid -p /dev/sdc /dev/sdc: UUID="0E9E8C5F2F718479" TYPE="ntfs" USAGE="filesystem" PTTYPE="dos" new version:  # ./blkid -p /dev/sdc /dev/sdc: UUID="0E9E8C5F2F718479" TYPE="ntfs" USAGE="filesystem" Reported-by: Mike Fleetwood <mike.fleetwood@googlemail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: (ntfs) fix compiler warning [-Wpedantic]Karel Zak2019-01-021-6/+4Star
| | | | | | | | libblkid/src/superblocks/ntfs.c:80:2: warning: ISO C restricts enumerator values to range of 'int' (4294967295 is too large) [-Wpedantic] Addressed: https://github.com/karelzak/util-linux/pull/732 Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: (ntfs) fix cluster size checkKarel Zak2018-05-251-1/+1
| | | | | Addresses: https://github.com/karelzak/util-linux/issues/641 Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: (ntfs) enlarge cluster limit to 2MBKarel Zak2018-05-251-4/+8
| | | | | | | | | | Windows 10 Creators edition has extended the ntfs cluster limit to 2MB. As a consequence blkid does not identify recent partitions with clusters beyond 65K as ntfs ones. Addresses: https://github.com/karelzak/util-linux/issues/641 Signed-off-by: Karel Zak <kzak@redhat.com> Co-Author: Jean-Pierre André <jean-pierre.andre@wanadoo.fr>
* libblkid: Fix out of bounds reads on bad NTFS Master File TableAlden Tondettar2017-01-251-6/+6
| | | | | | | | | | | The NTFS prober does not validate certain fields in struct file_attribute, and could attempt to read the disk label from outside the space allocated for the Master File Table. Perform the appropriate checks. Note that one variable (attr_off) is now 64-bit, so a check for integer overflow has been removed as unneeded/confusing. Signed-off-by: Alden Tondettar <alden.tondettar@gmail.com>
* misc: again fixing many printf format stringsRuediger Meier2016-03-071-4/+4
| | | | | | | | | | | | | | | | | | | This is again a huge patch regarding printf format strings to fix compiler warnings seen on clang/OSX. I'm trying to follow these rules strictly: #type #format #cast uintmax_t %ju - intmax_t %jd - uint64_t PRIu64 - int64_t PRId64 - size_t %zu - ssize_t %zd - ino_t %ju (uintmax_t) off_t %jd (intmax_t) Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* libblkid: use new debug functionsKarel Zak2014-03-211-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: convert superblocks to new calling conventionHannes Reinecke2014-03-201-3/+3
| | | | | | | | | | | | | With the previous patch the scanning functions were modified to return a differentiated return code. To correctly abort scanning when an I/O error occurs we need to differentiate between 'error' (= -1) and 'not found' (= 1) in the probe functions. This patch updates all superblock scanning functions to the new calling convention. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: clean up DBG()Karel Zak2013-04-081-2/+2
| | | | | | | | | - use stderr only - use BLKID_ prefix for debug masks - don't use \n in in messages and don't use printf(), but use generic blkid_debug(). Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix NTFS prober on big-endian machinesKarel Zak2013-03-271-4/+4
| | | | | | | | | MFT_RECORD_ATTR_VOLUME_NAME = cpu_to_le32(0x60), ^ ./include/bitops.h:94:36: error: braced-group within expression allowed only inside a function Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: rewrite ntfs proberKarel Zak2012-08-271-36/+85
| | | | | | | | | - use regular NTFS bios parameters block - don't care about mirror cluster location - remove unnecessary macros - add more checks (based on Linux kernel code) Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: use unsigned ints in ntfs proberKarel Zak2012-08-271-19/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: accept small blocks for NTFS and Reiserfs in blkidVladimir 'φ-coder/phcoder' Serbinenko2012-05-041-1/+1
| | | | | | | | | libblkid is restrictive as to what it accepts as valid reiserfs or valid NTFS. One can mkfs an NTFS with 256B sectors and it's supported by ntfs-3g Reiserfs can have 512B blocks and it works both with mkfs.ntfs and Linux. Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: use top-level directory for libblkid rather than shlibs/blkidKarel Zak2011-06-091-0/+172
Signed-off-by: Karel Zak <kzak@redhat.com>