Sami Kerola [Sat, 2 Apr 2011 16:11:09 +0000 (18:11 +0200)]
rev: option parsing bug fixed & long options added
The former getopts segment gave impression unknown options will
cause the program to exit with error and help is available with
-h. Neither work quite as designed, all unknown options made the
program to exit with success; and none of the options where
known.
The fix also has support for long options, and new --version
switch.
Karel Zak [Tue, 5 Apr 2011 14:38:06 +0000 (16:38 +0200)]
build-sys: remove check-news
I need to call "make distcheck" often during development phase to check
that all files are correctly added to Makefiles. The "check-new"
automake option is useless if $(VERSION) is generated from git.
Karel Zak [Tue, 5 Apr 2011 12:17:51 +0000 (14:17 +0200)]
libmount: fix parsing of mountinfo from 2.6.39
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>
Karel Zak [Thu, 31 Mar 2011 10:55:13 +0000 (12:55 +0200)]
lscpu: fix threads-per-core calculation
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>
Karel Zak [Mon, 28 Mar 2011 10:40:24 +0000 (12:40 +0200)]
libmount: create a default lock for mtab update
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>
Karel Zak [Tue, 22 Mar 2011 08:54:57 +0000 (09:54 +0100)]
lib: [fsprobe.c] fix blkid_evaluate_spec() call
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’
Karel Zak [Thu, 17 Mar 2011 11:51:06 +0000 (12:51 +0100)]
libblkid: add blkid_evaluate_spec()
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.
Karel Zak [Fri, 11 Mar 2011 15:58:27 +0000 (16:58 +0100)]
mount: rename "quiet" to "silent" (MS_SILENT)
The quiet mount option was in collision with vfat and hfs mount
options. The option was also undocumented -- so it's probably safe to
rename the option than add some ugly hacks or exceptions for vfat/hfs
to the mount(8) code.
Reported-by: https://bugzilla.redhat.com/show_bug.cgi?id=622089 Signed-off-by: Karel Zak <kzak@redhat.com>
Samuel Thibault [Thu, 3 Mar 2011 01:18:32 +0000 (02:18 +0100)]
hwclock: build on non-Linux
Thanks to the direct ISA method and by disabling the RTC get/set epoch
functionality, hwclock can work fine on non-Linux systems which provide
ioperm or iopl.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
shlibs/blkid/src/Makefile.am:58: warning: `%'-style pattern rules are a GNU make extension
shlibs/mount/src/Makefile.am:62: warning: `%'-style pattern rules are a GNU make extension
Sami Kerola [Sat, 26 Feb 2011 14:37:17 +0000 (15:37 +0100)]
build-sys: use AC_LANG_SOURCE to suppress warnings
Messages bellow be supressed by using AC_LANG_SOURCE macro around
code test blocks.
m4/tls.m4:13: AX_CHECK_TLS is expanded from...
configure.ac:335: the top level
configure.ac:335: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2660: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2677: AC_LINK_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:605: AS_IF is expanded from...
../../lib/autoconf/general.m4:2728: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:605: AS_IF is expanded from...
../../lib/autoconf/general.m4:2747: AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:605: AS_IF is expanded from...
../../lib/autoconf/general.m4:2030: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2051: AC_CACHE_CHECK is expanded from...
m4/tls.m4:13: AX_CHECK_TLS is expanded from...
configure.ac:335: the top level
Reference to documentation;
http://www.flameeyes.eu/autotools-mythbuster/forwardporting/autoconf.html#id1168723648533
raw: remove constants from message strings; undo some abbrevs
Having a constant embedded within a message string prevents gettext from
picking up the rest of the string. Also, translators may wish to change
word order; using a constant as a prefix or postfix makes this impossible.