blockdev: don't use HDIO_GETGEO

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>
lscpu: support non sequentially numbering of CPUs

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>
tests: add sparc64 lscpu test

Signed-off-by: Karel Zak <kzak@redhat.com>
blkid: escape quotes in the output

 # 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>
docs: add note about make distcheck

Signed-off-by: Karel Zak <kzak@redhat.com>
blkid: simple typo

Signed-off-by: Karel Zak <kzak@redhat.com>
hexdump: add basic tests

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
hexdump: use list.h queues and rewrite redundant for cycles

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: cleanup of redundant symbols/repeating literals

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: rewrite addfile()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: rewrite get()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: rewrite next()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump:rewrite add()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: rewrite rewrite()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: rewrite escape()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: rewrite() formatting improvements

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: formatting and variable name cleanup

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: rewrite addfile() to use getline()

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: rename next{fs,fu,pr} to {fs,fu,pr}list

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
hexdump: minor formatting improvements

Signed-off-by: Ondrej Oprala <ooprala@redhat.com>