script: --quiet option is not quiet.

Specifying 'script --quiet ...' still produces the 'Script started'
message in the typescript file. The --quiet option implies that the
script program should not log any of its output to the typescript file.

Originally reported at:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693966

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
script: silence the done message on --quiet as well

Apparently James Hunts patch (which he provided a long time
ago) is no longer covering it all.

This followup patch also silences the "Script done ..." message
when --quiet is used.

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
script: clean up code to genenrate Star/Done messages

Signed-off-by: Karel Zak <kzak@redhat.com>
hwclock: sometimes one day lasts 23 hours.

If less than 23 hours have passed since the last calibration, hwclock
says "Not adjusting drift factor because it has been less than a day since
the last calibration.", but in fact compares to 23 hours, not 24.

This was originally reported at:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=689534

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
libmount: special treatment for auto in fstype pattern

Let's support

  mount -t ext2,auto /dev/sde /media/stick

Reported-by: Andreas Henriksson <andreas@fatal.se>
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=506695
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (dos) calculation of total size based on CHS in check function

Many people report a problem with the message if (cylinders <= 1024 &&
start != total) fprintf(stderr, _("Partition %d: previous sectors %d
disagrees with " "total %d\n"), n, start, total);

This message comes from the fact that the previous code caluclates the
total number of sectors in the wrong way.

The formula should be total = (real_c * heads + h) * sectors + real_s;

As a Cylinder consists of some heads * sectors A Head consists of some
sectors and finally sectors are the smallest unit

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (dos) use check() for dos-comaptible mode only

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: (dos) count fisrt usable LBA to total number of used sectors

The check() function counts number of used sectors, but it counts only
partitions. This is mistake, the area before the first partition is
also "used" place (boot loaders or we have to align the first partition
to disk I/O limits, etc).

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: correct the return values in squashfs probe

Returning -1 can cause squashfs v3 detection to make v4 detection fail.

Signed-off-by: Karel Zak <kzak@redhat.com>
docs: add fdisk mac support to TODO file

Signed-off-by: Karel Zak <kzak@redhat.com>
docs: fix minor things in man-page howto

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk: add long options, cleanup man page and usage()

Signed-off-by: Karel Zak <kzak@redhat.com>
bash-completion: update fdisk

Signed-off-by: Karel Zak <kzak@redhat.com>
bash-completion: update cfdisk

Signed-off-by: Karel Zak <kzak@redhat.com>
bash-completion: update fallocate, fstrim and lsblk

Signed-off-by: Karel Zak <kzak@redhat.com>
docs: add note about lsblk

Signed-off-by: Karel Zak <kzak@redhat.com>
fallocate: fix FALLOC_FL_ZERO_RANGE flag check

Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
fallocate: make man page readable for humans

Well, let's copy & past from fallocate(2) syscall man page rather than
try to be creative with another description for the flags.

Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
fallocate: use err_exclusive_options(), cleanup getopt_long() stuff

Signed-off-by: Karel Zak <kzak@redhat.com>
fallocate: clarify usage()

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