Commit Graph

5230 Commits

Author SHA1 Message Date
Karel Zak 93f90e1332 hwclock: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:43:53 +02:00
Karel Zak c5e8db5f46 test_sysinfo: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:38:14 +02:00
Karel Zak eabfd72f30 kill: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:36:27 +02:00
Karel Zak 1775fce841 su: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:31:45 +02:00
Karel Zak 1369e06cdb lib/match: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:29:22 +02:00
Karel Zak c642a6aaae Merge branch '2012wk28'
* 2012wk28:
  translation: unify file open error messages
  translation: unify stat error messages
  utmpdump: use help and version output macros
  su: align with howto-usage-function
  fdisk: make if clause easier to read
  look: remove extra semicolon
  utmpdump: remove unused variable
  swapon: remove unused variables
  lib/loopdev: minor bug fix: add missing semicolon
  lib/pager: minor compiler warning fixes
  libblkid: remove duplicate entries in symbols
2012-07-16 18:19:08 +02:00
Sami Kerola 289dcc9023 translation: unify file open error messages
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:22 +02:00
Sami Kerola add1b8afd0 translation: unify stat error messages
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:22 +02:00
Sami Kerola 400bc941fc utmpdump: use help and version output macros
Done to reduce translation project work.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:22 +02:00
Sami Kerola 9d13b6d54a su: align with howto-usage-function
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:21 +02:00
Sami Kerola 7d2ba34044 fdisk: make if clause easier to read
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:21 +02:00
Sami Kerola fad05c68e6 look: remove extra semicolon
The both macro SKIP_PAST_NEWLINE and location where macro is used will
not need semicolon at the end of line.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:21 +02:00
Sami Kerola 4e7e68ca6f utmpdump: remove unused variable
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:21 +02:00
Sami Kerola b9136477e6 swapon: remove unused variables
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:21 +02:00
Sami Kerola 510a1a3450 lib/loopdev: minor bug fix: add missing semicolon
Missing semicolon made test_loop_info() to return function
loopcxt_enable_debug() return value, which happen to be void.  I
suspect the loopcxt_enable_debug() was usually not executed, while it
should be.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:21 +02:00
Sami Kerola 3b1d28792d lib/pager: minor compiler warning fixes
Add missing function prototype, and declare structure before use of it.

lib/pager.c:162:6: warning: no previous prototype for function 'setup_pager' [-Wmissing-prototypes]
lib/pager.c:20:29: warning: tentative definition of variable with internal linkage has incomplete non-array type 'struct child_process' [-Wtentative-definition-incomplete-type]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:21 +02:00
Sami Kerola 18377246af libblkid: remove duplicate entries in symbols
The commit a0487b1cb5 added symbol
dublicates.  The symbols should only be listed in BLKID_1.0 segment.

/usr/bin/ld.gold: warning: using 'BLKID_1.0' as version for 'blkid_probe_all' which is also named in version 'BLKID_2.15' in script
/usr/bin/ld.gold: warning: using 'BLKID_1.0' as version for 'blkid_probe_all_new' which is also named in version 'BLKID_2.15' in script
copying selected object files to avoid basename conflicts...

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-16 18:18:21 +02:00
Petr Uzel da4ea9f54b fdisk: rename label probing functions
Rename check_$foo_label() to $foo_probe_label():

1/ 'probe' is more appropriate verb than 'check' for these functions
2/ making label name first part of the funciton name is IMO more
   friendly for tags completion (e.g. vim + cscope/ctags).

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-07-16 18:09:22 +02:00
Petr Uzel 6aaeca3fe0 fdisk: don't call update_units() in label probes if not necessary
update_units() is called in _probe_labels before the label probes are
started, so we don't need to call it again in probers, unless it messes
around with geometry, which currently only check_sun_label() does (so
keep the call to update_units() in this one).

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-07-16 18:09:22 +02:00
Petr Uzel b6ab57b1ab utmpdump: kill unused variable in follow_by_inotify()
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-07-16 18:09:22 +02:00
Petr Uzel 44064b3c1f libblkid: cast blkid_loff_t to unsigned long long
Get rid of gcc warning and fix build with -Werror

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-07-16 18:09:22 +02:00
Petr Uzel 4c46af85e7 swapon: kill unused variables in show_table()
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
2012-07-16 18:09:21 +02:00
Ville Skyttä ddfc5ed6f2 docs: man page syntax fixes
Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
2012-07-16 18:09:21 +02:00
Eryu Guan 6934547d76 mount: ext4 option inode_readahead should be inode_readahead_blks in mount.8
Mount option inode_readahead should be inode_readahead_blks. Also the
value should be a power of 2.

Signed-off-by: Eryu Guan <guaneryu@gmail.com>
2012-07-16 18:08:43 +02:00
Davidlohr Bueso b8855c868f fdisk: API: add label probing functionality
This patch sets the initial layout for label specific operations. A
new fdisk_label structure is created that will hold all these ops,
like new, delete, write and probe, among others. For now only probing
is implemented. Once this design is established, a copy of the probed
label will be copied to the main context structure, where calling the
specific functions will save 'disklabel' checks. Debugging support is
added as well.

