lscpu: report cpu min mhz

The lscpu tool only shows the current and max CPU frequencies, however,
in many scenarios this is not enough. If there are energy saving situations
(like some CPUs being idle, or not fully used) the cpugov can lower this value.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
libfdisk: gpt: avoid unnecessary pmbr check

We only jump to the 'check_hybrid' label when a valid pmbr
is detected, so we need not recheck again. Move the label's
logic so it doesn't include the check.

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
libfdisk: gpt: loosen check fot pmbr size in lba

While most disk partitioning tools out there create a pMBR's size in lba
to be the lesser of the whole disk or 2Tib, Microsoft apparently does not[1].
It always sets the entry to the maximum 32-bit limitation - even though a
drive may be smaller than that.

Loosen this check and only verify that the size is either the whole disk
or 0xFFFFFFFF.  No tool in its right mind would set it to any value
other than these.

[1] http://thestarman.pcministry.com/asm/mbr/GPT.htm#GPTPT

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
libfdisk: fix possible floating point exception

Signed-off-by: Karel Zak <kzak@redhat.com>
tests: update lscpu tests

Signed-off-by: Karel Zak <kzak@redhat.com>
tests: remove remaining set -x

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: use context geometry in SGI and SUN

 * don't call HDIO_GETGEO ioctls in the drivers
 * use context geometry (so user can overwrite it by -C/H/S options)
 * use default geometry is ioctl does not return anything

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: improve fdisk_save_user_geometry()

The functions should not overwrite old setting if the new value (C/H/S) is
zero.

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (sun) make it more obvious why the first sector moved

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: print geometry for dos-compatible mode too
ORIG_HEAD
tests: update sun label test

 * add fdisk -l outputs (to make the test more usable)
 * use more usable geometry
 * don't expect that 'create sun label' oprations asks for C/H/S (we
   follows fdisk_context defaults)

Signed-off-by: Karel Zak <kzak@redhat.com>
tests: update odd output fdisk test

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount: Get rid of an unnecessary check

libmount_debug_mask was OR'ed to MNT_DEBUG_INIT so it should be non-null.
Thus the check is pointless.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
libmount: Free splitted optstr's when error occurred

When strdup() failed, u, v and f optstr's should be freed.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
libmount: Set each optstr's to NULL if failed

When mnt_split_optstr() failed in the middle, vfs, fs, user optstr's
are freed but not reset.  It can lead to double frees at the end of
mnt_fs_{ap,pre}pend_options().

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
libmount: Remove stale comment on mnt_context_mount()

The commit f9906424 ("libmount: add post-mount checks to detect ro/rw")
added necessary check so the comment is not valid anymore.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
libmount: make mnt_fs_{ap,pre}pend_options() more robust

We should not use the results from mnt_split_optstr() if the function
failed.

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: Get rid of an unnecessary check

Signed-off-by: Karel Zak <kzak@redhat.com>
tests: improve cal --color test

Signed-off-by: Karel Zak <kzak@redhat.com>
build-sys: fix include Makemodule.am

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