The /proc/self/mountinfo file uses " - " field as a separator between
optional fields and next fields in the file. The '-' char could be
used in the fields (for example in UUIDs), so it's necessary to check
for whole " - " string rather than for '-' char only.
Reported-by: "Aneesh Kumar K. V" <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
On Thu, Mar 24, 2011 at 01:45:34PM +0100, Jan Engelhardt wrote:
> On a 24-thread/6-core SPARC T1, lscpu would wrongly output "5
> threads per core".
>
> It seems that the 6c T1 is simply an 8c T1 where 2c are disabled
> (offering a lesser model for a lower price, and all that marketing
> fluff). So the machine description header of the 6c T1 reports 32
> threads, but only goes on to provide 24 elements thereafter, which
> is why Linux will report threads 24-31 as "offline". So far so good.
>
> But lscpu would take the number of all (online and offline) threads
> (32) and divides it by the number of online cores (6), which yields
> an odd 5.33 threads/core.
>
> Simply pick the number of online threads.
Based on Jan's patch.
Reported-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
This small fix makes it possible to print the first unprintable character
with code 128 from ASCII table.
Signed-off-by: Sergey Gusarov <laborer2008@gmail.com>
Now it's necessary to explicitly create a lock for mnt_update_table().
It seems better to create the lock in mnt_update_table() by default to
skip this extra step.
Reported-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
Fix to the ./configure warning which has been printed since
autotools version 2.59c (released at April 2006).
WARNING: 'po/Makefile.in.in' seems to ignore the --datarootdir setting
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/fsprobe.c:56:2: warning: passing argument 2 of ‘blkid_evaluate_spec’ from incompatible pointer type
shlibs/blkid/src/blkid.h:189:14: note: expected ‘struct blkid_struct_cache **’ but argument is of type ‘blkid_cache’
Signed-off-by: Karel Zak <kzak@redhat.com>
The function blkid_evaluate_tag() is useful for tags only (e.g.
LABEL=foo). But we also need to address devices by tags OR paths in
many utils.
The function blkid_evaluate_spec() support this functionality without
extra care about the way how device is addressed. The tags as well as
paths are converted to the standardized device path.
Signed-off-by: Karel Zak <kzak@redhat.com>
fsck, mount and swapon will be compilable with libblkid from
util-linux package. The old libblkid from e2fsprogs will not be
supported.
Signed-off-by: Karel Zak <kzak@redhat.com>
Originally the "uhelper=" was ignored for root, now the umount command
calls /sbin/umount.<uhelper> always.
This change is necessary for things like pam_mount where a device has
to be uninitialized by uhelper rather than directly umounted by
umount(2).
Note that all uhelpers has to be linked with libmount or execute
umount -fake -i /mountpoint
to remove mountpoint entry from /etc/mtab or /dev/.mount/utab.
Signed-off-by: Karel Zak <kzak@redhat.com>