summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-01-15partx: use blkid_partlist_get_partition_by_partno()Karel Zak1-32/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-15libblkid: add blkid_partlist_get_partition_by_partno()Karel Zak4-0/+40
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14lib/sysfs: fix scanf format string [coverity scan]Karel Zak1-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14libmount: fix scanf format string [coverity scan]Karel Zak1-4/+4
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14rename: fix mem leak [coverity scan]Karel Zak1-1/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14column: fix mem leak [coverity scan]Karel Zak1-1/+3
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14more: fix mem leak [coverity scan]Karel Zak1-1/+3
... the code is so soo ugly. Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14pylibmount: import directly from pylibmount in testsKarel Zak3-3/+9
This change does not have any impact to in a standard way installed libmount impact. It's simplification for in-tree tests. Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14pylibmount: remove unncessary subdirectoryKarel Zak2-1/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14tests: update lscpu testsKarel Zak1-33/+35
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14lscpu: sort NUMA nodes to keep output human readableKarel Zak1-0/+8
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14docs: add lslogins(1) to TODOKarel Zak1-0/+11
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14tests: add partx --update testKarel Zak2-0/+11
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14tests: update partx sgi testKarel Zak1-0/+2
Since commit 4253275490926cf533bfd0bc33279729e9ff427a the libblkid lists system partitions for SGI label. Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-14partx: fix --update ranges and out of order tablesScott Moser1-25/+50
partx --update DEVICE NUMBER was broken in 2 cases: * if NUMBER != 1 * if the partition table was "out of order". Ie, where sda2 came after sda3. References: https://bugs.launchpad.net/ubuntu/+source/cloud-utils/+bug/1244662 Signed-off-by: Scott Moser <smoser@ubuntu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-13mount: update man page ext3/4 mount optionsCarlos Maiolino1-11/+31
Add missing mount options to ext3 and ext4 filesystems. This also remove resize option information from the man page. Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-13fallocate: prefer FALLOC_FL_* flags from libc headersKarel Zak1-2/+3
Reported-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-13libblkid: (nilfs2) check also backup superblockKarel Zak1-24/+42
* read also backup superblock * check which superblock is newer * set minimal device size to 1MiB Reported-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-07dmesg: fix --raw zero timestamp for kmsgKarel Zak1-8/+12
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1049438 Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-07uuidd: use pkg-config to find systemd-deamon supportSami Kerola5-818/+15
[kzak@redhat.com: - remove USE_SOCKET_ACTIVATION and use HAVE_* as we use for another libs] Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-07unshare: Add possibility to add mapping into root user in user namespaceLubomir Rintel3-2/+45
This makes it very convenient to use make use of privileged actions on CONFIG_USER_NS enabled kernels, without having to manually tinker with uid_map and gid_map to obtain required credentials (as those given upon unshare() vanish with call to execve() and lot of userspace checks for euid==0 anyway). Usage example: $ unshare --uts unshare: unshare failed: Operation not permitted $ unshare --user --uts [nfsnobody@odvarok ~]$ hostname swag hostname: you must be root to change the host name $ unshare -r --uts [root@odvarok util-linux]# hostname swag [root@odvarok util-linux]# [kzak@redhat.com: - move code to map_id() - use all-io.h - add paths to pathnames.h] Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-07cal: in man page improve grammar and wording of the reformation limitationBenno Schulenberg1-5/+6
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2014-01-06lscpu: support discontinuous NUMA nodesKarel Zak1-7/+43
lscpu fails to print proper NUMA node values in a system with discontinuous nodes. This patch adds support by creating a nodeidx array to map node numbers. Based on patch from Madhavan Srinivasan <maddy@linux.vnet.ibm.com>. Reported-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06lib/path: add path_strdup()Karel Zak2-0/+15
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06hexdump: convert a variable type according with fmtAndrew Vagin1-6/+6
hexdump works uncorrectly on Rassberry Pi (raspbian wheezy): 0000000 3200000000 3400000000 3600000000 3800000000 a00000000 000000a The problem is that the %qx format is used for printing the (short int) variable. Here is the output from hexdump with this patch: 0000000 3231 3433 3635 3837 0a39 000000a Currently raspbian uses hexdump from bsdmainutils. bsdmainutils: /usr/bin/hexdump Signed-off-by: Andrew Vagin <avagin@openvz.org>
2014-01-06hexdump: don't access hex after freeing itAndrew Vagin1-1/+5
[kzak@redhat.com: - remove unnecessary code] Signed-off-by: Andrew Vagin <avagin@openvz.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06hexdump: use xcalloc()Karel Zak1-1/+2
Reported-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06tests: libmount: skip tabfiles-py when pylibmount is disabledMike Frysinger1-0/+2
The default configure disables python support, so this test fails by default. Add a simple check for module availability. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-01-06tests: last: skip when last is not enabledMike Frysinger2-0/+4
References: https://bugs.gentoo.org/489794 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2014-01-06cal: in man page admit that any week has just one SundayBenno Schulenberg1-5/+5
Signed-off-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06cal: mention where Gregorian reformation happen in September 1752Sami Kerola1-6/+12
In September 1752 the Gregorian reformation happen in Great Britain and Dominions (including what is now the USA). One could argue the cal(1) should consider locale when determining the reformation, but such is nearly impossible implement correctly. The dates when reformation happen are split by areas that cannot be expressed with current locales, for example the Netherlands is split to two and Germany three categories depending on where in the modern country one is. Secondly the track when reformation happen is lost for some countries, Lithuania or Japan are good examples of such. One of the worst for a programmer is Sweden. They got gradual calendar change which made Swedish calendar to be completely out of sync. Later the Swedish calendar jumped in 1753 to be in sync with everyone else. Notice that some countries, including Saudi Arabia, Ethiopia, Nepal, Iran and Afghanistan, still have not adopted the Gregorian calendar. Hence the output of the cal(1) cannot be considered to be correct for everyone. References: http://calendopedia.com/gregory.htm References: http://en.wikipedia.org/wiki/Gregorian_calendar#Gregorian_reform Reviewed-by: Benno Schulenberg <bensberg@justemail.net> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2014-01-06losetup: remove warning for unsupported -e and -EKarel Zak1-6/+1
Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06losetup, mount: remove --pass-fd at allKarel Zak3-13/+3
The option is unsupported since v2.23, let's cleanup man pages and code to remove it at all. Reported-by: "Dale R. Worley" <worley@alum.mit.edu> Signed-off-by: Karel Zak <kzak@redhat.com>
2014-01-06man: Syntax and spelling fixes.Ville Skyttä3-4/+4
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2014-01-06po: add '--no-wrap' to msgmerge, to not wrap long message linesBenno Schulenberg2-1/+4
This avoids unneeded churn during POT-file renewal and PO-file updates, as the PO files at the TP are made with '--no-wrap'. Signed-off-by: Benno Schulenberg <bensberg@justemail.net> Acked-by: Sami Kerola <kerolasa@iki.fi>
2013-12-12mount: add note about "noauto" to --all descriptionKarel Zak1-1/+4
References: https://bugzilla.redhat.com/show_bug.cgi?id=1039905 Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-12libblkid: Identify extN file system properlyLukas Czerner1-180/+3
Currently when trying to identify extN file system we're playing games with searching for kernel modules and parsing /proc/filesystem. All of this just because ext4 module can be used to mount ext3 and ext2 file systems on recent kernel and also because of ext4dev. However all of this is not necessary. Ext4 module which does support mounting ext2 and ext3 file system is able to recognize and mount ext2 and ext3 type so there is no need to disguise it and ext4dev should only be ever used for testing and not as fallback when other modules are missing (use -t instead). This also introduces a bug when in situation that we only have ext4 modules with ext2/ext3 support which is not loaded and we try to mount ext2 file system we will mount it incorrectly as ext4. This will not happen if the ext4 module is already loaded. With this patch we remove all the unnecessary checks and return the real type of the file system which is on the device. This fixes the issue. However on the kernel which was not compiled with EXT4_USE_FOR_EXT23 support one would have to provide file system type (-t) to be able to mount the file system with ext4 driver. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-12textual: small inprovements to usage and man page of fstrimBenno Schulenberg2-8/+9
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
2013-12-11fstrim: de-duplicate list of filesystemsKarel Zak1-1/+15
Reported-by: Pádraig Brady <P@draigBrady.com> Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-11findmnt: add -U to de-deplicate filesystemsKarel Zak1-2/+18
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-11libmount: add mnt_table_uniq_fs()Karel Zak4-14/+158
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-11findmnt: cleanup usage()Karel Zak1-39/+34
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-10fstrim: add --all to discard all filesystemKarel Zak3-31/+202
* read /proc/self/mountinfo to get filesystems * ignore net and pseudo filesystems * ignore unaccessible filesystems (over mounted by another FS) * read disk sysfs queue/discard_granularity to detect is discard support * call FITRIM ioctl * silently ignore EOPNOTSUPP (for example LUKS without discard) and ENOTTY (for example vfat) errors Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-10libmount: add efivarfs to the list of pseudo filesystemsKarel Zak1-1/+2
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-10fstrim: cleanup usage()Karel Zak1-4/+5
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-12-10taskset: fix PERMISSIONS section of taskset man pageRik van Riel1-2/+3
A user is always allowed to change the CPU affinity of his or her own processes. CAP_SYS_NICE is only required to change the affinity of another user's process. Signed-off-by: Rik van Riel <riel@redhat.com> Reported-by: Joe Mario <jmario@redhat.com>
2013-12-06cal: use month contents structure for --year printingSami Kerola1-184/+45
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-12-06cal: use month contents structure for --three printingSami Kerola1-110/+26
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-12-06cal: add month contents structureSami Kerola1-7/+169
This changes determination of calendar month content completely, as well as outputing. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2013-12-06cal: determine how many header lines are needed at initializationSami Kerola1-31/+22
Signed-off-by: Sami Kerola <kerolasa@iki.fi>