summaryrefslogtreecommitdiff
path: root/libblkid/src
AgeCommit message (Collapse)AuthorFilesLines
2012-07-27build-sys: fix build without libsKarel Zak1-6/+15
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-26libblkid: add noreturn function attributeSami Kerola2-2/+2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-26libblkid: fix compiler warning [-Wsign-compare]Karel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16Merge branch '2012wk28'Karel Zak1-2/+0
* 2012wk28: translation: unify file open error messages translation: unify stat error messages utmpdump: use help and version output macros su: align with howto-usage-function fdisk: make if clause easier to read look: remove extra semicolon utmpdump: remove unused variable swapon: remove unused variables lib/loopdev: minor bug fix: add missing semicolon lib/pager: minor compiler warning fixes libblkid: remove duplicate entries in symbols
2012-07-16libblkid: remove duplicate entries in symbolsSami Kerola1-2/+0
The commit a0487b1cb5beffb8f6783476664b01e8833e0ea8 added symbol dublicates. The symbols should only be listed in BLKID_1.0 segment. /usr/bin/ld.gold: warning: using 'BLKID_1.0' as version for 'blkid_probe_all' which is also named in version 'BLKID_2.15' in script /usr/bin/ld.gold: warning: using 'BLKID_1.0' as version for 'blkid_probe_all_new' which is also named in version 'BLKID_2.15' in script copying selected object files to avoid basename conflicts... Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16libblkid: cast blkid_loff_t to unsigned long longPetr Uzel1-2/+2
Get rid of gcc warning and fix build with -Werror Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-07-09fix buffer overrun in some calls to sscanfKarel Zak2-2/+2
Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-09libblkid: cleanup _attribute__ usageKarel Zak2-4/+4
2012-07-07use proper printf format spec %lunick black1-1/+1
2012-07-07use memcpy() to cope with possible misalignmentnick black1-3/+2
2012-07-07properly check for ansi c99 vsnprint truncationnick black1-1/+1
2012-07-07use GCC format __attribute__ on sprinfnick black1-1/+3
2012-06-26build-sys: cleanup .gitignore filesKarel Zak1-0/+1
- move all binaries to top-level .gitignore - remove unnecessary */.gitignore files Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26build-sys: convert lib/ to libcommon.laKarel Zak1-10/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26build-sys: convert libblkid/ to moduleKarel Zak6-263/+228
- create module - remove unused libblkid/src/tst_types.c test Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-15libblkid: update dm-verity scanMilan Broz1-14/+19
New superblock now contains UUID. Old version is not going to be used. Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-06-12libblkid: trust in udev symlinks, don't verifyKarel Zak2-1/+8
The libblkid always verify that /dev/disk/by-* symlinks match with on-device LABELs/UUIDs. It means that all requests (e.g. mount -L | -U) generates extra superblocks scans on the device. Currently, many users and tools (GNOME, systemd, ...etc) use the symlink directly and udev maintains the symlinks by inotify (+watch rule). It seems better for system performance to disable the extra paranoid mode and trust in udev. Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-05libblkid: add dm-verity hash device detectionMilan Broz3-0/+43
dm-verity can use separate device for hash verification, in this case there is a superblock in the first sector. See http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/device-mapper/verity.txt for more info. Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-05-15include: rename writeall.h to all-io.hPetr Uzel1-1/+1
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-05-04libblkid: support UFS UUIDVladimir 'φ-coder/phcoder' Serbinenko1-0/+19
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-05-04libblkid: accept small blocks for NTFS and Reiserfs in blkidVladimir 'φ-coder/phcoder' Serbinenko2-4/+4
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>
2012-04-23libblkid: befs: declare functions staticPetr Uzel1-6/+6
Since commit 0b0c231f64d02e682 (swapon: move generic code to swapon-common.c), if util-linux is configured with --enable-static --disable-shared --enable-libmount-mount options, the build fails with the following error: ... libtool: link: gcc -std=gnu99 -fsigned-char -ggdb -O1 -Wall -D_FORTIFY_SOURCE=2 -o switch_root switch_root.o /home/petr/upstream/util-linux/libblkid/src/.libs/libblkid.a(befs.o): In function `get_uuid': /home/petr/upstream/util-linux/libblkid/src/superblocks/befs.c:333: multiple definition of `get_uuid' swapon-swapon-common.o:/home/petr/upstream/util-linux/sys-utils/swapon-common.c:99: first defined here collect2: ld returned 1 exit status /bin/sh ../libtool --tag=CC --mode=link gcc -std=gnu99 -fsigned-char -ggdb -O1 -Wall -D_FORTIFY_SOURCE=2 -o flock flock.o strutils.o libtool: link: gcc -std=gnu99 -fsigned-char -ggdb -O1 -Wall -D_FORTIFY_SOURCE=2 -o pivot_root pivot_root.o make[2]: *** [swapon] Error 1 make[2]: *** Waiting for unfinished jobs.... /home/petr/upstream/util-linux/libblkid/src/.libs/libblkid.a(befs.o): In function `get_uuid': /home/petr/upstream/util-linux/libblkid/src/superblocks/befs.c:333: multiple definition of `get_uuid' swapoff-swapon-common.o:/home/petr/upstream/util-linux/sys-utils/swapon-common.c:99: first defined here Fix by declaring befs funcitons static. Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-04-23Fix typos found by misspellingsBernhard Voelker5-8/+8
The tool misspellings (https://github.com/lyda/misspell-check) detected several typos. Command used: $ git ls-files | grep -v ^po/ | misspellings -f - * isosize: Fix typo in usage string. * configure.ac: Fix typo in help string of --enable-most-builds option. * fdisk: Fix typo in man page. * libblkid, blkid, mount: Likewise. * Fix various typos in docs and in source code comments. Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>
2012-04-19libblkid: add support for PARTUUID= and PARTLABEL=Karel Zak2-1/+20
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-27sysfs: move blkid_devno_to_wholedisk to sysfs_devno_to_wholediskMichal Luscon1-129/+1
Signed-off-by: Michal Luscon <mluscon@redhat.com>
2012-03-21libblkid: generate pseudo-UUID for ISO9660 image fileAndreas Vogel1-1/+63
The UUID is generated from the modification date in the ISO volume descriptor. As GRUB 2 is using this definition for the pseudo UUID for ISO9660 files libblkid would be perfectly compatible with GRUB 2. Signed-off-by: Andreas Vogel <Andreas.Vogel@anvo-it.de> Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-06libblkid: fix sysfs context usageKarel Zak3-6/+7
Reported-by: Elan Ruusamäe <glen@delfi.ee> Signed-off-by: Karel Zak <kzak@redhat.com>
2012-03-01libblkid: properly reset chain in probe_do_wipe()Karel Zak1-5/+35
The command wipefs is not able to remove all signatures from the device if the first detected signature is linux raid. The another superblock signatures are ignored. For example: # pvcreate /dev/sdb1 # mdadm --create md8 --metadata=0.90 --chunk=64 --level=0 \ --raid-devices=2 /dev/sdb1 /dev/sdb2 # wipefs -a /dev/sdb1 will delete the linux raid signature only. Reported-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-28build-sys: enhance readability of the autotools filesSami Kerola4-96/+133
Several horizontal lists are turned to vertical, and sorted to alphabetical order. Additionally spaces are converted to tabs where ever possible. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-02-24docs: corrections to FSF license files, and postal addressSami Kerola2-2/+2
The COPYING and Documentation/licenses/COPYING* files are being replaced by files from GNU web site. http://www.gnu.org/licenses/gpl-2.0.txt http://www.gnu.org/licenses/lgpl-2.1.txt Postal addresses to FSF in other files are updated to match with the address in license files. Reference: http://lists.gnu.org/archive/html/freefont-announce/2005-04/msg00001.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-02-22libblkid: add BLKID_PARTS_MAGIC to blkid_do_wipe() docsKarel Zak1-1/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-08libblkid: verify arroy bound before reference [cppcheck]Sami Kerola1-1/+1
[libblkid/src/read.c:428]: (style) Array index end is used before limits check Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-02-08libblkid: allow return value to indicate error [cppcheck]Sami Kerola1-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>
2012-02-08libblkid: clarify operation order [cppcheck]Sami Kerola1-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>
2012-02-08libblkid: improve reiserfs and btrfs min. size limitsKarel Zak2-3/+3
Reported-by: Rogier Goossens <goossens.rogier@gmail.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2012-02-06libblkid: remove >> 9 from GPT codeKarel Zak1-2/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31libblkid: fix suspicious implicit sign extension [coverity scan]Karel Zak1-1/+1
... thanks to "value preserving rules". Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31libblkid: more robust idx usage [coverity scan]Karel Zak1-2/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31libblkid: make fd usage in md code more robustKarel Zak1-2/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31libblkid: comparing an array to null is not useful [coverity scan]Karel Zak3-5/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31libblkid: check for NULL in blkid_flush_cache() [coverity scan]Karel Zak1-2/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31libblkid: fix blkid_do_fullprobe() [coverity scan]Karel Zak1-2/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31libblkid: check blkid_probe_set_magic() return in ultrix code [coverity scan]Karel Zak1-2/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31libblkid: check blkid_probe_set_magic() return in GPT code [coverity scan]Karel Zak1-2/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31libblkid: check return values in safe_probe code [coverity scan]Karel Zak1-4/+11
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31libblkid: check blkid_probe_set_magic() return value [coverity scan]Karel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-31libblkid: check rename() return value [coverity scan]Karel Zak1-3/+9
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-30libblkid: fix use-after-free [coverity scan]Karel Zak1-0/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-30libblkid: fix limit for OCFS checkKarel Zak1-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>
2012-01-25blkid: move cache to /run on new systemsKarel Zak4-8/+41
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>