summaryrefslogtreecommitdiffstats
path: root/libblkid
Commit message (Collapse)AuthorAgeFilesLines
* libblkid: verify arroy bound before reference [cppcheck]Sami Kerola2012-02-081-1/+1
| | | | | | [libblkid/src/read.c:428]: (style) Array index end is used before limits check Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libblkid: allow return value to indicate error [cppcheck]Sami Kerola2012-02-081-1/+1
| | | | | | [libblkid/src/probe.c:1207]: (style) Checking if unsigned variable 'len' is less than zero. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libblkid: clarify operation order [cppcheck]Sami Kerola2012-02-081-1/+1
| | | | | | [libblkid/src/cache.c:265]: (style) Suspicious condition (assignment+comparison), it can be clarified with parentheses Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libblkid: improve reiserfs and btrfs min. size limitsKarel Zak2012-02-082-3/+3
| | | | | Reported-by: Rogier Goossens <goossens.rogier@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: remove >> 9 from GPT codeKarel Zak2012-02-061-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix suspicious implicit sign extension [coverity scan]Karel Zak2012-01-311-1/+1
| | | | | | ... thanks to "value preserving rules". Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: more robust idx usage [coverity scan]Karel Zak2012-01-311-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: make fd usage in md code more robustKarel Zak2012-01-311-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: comparing an array to null is not useful [coverity scan]Karel Zak2012-01-313-5/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: check for NULL in blkid_flush_cache() [coverity scan]Karel Zak2012-01-311-2/+4
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix blkid_do_fullprobe() [coverity scan]Karel Zak2012-01-311-2/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: check blkid_probe_set_magic() return in ultrix code [coverity scan]Karel Zak2012-01-311-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: check blkid_probe_set_magic() return in GPT code [coverity scan]Karel Zak2012-01-311-2/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: check return values in safe_probe code [coverity scan]Karel Zak2012-01-311-4/+11
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: check blkid_probe_set_magic() return value [coverity scan]Karel Zak2012-01-311-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: check rename() return value [coverity scan]Karel Zak2012-01-311-3/+9
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix use-after-free [coverity scan]Karel Zak2012-01-301-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix limit for OCFS checkKarel Zak2012-01-301-2/+2
| | | | | | | | | | | | | | Rogier Goossens wrote: While testing KDE partitionmanager, I discovered that blkid did not detect the test OCFS2 filesystem I created. After some investigation, it appeared that it will assume the filesystem cannot be OCFS2 if smaller than 108M. However, mkfs.ocfs2 from ocfs2-tools (1.6.3) will happily create filesystems that are much smaller, only failing below approx. 15000 1k blocks, and below approx. 6000 4k blocks. Reported-by: Rogier Goossens <goossens.rogier@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: move cache to /run on new systemsKarel Zak2012-01-255-40/+47
| | | | | | | | | | | | | | | | | | | | | | Why? * read-only root * /etc is pretty bad place for caches * all is usually cached by udev in /dev/disk/by-* and libblkid is able to use these symlinks * boot persistent cache is attractive for very small subset of Linux machines (and they already need extra udev tunning otherwise udev will probe all block devices during boot) * the default is possible to override in /etc/blkid.conf The systems without /run directory will not be affected by this change. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid; fix memory leak in blkid_probe_get_wholedisk_probe()Karel Zak2011-12-211-0/+3
| | | | | Reported-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: minor docs changesFrancesco Cosoleto2011-12-162-9/+9
| | | | Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* build-sys: check HAVE_ definitions with #ifdef [smatch scan]Sami Kerola2011-12-027-17/+17
| | | | | | Fix to `warning: undefined preprocessor identifier' messages. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libblkid: fix mac partition detectionFrancesco Cosoleto2011-11-221-5/+7
| | | | | | | This fixes the buffer length passed to blkid_probe_get_buffer() calls, and the block size byte order (on little-endian systems). Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* libblkid: export PTMAGIC also if only PTTYPE requestedKarel Zak2011-11-152-8/+8
| | | | | Reported-by: David Zeuthen <davidz@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: export info about PT magic stringsKarel Zak2011-11-134-9/+41
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add BLKID_PARTS_MAGICKarel Zak2011-11-115-17/+36
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: add blkid_do_wipe()Karel Zak2011-11-113-0/+96
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: don't call CDROM_GET_CAPABILITY for partitionsKarel Zak2011-11-101-1/+4
| | | | | Reported-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: silence a format string warning [-Wformat]Francesco Cosoleto2011-11-091-1/+1
| | | | | | | | | | | | Fix the following clang warning: exfat.c:130:41: warning: conversion specifies type 'unsigned short' but the argument has type 'uint8_t' (aka 'unsigned char') [-Wformat] blkid_probe_sprintf_version(pr, "%hu.%hu", ~~^ %c Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
* misc: use %m in format string instead of %s and strerror(errno)Petr Uzel2011-09-272-6/+5Star
| | | | Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
* libblkid: remove unnecessary position check from list_for_each_safe loopsKarel Zak2011-09-122-6/+1Star
| | | | | | | | | | The position pointer is dereferenced before the check in the for() in the list_for_each_safe macro. Note that struct list_head should not contain NULL pointers. See INIT_LIST_HEAD() macro. Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix smatch warningSami Kerola2011-09-101-1/+1
| | | | | | libblkid/src/probe.c +798 blkid_probe_get_idmag(32) error: we previously assumed 'id' could be null. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libblkid: DRBD proxy data-log identification.Philipp Marek2011-09-074-0/+58
| | | | | Signed-off-by: Philipp Marek <philipp.marek@linbit.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: new magic for 8.4 style (unclean) activity log.Philipp Marek2011-09-071-2/+4
| | | | Signed-off-by: Philipp Marek <philipp.marek@linbit.com>
* docs: use .LGPL extension for file with GNU Lesser LicenseKarel Zak2011-08-311-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'docs-dir' of https://github.com/kerolasa/lelux-utiliteetitKarel Zak2011-08-314-589/+9Star
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'docs-dir' of https://github.com/kerolasa/lelux-utiliteetit: docs: remove duplicated text docs: require kernel support before accepting use of it docs: note about independent super block structs docs: add libmount & libblkid debug instructions Documentation: add debugging doc arch: start using arch as a usage() example docs: new file Documentation/release-schedule.txt docs: move setuid information from reame to hwclock.8 docs: clean up old readme files docs: copy contributors from legacy files to AUTHORS docs: new file Documentation/howto-man-page.txt docs: new file Documentation/source-code-management.txt docs: new file Documentation/howto-contribute.txt docs: new file Documentation/howto-compilation.txt docs: tell what the Documentation/ is about docs: add usage() howto for contributors docs: Documentation directory added docs: remove README.clear
| * docs: remove duplicated textSami Kerola2011-08-301-0/+8
| | | | | | | | | | | | | | | | | | | | Duplicate text is dealt by referring to license files. The `pg' command does not need separated license file because the source file has same text at top of it. http://www.spinics.net/lists/util-linux-ng/msg05069.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
| * docs: Documentation directory addedSami Kerola2011-08-123-589/+1Star
| | | | | | | | | | | | | | | | Move readme, licence, change log, relese notes and other supplementary files to a Documentation directory. This commit does not change contents of any other but few Makefile.am files. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | docs: uniformize the header and footer lines in man pagesBenno Schulenberg2011-08-221-1/+1
| | | | | | | | | | | | | | | | | | | | Use dates without the day, use the full month name, put "util-linux" in the lower left corner, and "User Commands" or "System Administration" at the top center. Also improve here and there the one-line program description. Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
* | libblkid: befs validate di_br_size !=0 and br_per_di_br != 0Timo Warns2011-08-151-0/+7
|/ | | | | | | Validate that di_br_size !=0 and br_per_di_br != 0. If one of them is 0, a division-by-zero error will be triggered. Signed-off-by: Timo Warns <warns@pre-sense.de>
* libblkid: fix compiler warnings [-Wunused-parameter -Wsign-compare]Karel Zak2011-08-023-12/+16
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: [superblocks] fix compiler warnings [-Wunused-parameter ↵Karel Zak2011-08-0222-57/+83
| | | | | | -Wsign-compare] Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: [partitions] fix compiler warnings [-Wunused-parameter -Wsign-compare]Karel Zak2011-08-0211-28/+38
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: [topology] fix compiler warnings [-Wunused-parameter -Wsign-compare]Karel Zak2011-08-027-16/+25
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: remove and ignore generated filesKarel Zak2011-07-282-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: fix gtk-doc distcleanKarel Zak2011-07-271-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: minor change in man pageKarel Zak2011-07-261-22/+17Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'cramfs' of https://github.com/kerolasa/lelux-utiliteetitKarel Zak2011-07-261-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'cramfs' of https://github.com/kerolasa/lelux-utiliteetit: include: move fsck return values to exitcodes.h include: move disk-utils/mkfs.h -> include/exitcodes.h mkfs.cramfs: coding style mkfs.cramfs: include-what-you-use header check mkfs.cramfs: error printing fixes mkfs.cramfs: convert spaces to tabs mkfs.cramfs: validate numeric user inputs mkfs.cramfs: few symbolic exit codes where missing md5: use symbolical digest length mkfs.cramfs: use program_invocation_short_name mkfs.cramfs: use xalloc.h fsck.cramfs: add missed strings to translation fsck.cramfs: coding style fsck.cramfs: use xalloc.h fsck.cramfs: retire die function cramfs.h: coding style cramfs: use stdint.h instead of u{8,16,32} cramfs_common: coding style Conflicts: disk-utils/Makefile.am Signed-off-by: Karel Zak <kzak@redhat.com>
| * md5: use symbolical digest lengthSami Kerola2011-07-211-3/+3
| | | | | | | | | | | | | | Magic hash lenght number 16 is turned to a definition MD5LENGTH, and put into use everywhere where md5 checksum is in use. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | libblkid: vfat big endian fixJindrich Makovicka2011-07-261-1/+1
| | | | | | | | | | | | | | when getting the next cluster id, clear the 4 most significant bits after converting to machine endian Signed-off-by: Jindrich Makovicka <makovick@gmail.com>