This patch passes regression tests and manually passes bsd, sun, dos
and sgi labels probes.

Reviewed-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
2012-07-16 17:59:52 +02:00
Karel Zak 4e80697552 build-sys: add -Werror to UL_WARN_ADD test
... so revert previous patches with extra options for clang.

Sometimes is simple solution so obvious that it's invisible :-)

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 17:42:09 +02:00
Karel Zak bec5c9db87 build-sys: exclude some CC warnings for clang
Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 17:16:15 +02:00
Karel Zak 55eec264cc build-sys: add exclude list to UL_ADD_WARN
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 17:14:04 +02:00
Karel Zak bdf5f542e2 build-sys: add UL_PROG_CLANG function, rename warnings.m4 -> compiler.m4
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 15:48:43 +02:00
Karel Zak b11c9b7ee3 libmount: rename mnt_context_fstab_applied to mnt_context_tab_applied
The function is also usable in umount to detect is mtab has been
applied.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-12 17:43:34 +02:00
Karel Zak 2e7035646e login: close tty before vhangup()
Let's close all tty file descriptors before vhangup() call.

References: https://lkml.org/lkml/2012/6/5/145
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-12 16:35:01 +02:00
Karel Zak 783b08fc1c agetty: close tty before vhangup()
Let's close all tty file descriptors if called with --hangup option.

References: https://lkml.org/lkml/2012/6/5/145
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-12 16:34:56 +02:00
Karel Zak 4459448fbd agetty: make tcsetpgrp() optional
The session setup TIOCSCTTY is optional, so tcsetpgrp() that depends
on controlling terminal should be optional too.

Reported-by: Hilko Bengen <bengen@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-11 18:15:21 +02:00
Karel Zak 815427c72e build-sys: add missing files
Reported-by: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-11 18:00:09 +02:00
Sami Kerola 0aec470c2f swapon: fix --summary output regression
Commit 64b588814e changed --summary
header alignment, and usage of spaces vs tabs in output.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-10 13:45:31 +02:00
Sami Kerola 7ae8b469ad swapon: make --show size to be human readable by default
Cc: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-10 13:45:04 +02:00
Sami Kerola e076b5526f swapon: add --show option
The --show uses lib/tt.c, which allows user to specify columns he is
interested of, and avoids using hard coded field sizes which may be
problematic when system has large enough swap.

[kzak@redhat.com: - improve usage(), remove unused code]

Cc: Bernhard Voelker <mail@bernhard-voelker.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-10 13:41:59 +02:00
Sami Kerola 11935cd3fc uuidd: use configured run state directory in manual etc
[kzak@redhat.com: - minor clean up in configure.in]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-10 13:04:02 +02:00
Sami Kerola 01c5b78794 agetty: use configured run state directory
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-10 13:00:20 +02:00
Sami Kerola 80c51185d5 uuidd: use run configured state directory
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-10 12:59:38 +02:00
Sami Kerola 07a16b9d1e build-sys: change --localstatedir to /run
Enable user to define where run state files are wrote.  Default for
these files is /run.  See reference for rationale why /var/run is no
longer the default.

Reference: http://lists.fedoraproject.org/pipermail/devel/2011-March/150031.html
CC: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-10 12:56:46 +02:00
Karel Zak faebdd91ba utmpdump: cleanup file descriptor usage
- don't support --follow for stdin at all
 - inotify based implementation closes the file, so don't close it in
   main() again

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-10 11:25:11 +02:00
Sami Kerola 5ec1ad1348 utmpdump: encourage users not to follow stdin
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-10 11:01:29 +02:00
Sami Kerola 7346f2b61c utmpdump: use inotify to when following file
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-10 10:59:58 +02:00
Sami Kerola e31926b443 utmpdump: fixes based on static analysis [cppcheck]
[utmpdump.c:82]: (style) The function 'unspace' is never used
[utmpdump.c:131]: (style) The scope of the variable 't' can be reduced
[utmpdump.c:167]: (warning) scanf without field width limits can crash with huge input data

[kzak@redhat.com: - don't use scanf field width limits for integers]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-10 08:56:22 +02:00
Karel Zak 657d9adb71 fix buffer overrun in some calls to sscanf
Reported-by: Sergei Antonov <saproj@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-09 22:26:27 +02:00
Sami Kerola cd903a0eba utmpdump: white space fix
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-07-09 18:04:37 +02:00
Sami Kerola ea4ca239a5 docs: clean up utmpdump.1 manual
Align with Documentation/howto-man-page.txt

Signed-off-by: Sami Kerola <kerolasa@iki.fi>

Conflicts:

	login-utils/utmpdump.1
2012-07-09 18:01:41 +02:00
Karel Zak 641e3e2061 libblkid: cleanup _attribute__ usage 2012-07-09 17:26:15 +02:00
Karel Zak 0b781a1aa4 Merge branch 'master' of https://github.com/dankamongmen/util-linux 2012-07-09 17:17:59 +02:00