summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* hexdump: rename in() to first_letter()Ondrej Oprala2013-11-081-8/+8
| | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* hexdump: get rid of redundant typecastsOndrej Oprala2013-11-082-10/+10
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: minor formatting improvements in display()Ondrej Oprala2013-11-081-13/+22
| | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* hexdump: rewrite cluttered case statementsOndrej Oprala2013-11-081-133/+104Star
| | | | | | | [kzak@redhat.com: - use strchr() for in() macro] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* hexdump: use xasprintf in conv_c()Ondrej Oprala2013-11-081-2/+4
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: delete redundant typecastsOndrej Oprala2013-11-081-10/+10
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: use GNU case ranges where possibleOndrej Oprala2013-11-081-4/+4
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: use xstrncpy in add()Ondrej Oprala2013-11-081-2/+2
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: simplify newsyntax argumentsOndrej Oprala2013-11-083-7/+5Star
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: minor formatting improvementsOndrej Oprala2013-11-081-18/+18
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: rename next{fs,fu,pr} to {fs,fu,pr}listOndrej Oprala2013-11-084-33/+33
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: rewrite addfile() to use getline()Ondrej Oprala2013-11-081-9/+8Star
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: formatting and variable name cleanupOndrej Oprala2013-11-085-27/+33
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: rewrite() formatting improvementsOndrej Oprala2013-11-081-29/+28Star
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: rewrite escape()Ondrej Oprala2013-11-081-1/+3
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: rewrite rewrite()Ondrej Oprala2013-11-081-105/+122
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump:rewrite add()Ondrej Oprala2013-11-081-5/+3Star
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: rewrite next()Ondrej Oprala2013-11-081-1/+1
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: rewrite get()Ondrej Oprala2013-11-081-1/+2
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: rewrite addfile()Ondrej Oprala2013-11-081-6/+8
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: cleanup of redundant symbols/repeating literalsOndrej Oprala2013-11-083-26/+27
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: use list.h queues and rewrite redundant for cyclesOndrej Oprala2013-11-085-104/+141
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* hexdump: add basic testsOndrej Oprala2013-11-0810-26/+306
| | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: simple typoPhillip Susi2013-11-081-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: add note about make distcheckKarel Zak2013-11-081-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* blkid: escape quotes in the outputKarel Zak2013-11-071-4/+8
| | | | | | | | | | | | | # e2label /dev/loop0 'La"bel' # blkid -p /dev/loop0 /dev/loop0: LABEL="La"bel" .... new version: /dev/loop0: LABEL="La\"bel" .... Reported-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add sparc64 lscpu testKarel Zak2013-11-052-0/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lscpu: support non sequentially numbering of CPUsAlexander Troosh2013-11-052-49/+87
| | | | | | | | | | | | | | lscpu don't work correctly on my system with: $ cat /sys/devices/system/cpu/possible 0-1,4-5,8-9,12-13 [kzak@redhat.com: - coding style, - add commit message - add real_cpu_num() macro, - fix functions where we need idx as well as CPU number] Signed-off-by: Karel Zak <kzak@redhat.com>
* blockdev: don't use HDIO_GETGEOPhillip Susi2013-11-041-5/+15
| | | | | | | | | | | | | blockdev was still using this depreciated ioctl and that was causing blockdev --report to fail on loop and nbd devices. Switch to reading the partition start from sysfs instead. This also allows it to correctly report > 2^32 sector counts. [kzak@redhat.com: - check sysfs_init() return, - use uint64_t rather than unsigned long long] Signed-off-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* blkdiscard: BLKSSZGET fills in an int, not a uint64Theodore Ts'o2013-11-041-2/+2
| | | | | Reported-by: Jason Cipriani <jason.cipriani@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
* libmount: update utab after successful extern helper mountKarel Zak2013-11-043-10/+84
| | | | | | | | | | | | | | | This patch allows to maintain private utab libmount file also for external mount/umount helpers that are not linked with libmount. The libmount check if utab has been updated after successful extern helper execution (status=0). If not then the file is updated. This patch affects only 'user' fstab mount option. So, for example with suid mount.cifs you can use: //server/foo /mnt cifs username=foo,noauto,user Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: allow to use -s (sloppy) for all external helpersKarel Zak2013-11-041-6/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: fix swap-area versionKarel Zak2013-11-041-3/+3
| | | | | | | | | | | * v1: hdr->version = 1, magic string = SWAPSPACE2 * v0: no versio in header, magic string = SWAP-SPACE The mistake has been introduced in the old udev volume_id binary where the version was set according to magic string. Reported-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (sun) fix end sectors with +1 errorKarel Zak2013-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | partx (or parted, etc.): NR START END SECTORS SIZE NAME UUID 1 0 410047 410048 200.2M 2 410048 82329055 81919008 39.1G 4 82329056 102807615 20478560 9.8G 5 102807616 110999039 8191424 3.9G 6 110999040 312580543 201581504 96.1G and the same with fdisk: Device Flag Start End Blocks Id System /dev/loop0p1 0 410048 205024 1 Boot /dev/loop0p2 410048 82329056 40959504 83 Linux native /dev/loop0p3 0 312580544 156290272 5 Whole disk /dev/loop0p4 82329056 102807616 10239280 83 Linux native /dev/loop0p5 102807616 110999040 4095712 83 Linux native /dev/loop0p6 110999040 312580544 100790752 8e Linux LVM Reported-by: Phillip Susi <psusi@ubuntu.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* mount: improve -s man mage infoKarel Zak2013-10-311-4/+3Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) add /home GUIDKarel Zak2013-10-311-0/+1
| | | | | | Reported-by: andreas.hanke@gmx-topmail.de References: http://cgit.freedesktop.org/systemd/systemd/commit/?id=1a14a53cfded6e78c6e8dfb73fdff0039971d642 Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) allow to work with hybrid GPTKarel Zak2013-10-234-7/+24
| | | | | | | | | | | Notes: * fdisk don't sync hybrid MBR with GPT * hybrid MBR is ignored and not overwritten by PBMR * users is informed about expert command 'M' to toggle between MBR and GPT mode. It's possible to manually modify hybrid MBR. Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) improve and cleanup recovery codeKarel Zak2013-10-231-15/+56
| | | | | | | * use AlternativeLBA rather than hardcoded offset to backup GPT * create gpt_copy_header() Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: test corruted GPT headersKarel Zak2013-10-232-1/+57
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (gpt) recover from corrupted primary/backup PTKarel Zak2013-10-231-12/+32
| | | | | | | | We already have all code to support this feature, unfortunately it was not used in gpt_probe_label()... References: https://bugzilla.redhat.com/show_bug.cgi?id=1022217 Signed-off-by: Karel Zak <kzak@redhat.com>
* docs: update TODO, wipe check for fdisk already implementedKarel Zak2013-10-231-3/+0Star
| | | | | | | Note that rather than implement wipe command in fdisk it's better inform users to call wipefs(8). Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: warn about obsolete signatures on the deviceKarel Zak2013-10-231-0/+61
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: reorder intro warningsKarel Zak2013-10-231-4/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: (gpt) add A,B,R,S expert commands to modify attributesKarel Zak2013-10-231-1/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: support extended attributes modificationKarel Zak2013-10-232-0/+130
| | | | | | | | * GPT attributes defined by standard (e.g. legacy boot etc.) * attributes (bits 48-63) reserved for GUID specific attributes (used for example by MS Windows) Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: (dos) be more verbose when change bootable flagKarel Zak2013-10-231-0/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: fix printf stuffKarel Zak2013-10-233-15/+14Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: fix printf stuffKarel Zak2013-10-237-68/+67Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fdisk: add 'M' to access GPT nested protective/hybrid MBRKarel Zak2013-10-231-17/+71
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libfdisk: support nested MBRKarel Zak2013-10-231-4/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>