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>
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>
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>
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>
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>
BSD is nested within DOS partition, so for disk without any partition
table it does not make any sense to offer BSD label.
Signed-off-by: Karel Zak <kzak@redhat.com>
* in some cases is realpath() overkill
* sometimes you want to search for explicitly specified paths (e.g.
"findmnt --fstab /mnt/symlink") rather than for real paths
* you want to avoid readlink() and stat() on NFS
Signed-off-by: Karel Zak <kzak@redhat.com>
In several Makemodule.am, there is a install-exec-hook-<library>
target whose role is to move the shared library from /usr/lib to /lib,
while keeping a symbolic link /usr/lib/libuuid.so ->
../../lib/<library>.so.<version>.
However, when util-linux is built with --enable-static
--disable-shared (as is needed on noMMU platforms that don't support
shared libraries), no <library>.so is built, but the
install-exec-hook-libuuid creates an invalid /usr/lib/<library>.so
symbolic link, pointing to ../../lib (yes, the directory). This causes
troubles later one when other libraries/programs are compiled with
-l<library>, as gcc thinks a shared library is available because
there's a file named /usr/lib/<library>.so.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* 'tests-utmp' of https://github.com/rudimeier/util-linux:
tests: skip some last tests if no dns support
tests: split last into dns and nodns subtests
tests: add utmpdump-circle test (arch independent)
tests: provide missing test data for "last" on exotic archs
tests: skip utmpdump tests for exotic archs
tests: merge last/ and utmpdump/ into new utmp/ dir
utmpdump: fix localtime() error handling