* [PATCH] Add a new documentation directory and move the README.devel file there.
From: Davidlohr Bueso @ 2011-08-07 0:33 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
From: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
Documentation/README.devel | 121 ++++++++++++++++++++++++++++++++++++++++++++
README.devel | 121 --------------------------------------------
2 files changed, 121 insertions(+), 121 deletions(-)
create mode 100644 Documentation/README.devel
delete mode 100644 README.devel
diff --git a/Documentation/README.devel b/Documentation/README.devel
new file mode 100644
index 0000000..d76baaf
--- /dev/null
+++ b/Documentation/README.devel
@@ -0,0 +1,121 @@
+
+ Notes for util-linux developers
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+AUTOTOOLS:
+
+ * "./autogen.sh" generates all files needed to compile and install the code
+ (run it after checkout from git)
+
+ * "make distclean" removes all unnecessary files, but the code can still be
+ recompiled with "./configure; make"
+
+ * "make dist-gzip" (or -bzip2) creates a tarball that can be configured and
+ compiled without running "./autogen.sh"
+
+
+PATCHES:
+
+ * send your patches to the mailing list or to the upstream maintainer
+ (see the AUTHORS and README files)
+
+ * diff -u
+
+ * don't include generated (autotools) stuff to your patches
+ (hint: use git-clean [-X])
+
+ * patches are delivered via email only. Downloading them from internet
+ servers is a pain.
+
+ * one patch per email, with the changelog in the body of the email.
+
+ * many small patches are favoured over one big. Break down is done on
+ basis of logical functionality; for example #endif mark ups, compiler
+ warning and exit codes fixes all should be individual small patches.
+
+ * Subject: [PATCH] subsystem: description
+
+ * if someone else wrote the patch, they should be credited (and blamed)
+ for it. To communicate this, add a line:
+
+ From: John Doe <jdoe@wherever.com>
+
+ * add a Signed-off-by line (hint: use "git commit -s")
+
+ The sign-off is a simple line at the end of the explanation for the
+ patch, which certifies that you wrote it or otherwise have the right to
+ pass it on as a open-source patch. The rules are pretty simple: if you
+ can certify the below:
+
+ By making a contribution to this project, I certify that:
+
+ (a) The contribution was created in whole or in part by me and I
+ have the right to submit it under the open source license
+ indicated in the file; or
+
+ (b) The contribution is based upon previous work that, to the best
+ of my knowledge, is covered under an appropriate open source
+ license and I have the right under that license to submit that
+ work with modifications, whether created in whole or in part
+ by me, under the same open source license (unless I am
+ permitted to submit under a different license), as indicated
+ in the file; or
+
+ (c) The contribution was provided directly to me by some other
+ person who certified (a), (b) or (c) and I have not modified it.
+
+ (d) I understand and agree that this project and the contribution
+ are public and that a record of the contribution (including all
+ personal information I submit with it, including my sign-off) is
+ maintained indefinitely and may be redistributed consistent with
+ this project or the open source license(s) involved.
+
+ then you just add a line saying
+
+ Signed-off-by: Random J Developer <random@developer.example.org>
+
+ using your real name (sorry, no pseudonyms or anonymous contributions.)
+
+
+ * for more details see:
+
+ The perfect patch
+ http://userweb.kernel.org/~akpm/stuff/tpp.txt
+
+CODING STYLE:
+
+ * the preferred coding style is based on the linux kernel Documentation/CodingStyle.
+ For more details see:
+
+ http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/CodingStyle
+
+
+SCM (source code management):
+
+ git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux
+
+
+ * maintenance (stable) branch
+ - created for every <major>.<minor> release
+ - branch name: stable/v<major>.<minor>
+
+ * bugfix branch
+ - created for <major>.<minor>.<maint> release for critical/security bugs only
+ - this branch is optional
+ - branch name: stable/v<major>.<minor>.<maint>
+
+ * master branch
+ - the status of this branch is: "it works for me". It means useful
+ but not well tested patches.
+ - it's source for occasional snapshots
+ - for long-term development or invasive changes should be an active
+ development forked into a separate branch (topic branches) from the
+ tip of "master".
+
+ * A new tag object is created for:
+ - every release, tag name: v<version>
+
+
+ * KNOWN BUGS:
+ - tag v2.13.1 is typo. Please, ignore this tag.
+
diff --git a/README.devel b/README.devel
deleted file mode 100644
index d76baaf..0000000
--- a/README.devel
+++ /dev/null
@@ -1,121 +0,0 @@
-
- Notes for util-linux developers
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-AUTOTOOLS:
-
- * "./autogen.sh" generates all files needed to compile and install the code
- (run it after checkout from git)
-
- * "make distclean" removes all unnecessary files, but the code can still be
- recompiled with "./configure; make"
-
- * "make dist-gzip" (or -bzip2) creates a tarball that can be configured and
- compiled without running "./autogen.sh"
-
-
-PATCHES:
-
- * send your patches to the mailing list or to the upstream maintainer
- (see the AUTHORS and README files)
-
- * diff -u
-
- * don't include generated (autotools) stuff to your patches
- (hint: use git-clean [-X])
-
- * patches are delivered via email only. Downloading them from internet
- servers is a pain.
-
- * one patch per email, with the changelog in the body of the email.
-
- * many small patches are favoured over one big. Break down is done on
- basis of logical functionality; for example #endif mark ups, compiler
- warning and exit codes fixes all should be individual small patches.
-
- * Subject: [PATCH] subsystem: description
-
- * if someone else wrote the patch, they should be credited (and blamed)
- for it. To communicate this, add a line:
-
- From: John Doe <jdoe@wherever.com>
-
- * add a Signed-off-by line (hint: use "git commit -s")
-
- The sign-off is a simple line at the end of the explanation for the
- patch, which certifies that you wrote it or otherwise have the right to
- pass it on as a open-source patch. The rules are pretty simple: if you
- can certify the below:
-
- By making a contribution to this project, I certify that:
-
- (a) The contribution was created in whole or in part by me and I
- have the right to submit it under the open source license
- indicated in the file; or
-
- (b) The contribution is based upon previous work that, to the best
- of my knowledge, is covered under an appropriate open source
- license and I have the right under that license to submit that
- work with modifications, whether created in whole or in part
- by me, under the same open source license (unless I am
- permitted to submit under a different license), as indicated
- in the file; or
-
- (c) The contribution was provided directly to me by some other
- person who certified (a), (b) or (c) and I have not modified it.
-
- (d) I understand and agree that this project and the contribution
- are public and that a record of the contribution (including all
- personal information I submit with it, including my sign-off) is
- maintained indefinitely and may be redistributed consistent with
- this project or the open source license(s) involved.
-
- then you just add a line saying
-
- Signed-off-by: Random J Developer <random@developer.example.org>
-
- using your real name (sorry, no pseudonyms or anonymous contributions.)
-
-
- * for more details see:
-
- The perfect patch
- http://userweb.kernel.org/~akpm/stuff/tpp.txt
-
-CODING STYLE:
-
- * the preferred coding style is based on the linux kernel Documentation/CodingStyle.
- For more details see:
-
- http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob_plain;f=Documentation/CodingStyle
-
-
-SCM (source code management):
-
- git clone git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git util-linux
-
-
- * maintenance (stable) branch
- - created for every <major>.<minor> release
- - branch name: stable/v<major>.<minor>
-
- * bugfix branch
- - created for <major>.<minor>.<maint> release for critical/security bugs only
- - this branch is optional
- - branch name: stable/v<major>.<minor>.<maint>
-
- * master branch
- - the status of this branch is: "it works for me". It means useful
- but not well tested patches.
- - it's source for occasional snapshots
- - for long-term development or invasive changes should be an active
- development forked into a separate branch (topic branches) from the
- tip of "master".
-
- * A new tag object is created for:
- - every release, tag name: v<version>
-
-
- * KNOWN BUGS:
- - tag v2.13.1 is typo. Please, ignore this tag.
-
--
1.7.4.1
^ permalink raw reply related
* [PATCH] libmnt: fix undefined sources
From: Davidlohr Bueso @ 2011-08-07 0:10 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
From: Davidlohr Bueso <dave@gnu.org>
The path resolving function breaks when handling undefined sources ("none") used by pseudo-filesystems. The assertion is causing the samples/mount program
to abort:
dave@offbook:~/projects/util-linux-good/libmount/samples$ ./mount
/dev/sda3 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
lt-mount: cache.c:464: mnt_resolve_path: Assertion `path' failed.
Aborted
/etc/mtab:
/dev/sda3 / ext4 rw,errors=remount-ro,commit=0 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
none /sys sysfs rw,noexec,nosuid,nodev 0 0
fusectl /sys/fs/fuse/connections fusectl rw 0 0
none /sys/kernel/debug debugfs rw 0 0
...
Instead of this assert on NULL we can simply return NULL and let mnt_pretty_path do the work.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
libmount/src/cache.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/libmount/src/cache.c b/libmount/src/cache.c
index 802d072..41aa4fe 100644
--- a/libmount/src/cache.c
+++ b/libmount/src/cache.c
@@ -461,8 +461,6 @@ char *mnt_resolve_path(const char *path, struct libmnt_cache *cache)
char *key = NULL;
char *value = NULL;
- assert(path);
-
/*DBG(CACHE, mnt_debug_h(cache, "resolving path %s", path));*/
if (!path)
--
1.7.4.1
^ permalink raw reply related
* [git pull] documentation directory
From: Sami Kerola @ 2011-08-06 17:57 UTC (permalink / raw)
To: util-linux
The following changes since commit d1a1e0b71601d88a6157c35caf9184a5aa7b978c:
docs: remove README.namei (2011-08-02 14:30:52 +0200)
are available in the git repository at:
https://github.com/kerolasa/lelux-utiliteetit docs-dir
I would not be surprised that these changes would require a bit of
discussion, and few rejects, before the Documentation/ is done to
upstream. For instance you might disagree with contents of
00-about-docs.txt, and perhaps example.files/ should be deleted.
Sami Kerola (4):
docs: remove README.clear
docs: Documentation directory added
docs: add usage() howto for contributors
docs: tell what the Documentation/ is about
Documentation/00-about-docs.txt | 29 ++++++++
README.devel => Documentation/README.devel | 0
.../ReleaseNotes}/v2.13-ReleaseNotes | 0
.../ReleaseNotes}/v2.14-ReleaseNotes | 0
.../ReleaseNotes}/v2.15-ReleaseNotes | 0
.../ReleaseNotes}/v2.16-ReleaseNotes | 0
.../ReleaseNotes}/v2.17-ReleaseNotes | 0
.../ReleaseNotes}/v2.18-ReleaseNotes | 0
.../ReleaseNotes}/v2.19-ReleaseNotes | 0
.../ReleaseNotes}/v2.20-ReleaseNotes | 0
TODO => Documentation/TODO | 3 +-
libblkid/README.blkid => Documentation/blkid.txt | 0
misc-utils/README.cal => Documentation/cal.txt | 0
fdisk/README.cfdisk => Documentation/cfdisk.txt | 0
text-utils/README.col => Documentation/col.txt | 0
misc-utils/README.ddate => Documentation/ddate.txt | 0
DEPRECATED => Documentation/deprecated.txt | 0
.../example.files}/filesystems | 0
.../example.files}/fstab | 0
.../example.files}/inittab | 0
.../example.files}/issue | 0
.../example.files}/issue0 | 0
.../example.files}/motd | 0
.../example.files}/securetty | 0
.../example.files}/shells | 0
.../example.files}/udev-raw.rules | 0
fdisk/README.fdisk => Documentation/fdisk.txt | 0
getopt/README => Documentation/getopt.txt | 0
.../getopt_changelog.txt | 0
.../README.hwclock => Documentation/hwclock.txt | 0
{licenses => Documentation/licenses}/COPYING.GPL | 0
{licenses => Documentation/licenses}/COPYING.UCB | 0
.../licenses/COPYING.getopt | 0
.../licenses}/COPYING.libblkid | 0
.../licenses}/COPYING.libmount | 0
.../licenses}/COPYING.libuuid | 0
{text-utils => Documentation/licenses}/LICENSE.pg | 0
README.licensing => Documentation/licensing.txt | 0
.../modems-with-agetty.txt | 0
mount/README.mount => Documentation/mount.txt | 0
text-utils/README.pg => Documentation/pg.txt | 0
.../README.poeigl => Documentation/poeigl.txt | 0
fdisk/sfdisk.examples => Documentation/sfdisk.txt | 0
tests/README => Documentation/tests.txt | 0
Documentation/usage-howto.txt | 73 ++++++++++++++++++++
Makefile.am | 8 +--
fdisk/Makefile.am | 2 +-
getopt/Makefile.am | 3 -
hwclock/Makefile.am | 2 -
libblkid/Makefile.am | 2 +-
libmount/Makefile.am | 2 +-
libuuid/Makefile.am | 2 +-
login-utils/Makefile.am | 2 -
misc-utils/Makefile.am | 2 -
mount/Makefile.am | 2 -
term-utils/Makefile.am | 4 +-
tests/Makefile.am | 1 -
text-utils/Makefile.am | 4 -
text-utils/README.clear | 7 --
59 files changed, 109 insertions(+), 39 deletions(-)
create mode 100644 Documentation/00-about-docs.txt
rename README.devel => Documentation/README.devel (100%)
rename {docs => Documentation/ReleaseNotes}/v2.13-ReleaseNotes (100%)
rename {docs => Documentation/ReleaseNotes}/v2.14-ReleaseNotes (100%)
rename {docs => Documentation/ReleaseNotes}/v2.15-ReleaseNotes (100%)
rename {docs => Documentation/ReleaseNotes}/v2.16-ReleaseNotes (100%)
rename {docs => Documentation/ReleaseNotes}/v2.17-ReleaseNotes (100%)
rename {docs => Documentation/ReleaseNotes}/v2.18-ReleaseNotes (100%)
rename {docs => Documentation/ReleaseNotes}/v2.19-ReleaseNotes (100%)
rename {docs => Documentation/ReleaseNotes}/v2.20-ReleaseNotes (100%)
rename TODO => Documentation/TODO (99%)
rename libblkid/README.blkid => Documentation/blkid.txt (100%)
rename misc-utils/README.cal => Documentation/cal.txt (100%)
rename fdisk/README.cfdisk => Documentation/cfdisk.txt (100%)
rename text-utils/README.col => Documentation/col.txt (100%)
rename misc-utils/README.ddate => Documentation/ddate.txt (100%)
rename DEPRECATED => Documentation/deprecated.txt (100%)
rename {example.files => Documentation/example.files}/filesystems (100%)
rename {example.files => Documentation/example.files}/fstab (100%)
rename {example.files => Documentation/example.files}/inittab (100%)
rename {example.files => Documentation/example.files}/issue (100%)
rename {example.files => Documentation/example.files}/issue0 (100%)
rename {example.files => Documentation/example.files}/motd (100%)
rename {example.files => Documentation/example.files}/securetty (100%)
rename {example.files => Documentation/example.files}/shells (100%)
rename {example.files => Documentation/example.files}/udev-raw.rules (100%)
rename fdisk/README.fdisk => Documentation/fdisk.txt (100%)
rename getopt/README => Documentation/getopt.txt (100%)
rename getopt/Changelog => Documentation/getopt_changelog.txt (100%)
rename hwclock/README.hwclock => Documentation/hwclock.txt (100%)
rename {licenses => Documentation/licenses}/COPYING.GPL (100%)
rename {licenses => Documentation/licenses}/COPYING.UCB (100%)
rename getopt/COPYING => Documentation/licenses/COPYING.getopt (100%)
rename {libblkid => Documentation/licenses}/COPYING.libblkid (100%)
rename {libmount => Documentation/licenses}/COPYING.libmount (100%)
rename {libuuid => Documentation/licenses}/COPYING.libuuid (100%)
rename {text-utils => Documentation/licenses}/LICENSE.pg (100%)
rename README.licensing => Documentation/licensing.txt (100%)
rename term-utils/README.modems-with-agetty =>
Documentation/modems-with-agetty.txt (100%)
rename mount/README.mount => Documentation/mount.txt (100%)
rename text-utils/README.pg => Documentation/pg.txt (100%)
rename login-utils/README.poeigl => Documentation/poeigl.txt (100%)
rename fdisk/sfdisk.examples => Documentation/sfdisk.txt (100%)
rename tests/README => Documentation/tests.txt (100%)
create mode 100644 Documentation/usage-howto.txt
delete mode 100644 text-utils/README.clear
--
Sami Kerola
http://www.iki.fi/kerolasa/
^ permalink raw reply
* [patches] small corrections to a few man pages
From: Benno Schulenberg @ 2011-08-03 18:21 UTC (permalink / raw)
To: Util-Linux
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]
Hi,
Attached first patch corrects "fistt" to "first" in the help text of cal,
and seizes the opportunity to clarify the text and add uppercase where
needed. The second patch corrects the short option for --timeout (from
-t to -w) in the man page of findmnt, and then fixes some markup and
spacing issues.
Most utilities use -V as the short option for --version, only a few
use -v instead; several use -v for --verbose. The third patch makes
wipefs conform to the majority now that the option is still fresh, and
adds it to the man page.
The other five patches correct typos, grammar, markup and spacing
in five other man pages.
Regards,
Benno
--
http://www.fastmail.fm - mmm... Fastmail...
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-cal.c-fix-typo-fistt-day-in-help-text-seize-chance-t.patch --]
[-- Type: text/x-patch; name="0001-cal.c-fix-typo-fistt-day-in-help-text-seize-chance-t.patch", Size: 1691 bytes --]
From b3aabeff75e4185ebeaefdf832bf86acb69ef58d Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 1 Aug 2011 20:41:12 +0200
Subject: [PATCH 1/8] cal.c: fix typo ("fistt day") in help text, seize chance to improve it
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
misc-utils/cal.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/misc-utils/cal.c b/misc-utils/cal.c
index f46ef14..39999ce 100644
--- a/misc-utils/cal.c
+++ b/misc-utils/cal.c
@@ -787,14 +787,14 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
program_invocation_short_name);
fprintf(out, _("\nOptions:\n"
- " -1, --one single month\n"
- " -3, --three previous, current and next month\n"
- " -s, --sunday sunday as first day\n"
- " -m, --monday monday as fistt day\n"
- " -j, --julian julian dates\n"
- " -y, --year current year\n"
- " -V, --version output version information and exit\n"
- " -h, --help display this help and exit\n\n"));
+ " -1, --one show only current month (default)\n"
+ " -3, --three show previous, current and next month\n"
+ " -s, --sunday Sunday as first day of week\n"
+ " -m, --monday Monday as first day of week\n"
+ " -j, --julian output Julian dates\n"
+ " -y, --year show whole current year\n"
+ " -V, --version display version information and exit\n"
+ " -h, --help display this help text and exit\n\n"));
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-findmnt-man-page-short-option-for-timeout-is-not-t-b.patch --]
[-- Type: text/x-patch; name="0002-findmnt-man-page-short-option-for-timeout-is-not-t-b.patch", Size: 4098 bytes --]
From e987f5e7ca22c7b368ce2486e2dc770af3ec0daa Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 1 Aug 2011 21:31:35 +0200
Subject: [PATCH 2/8] findmnt: (man page) short option for --timeout is not -t but -w
Additionally make some formatting and spacing tweaks.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
misc-utils/findmnt.8 | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/misc-utils/findmnt.8 b/misc-utils/findmnt.8
index 4f47d09..27d85c6 100644
--- a/misc-utils/findmnt.8
+++ b/misc-utils/findmnt.8
@@ -80,7 +80,7 @@ and
.BR LABEL
columns. This option disables text truncation also in all other columns.
.IP "\fB\-O, \-\-options \fIlist\fP"
-Used to limit the set of printed filesystems. More than one option
+Limit the set of printed filesystems. More than one option
may be specified in a comma-separated list. The
.B \-t
and
@@ -97,10 +97,10 @@ Define output columns. Currently supported are
.BR ACTION,
.BR SOURCE ,
.BR TARGET ,
-.RB OLD-TARGET,
+.BR OLD-TARGET,
.BR FSTYPE ,
.BR OPTIONS ,
-.RB OLD-OPTIONS,
+.BR OLD-OPTIONS,
.BR VFS-OPTIONS ,
.BR FS-OPTIONS ,
.BR LABEL
@@ -113,12 +113,12 @@ column contains tree formatting if the
or
.B \-\-raw
options are not specified.
-.IP "\fB\-p, \-\-poll[=list]\fP"
+.IP "\fB\-p, \-\-poll\fR[\fI=list\fR]\fP"
Monitor changes in the /proc/self/mountinfo file. Supported actions are: mount,
umount, remount and move. More than one action may be specified in a
comma-separated list. All actions are monitored by default.
-The time for which --poll will block could be restricted by \fB\-\-timeout\fP
+The time for which \fB--poll\fR will block can be restricted with the \fB\-\-timeout\fP
or \fB\-\-first-only\fP options.
The standard columns always use the new version of the information from the
@@ -129,7 +129,7 @@ The poll mode allows to use extra columns:
.RS
.TP
.B ACTION
-mount, umount, move or remount action name. This column is enabled by default.
+mount, umount, move or remount action name; this column is enabled by default
.TP
.B OLD-TARGET
available for umount and move actions
@@ -142,7 +142,7 @@ Use raw output format.
.IP "\fB\-a, \-\-ascii\fP"
Use ascii characters for tree formatting.
.IP "\fB\-t, \-\-types \fIlist\fP"
-Used to limit the set of printed filesystems. More than one type may be
+Limit the set of printed filesystems. More than one type may be
specified in a comma-separated list. The list of filesystem types can be
prefixed with
.I no
@@ -150,17 +150,17 @@ to specify the filesystem types on which no action should be taken. For
more details see
.BR mount (8).
.IP "\fB\-R, \-\-submounts\fP"
-Print recursively all submounts for the selected filesystems. The restrictions
+Print recursively all submounts for the selected filesystems. The restrictions
defined by options \fB\-t\fP, \fB\-O\fP, \fB\-S\fP, \fB\-T\fP and
-\fB\--direction\fP are not applied to submounts. All submounts are always
-printed in tree-like order. The option enables the tree-like output format by
-default. This option has no effect for \fB\-\-mtab\fP or \fB\-\-fstab\fP.
+\fB\--direction\fP are not applied to submounts. All submounts are always
+printed in tree-like order. The option enables the tree-like output format by
+default. This option has no effect for \fB\-\-mtab\fP or \fB\-\-fstab\fP.
.IP "\fB\-S, \-\-source \fIspec\fP"
-Explicitly define the mount source. Supported are device, LABEL= or UUID=.
-.IP "\fB\-t, \-\-timeout \fImilliseconds\fP"
-Specifies an upper limit on the time for which --poll will block, in milliseconds.
+Explicitly define the mount source. Supported are \fIdevice\fR, \fILABEL=\fR and \fIUUID=\fR.
.IP "\fB\-T, \-\-target \fIdir\fP"
Explicitly define the mount target (mountpoint directory).
+.IP "\fB\-w, \-\-timeout \fImilliseconds\fP"
+Specify an upper limit on the time for which \fB--poll\fR will block, in milliseconds.
.SH EXAMPLES
.IP "\fBfindmnt \-\-fstab \-t nfs\fP"
Prints all nfs filesystems defined in
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-wipefs-change-option-v-to-V-for-version-add-it-to-ma.patch --]
[-- Type: text/x-patch; name="0003-wipefs-change-option-v-to-V-for-version-add-it-to-ma.patch", Size: 2738 bytes --]
From 1b6b702166bbf65c442a80de3c1d2f9432f29595 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 3 Aug 2011 10:23:08 +0200
Subject: [PATCH 3/8] wipefs: change option -v to -V for --version; add it to man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
misc-utils/wipefs.8 | 6 ++++--
misc-utils/wipefs.c | 8 ++++----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/misc-utils/wipefs.8 b/misc-utils/wipefs.8
index ebb64bd..00a406d 100644
--- a/misc-utils/wipefs.8
+++ b/misc-utils/wipefs.8
@@ -7,7 +7,7 @@
wipefs \- wipe a filesystem signature from a device
.SH SYNOPSIS
.B wipefs
-.RB [ \-ahnp ]
+.RB [ \-ahnpV ]
.RB [ \-o
.IR offset ]
.I device
@@ -36,8 +36,10 @@ The \fIoffset\fR argument may be followed by binary (2^N) suffixes KiB, MiB,
GiB, TiB, PiB and EiB (the "iB" is optional, e.g. "K" has the same meaning as
"KiB") or decimal (10^N) suffixes KB, MB, GB, PB and EB.
.IP "\fB\-p, \-\-parsable\fP"
-Print out in parsable instead of printable format. Encode all potentially unsafe
+Print out in parsable instead of printable format. Encode all potentially unsafe
characters of a string to the corresponding hex value prefixed by '\\x'.
+.IP "\fB\-V, \-\-version\fP"
+Output version information and exit.
.SH AUTHOR
Karel Zak <kzak@redhat.com>.
.SH AVAILABILITY
diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c
index 51b6fad..0ebb427 100644
--- a/misc-utils/wipefs.c
+++ b/misc-utils/wipefs.c
@@ -308,7 +308,7 @@ usage(FILE *out)
" -n, --no-act do everything except the actual write() call\n"
" -o, --offset <num> offset to erase, in bytes\n"
" -p, --parsable print out in parsable instead of printable format\n"
- " -v, --version output version information and exit\n"));
+ " -V, --version output version information and exit\n"));
fprintf(out, _("\nFor more information see wipefs(8).\n"));
@@ -329,7 +329,7 @@ main(int argc, char **argv)
{ "no-act", 0, 0, 'n' },
{ "offset", 1, 0, 'o' },
{ "parsable", 0, 0, 'p' },
- { "version", 0, 0, 'v' },
+ { "version", 0, 0, 'V' },
{ NULL, 0, 0, 0 }
};
@@ -337,7 +337,7 @@ main(int argc, char **argv)
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- while ((c = getopt_long(argc, argv, "ahno:pv", longopts, NULL)) != -1) {
+ while ((c = getopt_long(argc, argv, "ahno:pV", longopts, NULL)) != -1) {
switch(c) {
case 'a':
all++;
@@ -355,7 +355,7 @@ main(int argc, char **argv)
case 'p':
mode = WP_MODE_PARSABLE;
break;
- case 'v':
+ case 'V':
printf(_("%s from %s\n"), program_invocation_short_name,
PACKAGE_STRING);
return EXIT_SUCCESS;
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-chrt-adjust-style-of-man-page-alphabetize-option-p.patch --]
[-- Type: text/x-patch; name="0004-chrt-adjust-style-of-man-page-alphabetize-option-p.patch", Size: 3327 bytes --]
From 995720e730cf2152fcba3d23aab61b55a70019f3 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 3 Aug 2011 11:17:11 +0200
Subject: [PATCH 4/8] chrt: adjust style of man page, alphabetize option -p
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
schedutils/chrt.1 | 60 ++++++++++++++++++++++++++++------------------------
1 files changed, 32 insertions(+), 28 deletions(-)
diff --git a/schedutils/chrt.1 b/schedutils/chrt.1
index 79750c7..e7f2c3e 100644
--- a/schedutils/chrt.1
+++ b/schedutils/chrt.1
@@ -39,9 +39,9 @@ chrt \- manipulate real-time attributes of a process
.RI [ prio ]\ pid
.SH DESCRIPTION
.PP
-.BR chrt (1)
-sets or retrieves the real-time scheduling attributes of an existing PID, or
-runs COMMAND with the given attributes. Both policy (one of
+.BR chrt
+sets or retrieves the real-time scheduling attributes of an existing \fIpid\fR,
+or runs \fIcommand\fR with the given attributes. Both policy (one of
.BR SCHED_OTHER ,
.BR SCHED_FIFO ,
.BR SCHED_RR ,
@@ -52,7 +52,7 @@ and priority can be set and retrieved.
.PP
The
.BR SCHED_BATCH
-policy is supported since Linux 2.6.16. The
+policy is supported since Linux 2.6.16. The
.BR SCHED_IDLE
policy is supported since Linux 2.6.23.
.PP
@@ -62,66 +62,70 @@ flag for policies SCHED_RR and SCHED_FIFO is supported
since Linux 2.6.31.
.SH OPTIONS
.TP
-.B -p, --pid
-operate on an existing PID and do not launch a new task
-.TP
.B -a, --all-tasks
-set or retrieve the scheduling attributes of all the tasks (threads) for a
+Set or retrieve the scheduling attributes of all the tasks (threads) for a
given PID.
.TP
.B -b, --batch
-set scheduling policy to
+Set scheduling policy to
.BR SCHED_BATCH
-(Linux specific)
+(Linux specific).
.TP
.B -f, --fifo
-set scheduling policy to
-.BR SCHED_FIFO
+Set scheduling policy to
+.BR SCHED_FIFO .
.TP
.B -i, --idle
-set scheduling policy to
+Set scheduling policy to
.BR SCHED_IDLE
-(Linux specific)
+(Linux specific).
.TP
.B -m, --max
-show minimum and maximum valid priorities, then exit
+Show minimum and maximum valid priorities, then exit.
.TP
.B -o, --other
-set policy scheduling policy to
-.BR SCHED_OTHER
+Set policy scheduling policy to
+.BR SCHED_OTHER .
+.TP
+.B -p, --pid
+Operate on an existing PID and do not launch a new task.
.TP
.B -r, --rr
-set scheduling policy to
+Set scheduling policy to
.BR SCHED_RR
-(the default)
+(the default).
.TP
.B -R, --reset-on-fork
-add
+Add
.B SCHED_RESET_ON_FORK
flag to the
.B SCHED_FIFO
or
.B SCHED_RR
-scheduling policy (Linux specific)
+scheduling policy (Linux specific).
.TP
.B -v, --verbose
-show status information
+Show status information.
.TP
.B -h, --help
-display usage information and exit
+Display usage information and exit.
.TP
.B -V, --version
-display version information and exit
+Display version information and exit.
.SH USAGE
.TP
-The default behavior is to run a new command::
-chrt prio command [arguments]
+The default behavior is to run a new command:
+.B chrt
+.I prio
+.IR command\ [ arguments ]
.TP
You can also retrieve the real-time attributes of an existing task:
-chrt -p pid
+.B chrt \-p
+.I pid
.TP
Or set them:
-chrt -p prio pid
+.B chrt \-p
+.I prio pid
.SH PERMISSIONS
A user must possess
.BR CAP_SYS_NICE
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0005-taskset-adjust-style-of-man-page.patch --]
[-- Type: text/x-patch; name="0005-taskset-adjust-style-of-man-page.patch", Size: 1695 bytes --]
From ca505a8c745763c7d354536842c7fc7d68038ce8 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 3 Aug 2011 11:17:47 +0200
Subject: [PATCH 5/8] taskset: adjust style of man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
schedutils/taskset.1 | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/schedutils/taskset.1 b/schedutils/taskset.1
index 4aa5e2c..9300fb3 100644
--- a/schedutils/taskset.1
+++ b/schedutils/taskset.1
@@ -64,7 +64,7 @@ is processor #0
is processors #0 and #1
.TP
.BR 0xFFFFFFFF
-is all processors (#0 through #31)
+is all processors (#0 through #31).
.PP
When
.BR taskset
@@ -73,21 +73,21 @@ CPU.
.SH OPTIONS
.TP
.BR \-a ,\ \-\-all-tasks
-set or retrieve the CPU affinity of all the tasks (threads) for a given PID.
+Set or retrieve the CPU affinity of all the tasks (threads) for a given PID.
.TP
.BR \-p ,\ \-\-pid
-operate on an existing PID and not launch a new task
+Operate on an existing PID and do not launch a new task.
.TP
.BR \-c ,\ \-\-cpu-list
-specify a numerical list of processors instead of a bitmask. The list may
-contain multiple items, separated by comma, and ranges. For example,
+Specify a numerical list of processors instead of a bitmask. The numbers
+are separated by commas and may include ranges. For example:
.BR 0,5,7,9-11 .
.TP
.BR \-h ,\ \-\-help
-display usage information and exit
+Display usage information and exit.
.TP
.BR \-V ,\ \-\-version
-output version information and exit
+Display version information and exit.
.SH USAGE
.TP
The default behavior is to run a new command with a given affinity mask:
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: 0006-ionice-slightly-improve-grammar-spacing-and-consiste.patch --]
[-- Type: text/x-patch; name="0006-ionice-slightly-improve-grammar-spacing-and-consiste.patch", Size: 6623 bytes --]
From bcfd9f9899d4e9537287a2e7834d15a357bc08a0 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 3 Aug 2011 15:35:23 +0200
Subject: [PATCH 6/8] ionice: slightly improve grammar, spacing and consistency of man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
schedutils/ionice.1 | 72 ++++++++++++++++++++++++--------------------------
1 files changed, 35 insertions(+), 37 deletions(-)
diff --git a/schedutils/ionice.1 b/schedutils/ionice.1
index f221953..c6f0b47 100644
--- a/schedutils/ionice.1
+++ b/schedutils/ionice.1
@@ -21,78 +21,76 @@ PID
.IR COMMAND
[ ARG ]...
.SH DESCRIPTION
-This program sets or gets the io scheduling class and priority for a program.
+This program sets or gets the I/O scheduling class and priority for a program.
If no arguments or just \fB\-p\fR is given, \fBionice\fR will query the current
-io scheduling class and priority for that process.
+I/O scheduling class and priority for that process.
-If no class is given than
+If no class is given, then
.I COMMAND
-will be executed with "best-effort" scheduling class. The default
+will be executed with the "best-effort" scheduling class. The default
priority argument is 4.
As of this writing, a process can be in one of three scheduling classes:
.IP "\fBIdle\fP"
-A program running with idle io priority will only get disk time when no other
-program has asked for disk io for a defined grace period. The impact of idle
-io processes on normal system activity should be zero. This scheduling
-class does not take a priority argument. Presently, this scheduling class
+A program running with idle I/O priority will only get disk time when no other
+program has asked for disk I/O for a defined grace period. The impact of an
+idle I/O process on normal system activity should be zero. This scheduling
+class does not take a priority argument. Presently, this scheduling class
is permitted for an ordinary user (since kernel 2.6.25).
.IP "\fBBest-effort\fP"
This is the effective scheduling class for any process that has not asked for
-a specific io priority.
-This class takes a priority argument from \fI0-7\fR, with lower
-number being higher priority. Programs running at the same best effort
+a specific I/O priority.
+This class takes a priority argument from \fI0-7\fR, with a lower
+number being higher priority. Programs running at the same best-effort
priority are served in a round-robin fashion.
-Note that before kernel 2.6.26 a process that has not asked for an io priority
-formally uses "\fBnone\fP" as scheduling class, but the io scheduler will treat
-such processes as if it were in the best effort class. The priority within the
-best effort class will be dynamically derived from the cpu nice level of the
+Note that before kernel 2.6.26 a process that has not asked for an I/O priority
+formally uses "\fBnone\fP" as scheduling class, but the I/O scheduler will treat
+such processes as if it were in the best-effort class. The priority within the
+best-effort class will be dynamically derived from the CPU nice level of the
process: io_priority = (cpu_nice + 20) / 5.
-For kernels after 2.6.26 with CFQ io scheduler a process that has not asked for
-an io priority inherits CPU scheduling class. The io priority is derived from
-the cpu nice level of the process (same as before kernel 2.6.26).
+For kernels after 2.6.26 with the CFQ I/O scheduler, a process that has not asked
+for an I/O priority inherits its CPU scheduling class. The I/O priority is derived
+from the CPU nice level of the process (same as before kernel 2.6.26).
.IP "\fBRealtime\fP"
The RT scheduling class is given first access to the disk, regardless of
-what else is going on in the system. Thus the RT class needs to be used with
-some care, as it can starve other processes. As with the best effort class,
+what else is going on in the system. Thus the RT class needs to be used with
+some care, as it can starve other processes. As with the best-effort class,
8 priority levels are defined denoting how big a time slice a given process
-will receive on each scheduling window. This scheduling class is not
+will receive on each scheduling window. This scheduling class is not
permitted for an ordinary (i.e., non-root) user.
.SH OPTIONS
.TP
\fB\-c\fR, \fB\-\-class\fR \fICLASS\fR
-The scheduling class name or number. \fI0\fR for none, \fI1\fR for realtime, \fI2\fR for
+The scheduling class name or number; \fI0\fR for none, \fI1\fR for realtime, \fI2\fR for
best-effort, \fI3\fR for idle.
.TP
\fB\-n\fR, \fB\-\-classdata\fR \fINUM\fR
-The scheduling class data. This defines the class data, if the class
-accepts an argument. For real time and best-effort, \fI0-7\fR is valid
-data.
+The scheduling class data. This defines the class data, if the class
+accepts an argument. For realtime and best-effort, \fI0-7\fR is valid data.
.TP
\fB\-p\fR, \fB\-\-pid\fR \fIPID\fR
-Pass in process PID(s) to view or change already running processes. If this argument
-is not given, \fBionice\fP will run the listed program with the given
-parameters.
+Pass in process PID(s) to view or change already running processes. If this argument
+is not given, \fBionice\fP will run the listed program with the given parameters.
.TP
\fB\-t\fR, \fB\-\-ignore\fR
-Ignore failure to set requested priority. If COMMAND or PID(s) is specified, run it
-even in case it was not possible to set desired scheduling priority, what
-can happen due to insufficient privileges or old kernel version.
-.TP
-\fB\-V\fR, \fB\-\-version\fR
-Output version information and exit.
+Ignore failure to set the requested priority. If COMMAND or PID(s) is specified,
+run it even in case it was not possible to set the desired scheduling priority,
+which can happen due to insufficient privileges or an old kernel version.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display help and exit.
+.TP
+\fB\-V\fR, \fB\-\-version\fR
+Display version information and exit.
.SH EXAMPLES
.LP
.TP 7
# \fBionice\fP -c 3 -p 89
.TP 7
-Sets process with PID 89 as an idle io process.
+Sets process with PID 89 as an idle I/O process.
.TP 7
# \fBionice\fP -c 2 -n 0 bash
.TP 7
@@ -102,8 +100,8 @@ Runs 'bash' as a best-effort program with highest priority.
.TP 7
Prints the class and priority of the processes with PID 89 and 91.
.SH NOTES
-Linux supports io scheduling priorities and classes since 2.6.13 with the CFQ
-io scheduler.
+Linux supports I/O scheduling priorities and classes since 2.6.13 with the CFQ
+I/O scheduler.
.SH AUTHORS
.nf
Jens Axboe <jens@axboe.dk>
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #8: 0007-isosize-improve-style-grammar-and-spacing-of-man-pag.patch --]
[-- Type: text/x-patch; name="0007-isosize-improve-style-grammar-and-spacing-of-man-pag.patch", Size: 2731 bytes --]
From 0af45fcdb972c2f77052e6109f9316961a0f867e Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 3 Aug 2011 15:51:02 +0200
Subject: [PATCH 7/8] isosize: improve style, grammar and spacing of man page
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/isosize.8 | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/disk-utils/isosize.8 b/disk-utils/isosize.8
index 160f8eb..1951f02 100644
--- a/disk-utils/isosize.8
+++ b/disk-utils/isosize.8
@@ -1,6 +1,6 @@
.TH ISOSIZE "8" "June 2011" "util-linux" "System Administration Utilities"
.SH NAME
-isosize \- outputs the length of an iso9660 file system
+isosize \- outputs the length of an iso9660 filesystem
.SH SYNOPSIS
.B isosize
[\fIoptions\fR] \fIiso9660_image_file\fR
@@ -8,28 +8,28 @@ isosize \- outputs the length of an iso9660 file system
.\" Add any additional description here
.PP
This command outputs the length of an iso9660 file system that
-is contained in given file. That file may be a normal file or
-a block device (e.g. /dev/hdd or /dev/sr0). In the absence of
-any switches (or errors) it will output the size of the iso9660
-file system in bytes. This can now be a large number (>> 4 GB).
+is contained in the given file. That file may be a normal file or
+a block device (e.g. /dev/hdd or /dev/sr0). In the absence of
+any switches (and errors) it will output the size of the iso9660
+filesystem in bytes. This can now be a large number (>> 4 GB).
.SH OPTIONS
.TP
\fB\-x\fR, \fB\-\-sectors\fR
-output in humanly readable form the block count and the block
-size. Output uses the term "sectors" for "blocks".
+Show the block count and block size in human-readable form.
+The output uses the term "sectors" for "blocks".
.TP
\fB\-d\fR, \fB\-\-divisor\fR=\fINUM\fR
-only has affect when
+Only has an effect when
.B \-x
-is not given. The number output (if no errors)
+is not given. The number shown (if no errors)
is the iso9660 file size in bytes divided by
.IR NUM .
So if
.I NUM
-is the block size then the output number will be the block count.
+is the block size then the shown number will be the block count.
.PP
-The size of the file (or block device) holding a iso9660 file
-system can be marginally larger than the actual size of the
-iso9660 file system. One reason for this is that cd writers
-are allowed to add "run out" sectors at the end of a iso9660
+The size of the file (or block device) holding an iso9660
+filesystem can be marginally larger than the actual size of the
+iso9660 filesystem. One reason for this is that cd writers
+are allowed to add "run out" sectors at the end of an iso9660
image.
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #9: 0008-mkfs-fix-small-formatting-issues-in-man-page.patch --]
[-- Type: text/x-patch; name="0008-mkfs-fix-small-formatting-issues-in-man-page.patch", Size: 4496 bytes --]
From 7ea4920faebb7e58ee43f268dc9e9d969ec0dc3c Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 3 Aug 2011 16:10:13 +0200
Subject: [PATCH 8/8] mkfs: fix small formatting issues in man page
Also spell "filesystem" consistently as one word -- this makes
things clearer when the word is used as an adjective.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
disk-utils/mkfs.8 | 53 +++++++++++++++++++++++++----------------------------
1 files changed, 25 insertions(+), 28 deletions(-)
diff --git a/disk-utils/mkfs.8 b/disk-utils/mkfs.8
index 88699c1..09cc924 100644
--- a/disk-utils/mkfs.8
+++ b/disk-utils/mkfs.8
@@ -1,24 +1,22 @@
.\" -*- nroff -*-
-.TH MKFS 8 "Jun 1995" "Version 1.9"
.TH MKFS "8" "June 2011" "util-linux" "System Administration Utilities"
.SH NAME
-mkfs \- build a Linux file system
+mkfs \- build a Linux filesystem
.SH SYNOPSIS
.SH SYNOPSIS
.B mkfs
-[\fIoptions\fR] [\fI-t type fs-options\fR] \fIdevice \fR[\fIsize\fR]
+[\fIoptions\fR] [\fB-t\fR \fItype fs-options\fR] \fIdevice\fR [\fIsize\fR]
.SH DESCRIPTION
.B mkfs
-is used to build a Linux file system on a device, usually
-a hard disk partition.
-.I filesys
-is either the device name (e.g.
+is used to build a Linux filesystem on a device, usually
+a hard disk partition. The
+.I device
+argument is either the device name (e.g.
.IR /dev/hda1 ,
.IR /dev/sdb2 ),
-or a regular file that shall contain the file system.
-The
+or a regular file that shall contain the filesystem. The
.I size
-argument is the number of blocks to be used for the file system.
+argument is the number of blocks to be used for the filesystem.
.PP
The exit code returned by
.B mkfs
@@ -26,10 +24,10 @@ is 0 on success and 1 on failure.
.PP
In actuality,
.B mkfs
-is simply a front-end for the various file system builders
+is simply a front-end for the various filesystem builders
(\fBmkfs.\fIfstype\fR)
available under Linux.
-The file system-specific builder is searched for in a number
+The filesystem-specific builder is searched for in a number
of directories like perhaps
.IR /sbin ,
.IR /sbin/fs ,
@@ -43,42 +41,41 @@ and
.IR /sbin/fs ),
and finally in the directories
listed in the PATH environment variable.
-Please see the file system-specific builder manual pages for
+Please see the filesystem-specific builder manual pages for
further details.
.SH OPTIONS
.TP
\fB\-t\fR, \fB\-\-type\fR=\fITYPE\fR
-Specifies the type of file system to be built.
-If not specified, the default file system type
+Specifies the type of filesystem to be built.
+If not specified, the default filesystem type
(currently ext2) is used.
.TP
.I fs-options
-File system-specific options to be passed to the real file
-system builder.
+Filesystem-specific options to be passed to the real filesystem builder.
Although not guaranteed, the following options are supported
-by most file system builders.
+by most filesystem builders.
.TP
\fB\-V\fR, \fB\-\-verbose\fR
-Produce verbose output, including all file system-specific commands
+Produce verbose output, including all filesystem-specific commands
that are executed.
Specifying this option more than once inhibits execution of any
-file system-specific commands.
+filesystem-specific commands.
This is really only useful for testing.
.TP
\fB\-V\fR, \fB\-\-version\fR
-output version information and exit
-\fB\-V\fR will output version information only when it is the
-only parameter.
+Display version information and exit. Option \fB\-V\fR will display
+version information only when it is the only parameter, otherwise it
+will work as \fB\-\-verbose\fR.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display help and exit.
.SH BUGS
All generic options must precede and not be combined with
-file system-specific options.
-Some file system-specific programs do not support the
-.I -V
+filesystem-specific options.
+Some filesystem-specific programs do not support the
+.B -V
(verbose) option, nor return meaningful exit codes.
-Also, some file system-specific programs do not automatically
+Also, some filesystem-specific programs do not automatically
detect the device size and require the
.I blocks
parameter to be specified.
@@ -90,7 +87,7 @@ Fred N. van Kempen (waltje@uwalt.nl.mugnet.org)
Ron Sommeling (sommel@sci.kun.nl)
.br
The manual page was shamelessly adapted from Remy Card's version
-for the ext2 file system.
+for the ext2 filesystem.
.SH SEE ALSO
.BR fs (5),
.BR badblocks (8),
--
1.7.0.4
^ permalink raw reply related
* umount -a
From: Bruce Dubbs @ 2011-08-02 21:54 UTC (permalink / raw)
To: util-linux
At linuxfromscratch, we've just made some changes to write bootscript
messages to /run/var. This seems to work fine for us until shutdown where
umaount -a
unmounts /run which is mounted as a tmpfs. We can certainly work around
the problem, but was wondering if this issue may also affect others.
The man page for umount says:
-a All of the file systems described in /etc/mtab are unmounted.
(With umount version 2.7 and later: the proc filesystem is not
unmounted.)
Would it be reasonable to change umount -a to also omit /run if it is
mounted as a tmpfs?
-- Bruce
^ permalink raw reply
* [PATCH] wall: build with SUID_{C,LD}FLAGS
From: Petr Uzel @ 2011-08-02 13:27 UTC (permalink / raw)
To: util-linux
[-- Attachment #1: Type: text/plain, Size: 640 bytes --]
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
---
term-utils/Makefile.am | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/term-utils/Makefile.am b/term-utils/Makefile.am
index 7b545c3..b423bbd 100644
--- a/term-utils/Makefile.am
+++ b/term-utils/Makefile.am
@@ -55,6 +55,8 @@ if BUILD_WALL
usrbin_exec_PROGRAMS += wall
wall_SOURCES = wall.c ttymsg.c ttymsg.h $(top_srcdir)/lib/strutils.c
dist_man_MANS += wall.1
+wall_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
+wall_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS)
endif
if BUILD_WRITE
--
1.7.3.4
Petr
--
Petr Uzel
IRC: ptr_uzl @ freenode
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related
* [PATCH] look: fix manpage formatting
From: Petr Uzel @ 2011-08-02 12:56 UTC (permalink / raw)
To: util-linux
[-- Attachment #1: Type: text/plain, Size: 616 bytes --]
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
---
misc-utils/look.1 | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/misc-utils/look.1 b/misc-utils/look.1
index ea3b59e..a6ab568 100644
--- a/misc-utils/look.1
+++ b/misc-utils/look.1
@@ -54,9 +54,9 @@ that
is invoked with).
.PP
If
-.Ar file
+.I file
is not specified, the file
-.Pa /usr/share/dict/words
+.I /usr/share/dict/words
is used, only alphanumeric characters are compared and the case of
alphabetic characters is ignored.
.SH OPTIONS
--
1.7.3.4
Petr
--
Petr Uzel
IRC: ptr_uzl @ freenode
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related
* [PATCH] cal: fix manpage formatting
From: Petr Uzel @ 2011-08-02 12:55 UTC (permalink / raw)
To: util-linux
[-- Attachment #1: Type: text/plain, Size: 623 bytes --]
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
---
misc-utils/cal.1 | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/misc-utils/cal.1 b/misc-utils/cal.1
index d13c900..953e82a 100644
--- a/misc-utils/cal.1
+++ b/misc-utils/cal.1
@@ -35,9 +35,8 @@
.\" @(#)cal.1 8.1 (Berkeley) 6/6/93
.\"
.TH CAL "1" "June 2011" "util-linux" "User Commands"
-.Sh NAME
-.Nm cal
-.Nd displays a calendar
+.SH NAME
+cal \- displays a calendar
.SH SYNOPSIS
.B cal
[\fIoptions\fR] [[[\fIday\fR] \fImonth\fR] \fIyear\fR]
--
1.7.3.4
Petr
--
Petr Uzel
IRC: ptr_uzl @ freenode
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related
* Re: [git pull] miscellaneous compiler warning fixes etc
From: Karel Zak @ 2011-08-02 12:32 UTC (permalink / raw)
To: kerolasa; +Cc: util-linux
In-Reply-To: <CAG27Bk1-X+eqrVwP7cfZp-9-aCBwPtnYYBRJGi7wBt2-zaOMjA@mail.gmail.com>
On Thu, Jul 28, 2011 at 11:33:42PM +0200, Sami Kerola wrote:
> docs: remove README.namei
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [patches] pluralization and tiny adjustments of some messages
From: Karel Zak @ 2011-08-02 12:16 UTC (permalink / raw)
To: Benno Schulenberg; +Cc: Util-Linux
In-Reply-To: <1312140631.21317.2157888669@webmail.messagingengine.com>
On Sun, Jul 31, 2011 at 09:30:31PM +0200, Benno Schulenberg wrote:
> Attached bunch of nine patches correct some mistaken words in
> some of the messages, and adds pluralization to three messages
> of the uuidd deamon. Most of these things were first noticed by
> the Czech translator Petr Pisar.
Applied, *thanks!*
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [PATCH 3/3] mkswap: Use c.h
From: Karel Zak @ 2011-08-02 12:16 UTC (permalink / raw)
To: maximilian attems; +Cc: util-linux
In-Reply-To: <1312109241-13590-3-git-send-email-max@stro.at>
On Sun, Jul 31, 2011 at 12:47:21PM +0200, maximilian attems wrote:
> disk-utils/mkswap.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [PATCH 2/3] c.h: Include stdlib.h unconditionaly
From: Karel Zak @ 2011-08-02 12:15 UTC (permalink / raw)
To: maximilian attems; +Cc: util-linux
In-Reply-To: <1312109241-13590-2-git-send-email-max@stro.at>
On Sun, Jul 31, 2011 at 12:47:20PM +0200, maximilian attems wrote:
> include/c.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [PATCH 1/3] c.h: move up declaration of program_invocation_short_name before usage
From: Karel Zak @ 2011-08-02 12:15 UTC (permalink / raw)
To: maximilian attems; +Cc: util-linux
In-Reply-To: <1312109241-13590-1-git-send-email-max@stro.at>
On Sun, Jul 31, 2011 at 12:47:19PM +0200, maximilian attems wrote:
> include/c.h | 70 +++++++++++++++++++++++++++++-----------------------------
> 1 files changed, 35 insertions(+), 35 deletions(-)
Applied, thanks.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [patches] pluralization and tiny adjustments of some messages
From: Lauri Nurmi @ 2011-08-01 16:25 UTC (permalink / raw)
To: Util-Linux
In-Reply-To: <1312140631.21317.2157888669@webmail.messagingengine.com>
31.7.2011 22:30, Benno Schulenberg kirjoitti:
> --- a/sys-utils/fstrim.c
> +++ b/sys-utils/fstrim.c
> if (verbose)
> - printf(_("%s: %" PRIu64 " bytes was trimmed\n"),
> + printf(_("%s: %" PRIu64 " bytes were trimmed\n"),
> path, (uint64_t) range.len);
Hi,
shouldn't this one be pluralized also?
Regards,
LN
^ permalink raw reply
* [patches] pluralization and tiny adjustments of some messages
From: Benno Schulenberg @ 2011-07-31 19:30 UTC (permalink / raw)
To: Util-Linux
[-- Attachment #1: Type: text/plain, Size: 312 bytes --]
Hi,
Attached bunch of nine patches correct some mistaken words in
some of the messages, and adds pluralization to three messages
of the uuidd deamon. Most of these things were first noticed by
the Czech translator Petr Pisar.
Regards,
Benno
--
http://www.fastmail.fm - A fast, anti-spam email service.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-partx.c-switch-on-localization-noted-by-Petr-Pisar.patch --]
[-- Type: text/x-patch; name="0001-partx.c-switch-on-localization-noted-by-Petr-Pisar.patch", Size: 764 bytes --]
From 275ffed75f7c2e2e2907d53b7b4e47760adb0a7a Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 30 Jul 2011 15:35:16 +0200
Subject: [PATCH 1/9] partx.c: switch on localization (noted by Petr Pisar)
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
partx/partx.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/partx/partx.c b/partx/partx.c
index a42c189..b2a72ed 100644
--- a/partx/partx.c
+++ b/partx/partx.c
@@ -640,6 +640,10 @@ int main(int argc, char **argv)
{ NULL, 0, NULL, 0 }
};
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
while ((c = getopt_long(argc, argv,
"abdglrsvn:t:o:Ph", long_opts, NULL)) != -1) {
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-lsblk.c-correct-mistaken-word-noted-by-Petr-Pisar.patch --]
[-- Type: text/x-patch; name="0002-lsblk.c-correct-mistaken-word-noted-by-Petr-Pisar.patch", Size: 868 bytes --]
From 57f33663ad2b97a216f62273cf34744a1d2071fe Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 30 Jul 2011 17:13:27 +0200
Subject: [PATCH 2/9] lsblk.c: correct mistaken word (noted by Petr Pisar)
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
misc-utils/lsblk.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index 50b3bcc..92d4a00 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -789,7 +789,7 @@ static int process_one_device(char *devname)
return EXIT_FAILURE;
}
if (blkid_devno_to_wholedisk(st.st_rdev, buf, sizeof(buf), &disk)) {
- warn(_("%s: failed to get whole-list devno"), devname);
+ warn(_("%s: failed to get whole-disk device number"), devname);
return EXIT_FAILURE;
}
if (st.st_rdev == disk) {
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-fstrim.c-correct-mistaken-grammar-in-one-message.patch --]
[-- Type: text/x-patch; name="0003-fstrim.c-correct-mistaken-grammar-in-one-message.patch", Size: 823 bytes --]
From 01af34d1fd02ae3ff0ab12a3fd921bc29ed56355 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 30 Jul 2011 17:16:09 +0200
Subject: [PATCH 3/9] fstrim.c: correct mistaken grammar in one message
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
sys-utils/fstrim.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c
index 533a274..597f781 100644
--- a/sys-utils/fstrim.c
+++ b/sys-utils/fstrim.c
@@ -143,7 +143,7 @@ int main(int argc, char **argv)
err(EXIT_FAILURE, _("%s: FITRIM ioctl failed"), path);
if (verbose)
- printf(_("%s: %" PRIu64 " bytes was trimmed\n"),
+ printf(_("%s: %" PRIu64 " bytes were trimmed\n"),
path, (uint64_t) range.len);
close(fd);
return EXIT_SUCCESS;
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-wipefs.c-gettextize-one-sentence-as-a-whole.patch --]
[-- Type: text/x-patch; name="0004-wipefs.c-gettextize-one-sentence-as-a-whole.patch", Size: 1158 bytes --]
From 9363e5374057e59832ef9835f7faed91283b0304 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 30 Jul 2011 17:17:26 +0200
Subject: [PATCH 4/9] wipefs.c: gettextize one sentence as a whole
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
misc-utils/wipefs.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/misc-utils/wipefs.c b/misc-utils/wipefs.c
index 51b6fad..09c6070 100644
--- a/misc-utils/wipefs.c
+++ b/misc-utils/wipefs.c
@@ -237,7 +237,8 @@ do_wipe_offset(int fd, struct wipe_desc *wp, const char *fname, int noact)
if (noact == 0 && write_all(fd, buf, len))
err(EXIT_FAILURE, _("%s: write failed"), fname);
- printf(_("%zd bytes ["), wp->len);
+ printf(_("%zd bytes were erased at offset 0x%jx (%s)\nthey were: "),
+ wp->len, wp->offset, wp->type);
for (i = 0; i < len; i++) {
printf("%02x", wp->magic[i]);
@@ -245,7 +246,7 @@ do_wipe_offset(int fd, struct wipe_desc *wp, const char *fname, int noact)
fputc(' ', stdout);
}
- printf(_("] erased at offset 0x%jx (%s)\n"), wp->offset, wp->type);
+ printf("\n");
return 0;
}
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0005-nls.h-define-a-macro-for-handling-plurals-with-ngett.patch --]
[-- Type: text/x-patch; name="0005-nls.h-define-a-macro-for-handling-plurals-with-ngett.patch", Size: 1002 bytes --]
From bc8b7db0e535717c72bdc4629c0769002f7369ef Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 30 Jul 2011 19:20:58 +0200
Subject: [PATCH 5/9] nls.h: define a macro for handling plurals with ngettext()
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
include/nls.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/include/nls.h b/include/nls.h
index 00f2e37..9a9311b 100644
--- a/include/nls.h
+++ b/include/nls.h
@@ -22,6 +22,7 @@ int main(int argc, char *argv[]);
# else
# define N_(String) (String)
# endif
+# define P_(Singular, Plural, n) ngettext (Singular, Plural, n)
#else
# undef bindtextdomain
# define bindtextdomain(Domain, Directory) /* empty */
@@ -29,6 +30,7 @@ int main(int argc, char *argv[]);
# define textdomain(Domain) /* empty */
# define _(Text) (Text)
# define N_(Text) (Text)
+# define P_(Singular, Plural, n) ((n) == 1 ? (Singular) : (Plural))
#endif
#ifdef HAVE_LANGINFO_H
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: 0006-uuidd.c-distinguish-between-singular-and-plural-in-t.patch --]
[-- Type: text/x-patch; name="0006-uuidd.c-distinguish-between-singular-and-plural-in-t.patch", Size: 1834 bytes --]
From 4a38316f2100ebfc7f9423d339082e5a9399abbd Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 30 Jul 2011 19:21:52 +0200
Subject: [PATCH 6/9] uuidd.c: distinguish between singular and plural in three messages
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
misc-utils/uuidd.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c
index 3d130af..6aaf17f 100644
--- a/misc-utils/uuidd.c
+++ b/misc-utils/uuidd.c
@@ -376,8 +376,11 @@ static void server_loop(const char *socket_path, const char *pidfile_path,
__uuid_generate_time(uu, &num);
if (debug) {
uuid_unparse(uu, str);
- printf(_("Generated time UUID %s and %d "
- "following\n"), str, num - 1);
+ printf(P_("Generated time UUID %s "
+ "and %d following\n",
+ "Generated time UUID %s "
+ "and %d following\n", num - 1),
+ str, num - 1);
}
memcpy(reply_buf, uu, sizeof(uu));
reply_len = sizeof(uu);
@@ -394,7 +397,8 @@ static void server_loop(const char *socket_path, const char *pidfile_path,
__uuid_generate_random((unsigned char *) reply_buf +
sizeof(num), &num);
if (debug) {
- printf(_("Generated %d UUIDs:\n"), num);
+ printf(P_("Generated %d UUID:\n",
+ "Generated %d UUIDs:\n", num), num);
for (i = 0, cp = reply_buf + sizeof(num);
i < num;
i++, cp += UUID_LEN) {
@@ -543,7 +547,9 @@ int main(int argc, char **argv)
uuid_unparse((unsigned char *) buf, str);
- printf(_("%s and subsequent %d UUIDs\n"), str, num - 1);
+ printf(P_("%s and %d subsequent UUID\n",
+ "%s and %d subsequent UUIDs\n", num - 1),
+ str, num - 1);
} else {
printf(_("List of UUIDs:\n"));
cp = buf + 4;
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #8: 0007-po-also-extract-plural-messages-from-the-C-files.patch --]
[-- Type: text/x-patch; name="0007-po-also-extract-plural-messages-from-the-C-files.patch", Size: 833 bytes --]
From d1055bbcf5aa4601f55d55da0ec88672034fad05 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 30 Jul 2011 21:27:16 +0200
Subject: [PATCH 7/9] po: also extract plural messages from the C files
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
po/Makevars | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/po/Makevars b/po/Makevars
index f6e320c..04f1b21 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -8,7 +8,7 @@ subdir = po
top_builddir = ..
# These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=P_:1,2
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #9: 0008-textual-add-some-guiding-comments-for-translators.patch --]
[-- Type: text/x-patch; name="0008-textual-add-some-guiding-comments-for-translators.patch", Size: 1781 bytes --]
From a524cae461131c03a109662cf8f6e9229ef28f6b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sat, 30 Jul 2011 21:28:07 +0200
Subject: [PATCH 8/9] textual: add some guiding comments for translators
These are picked up by xgettext and put in the POT file.
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
login-utils/login.c | 1 +
misc-utils/lsblk.c | 1 +
sys-utils/fstrim.c | 1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/login-utils/login.c b/login-utils/login.c
index 74e0cdd..555a567 100644
--- a/login-utils/login.c
+++ b/login-utils/login.c
@@ -1356,6 +1356,7 @@ static void
timedout(int sig) {
signal(SIGALRM, timedout2);
alarm(10);
+ /* TRANSLATORS: The standard value for %d is 60. */
warnx(_("timed out after %d seconds"), timeout);
signal(SIGALRM, SIG_IGN);
alarm(0);
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index 92d4a00..67989e1 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -856,6 +856,7 @@ static void parse_excludes(const char *str)
excludes[nexcludes++] = n;
if (nexcludes == ARRAY_SIZE(excludes))
+ /* TRANSLATORS: The standard value for %d is 256. */
errx(EXIT_FAILURE, _("the list of excluded devices is "
"too large (limit is %d devices)"),
(int)ARRAY_SIZE(excludes));
diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c
index 597f781..0006091 100644
--- a/sys-utils/fstrim.c
+++ b/sys-utils/fstrim.c
@@ -143,6 +143,7 @@ int main(int argc, char **argv)
err(EXIT_FAILURE, _("%s: FITRIM ioctl failed"), path);
if (verbose)
+ /* TRANSLATORS: The standard value here is a very large number. */
printf(_("%s: %" PRIu64 " bytes were trimmed\n"),
path, (uint64_t) range.len);
close(fd);
--
1.7.0.4
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #10: 0009-fsck.c-use-same-word-category-in-message-and-add-tra.patch --]
[-- Type: text/x-patch; name="0009-fsck.c-use-same-word-category-in-message-and-add-tra.patch", Size: 825 bytes --]
From ddb1cef9ccf713bedf19e3c1df51a027cb85722a Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sun, 31 Jul 2011 21:27:58 +0200
Subject: [PATCH 9/9] fsck.c: use same word category in message, and add translators comment
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
---
fsck/fsck.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index 52b9d9d..88a67c8 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -291,7 +291,8 @@ static void lock_disk(struct fsck_instance *inst)
}
if (verbose)
- printf("%s.\n", inst->lock >= 0 ? _("success") : _("failed"));
+ /* TRANSLATORS: These are followups to "Locking disk...". */
+ printf("%s.\n", inst->lock >= 0 ? _("succeeded") : _("failed"));
free(diskname);
return;
--
1.7.0.4
^ permalink raw reply related
* [PATCH 3/3] mkswap: Use c.h
From: maximilian attems @ 2011-07-31 10:47 UTC (permalink / raw)
To: util-linux; +Cc: maximilian attems
In-Reply-To: <1312109241-13590-1-git-send-email-max@stro.at>
Fixes mkswap compilation against klibc.
Signed-off-by: maximilian attems <max@stro.at>
---
disk-utils/mkswap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
index a621641..ab16d13 100644
--- a/disk-utils/mkswap.c
+++ b/disk-utils/mkswap.c
@@ -41,7 +41,6 @@
#include <sys/utsname.h>
#include <sys/stat.h>
#include <errno.h>
-#include <err.h>
#include <getopt.h>
#ifdef HAVE_LIBSELINUX
#include <selinux/selinux.h>
@@ -57,6 +56,7 @@
#include "wholedisk.h"
#include "writeall.h"
#include "xalloc.h"
+#include "c.h"
#ifdef HAVE_LIBUUID
# include <uuid.h>
--
1.7.5.4
^ permalink raw reply related
* [PATCH 2/3] c.h: Include stdlib.h unconditionaly
From: maximilian attems @ 2011-07-31 10:47 UTC (permalink / raw)
To: util-linux; +Cc: maximilian attems
In-Reply-To: <1312109241-13590-1-git-send-email-max@stro.at>
No point in hiding it down in an ifdef maze,
as it may get used by exit(3).
Signed-off-by: maximilian attems <max@stro.at>
---
include/c.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/c.h b/include/c.h
index 79581ae..a9cd1f3 100644
--- a/include/c.h
+++ b/include/c.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <stdio.h>
#include <stdarg.h>
+#include <stdlib.h>
#include <string.h>
#include <errno.h>
@@ -109,7 +110,6 @@ extern char *__progname;
# define program_invocation_short_name __progname
# else
# ifdef HAVE_GETEXECNAME
-# include <stdlib.h>
# define program_invocation_short_name \
prog_inv_sh_nm_from_file(getexecname(), 0)
# else
--
1.7.5.4
^ permalink raw reply related
* [PATCH 1/3] c.h: move up declaration of program_invocation_short_name before usage
From: maximilian attems @ 2011-07-31 10:47 UTC (permalink / raw)
To: util-linux; +Cc: maximilian attems
fixes:
../include/c.h: In function ‘errmsg’:
../include/c.h:111:26: error: ‘program_invocation_short_name’ undeclared
(first use in this function)
../include/c.h:111:26: note: each undeclared identifier is reported only
once for each function it appears in
Signed-off-by: maximilian attems <max@stro.at>
---
include/c.h | 70 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/include/c.h b/include/c.h
index 70f403c..79581ae 100644
--- a/include/c.h
+++ b/include/c.h
@@ -103,6 +103,41 @@
_max1 > _max2 ? _max1 : _max2; })
#endif
+#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
+# ifdef HAVE___PROGNAME
+extern char *__progname;
+# define program_invocation_short_name __progname
+# else
+# ifdef HAVE_GETEXECNAME
+# include <stdlib.h>
+# define program_invocation_short_name \
+ prog_inv_sh_nm_from_file(getexecname(), 0)
+# else
+# define program_invocation_short_name \
+ prog_inv_sh_nm_from_file(__FILE__, 1)
+# endif
+static char prog_inv_sh_nm_buf[256];
+static inline char *
+prog_inv_sh_nm_from_file(char *f, char stripext)
+{
+ char *t;
+
+ if ((t = strrchr(f, '/')) != NULL)
+ t++;
+ else
+ t = f;
+
+ strncpy(prog_inv_sh_nm_buf, t, sizeof(prog_inv_sh_nm_buf) - 1);
+ prog_inv_sh_nm_buf[sizeof(prog_inv_sh_nm_buf) - 1] = '\0';
+
+ if (stripext && (t = strrchr(prog_inv_sh_nm_buf, '.')) != NULL)
+ *t = '\0';
+
+ return prog_inv_sh_nm_buf;
+}
+# endif
+#endif
+
#ifndef HAVE_ERR_H
static inline void
@@ -160,41 +195,6 @@ static inline int dirfd(DIR *d)
}
#endif
-#ifndef HAVE_PROGRAM_INVOCATION_SHORT_NAME
-# ifdef HAVE___PROGNAME
-extern char *__progname;
-# define program_invocation_short_name __progname
-# else
-# ifdef HAVE_GETEXECNAME
-# include <stdlib.h>
-# define program_invocation_short_name \
- prog_inv_sh_nm_from_file(getexecname(), 0)
-# else
-# define program_invocation_short_name \
- prog_inv_sh_nm_from_file(__FILE__, 1)
-# endif
-static char prog_inv_sh_nm_buf[256];
-static inline char *
-prog_inv_sh_nm_from_file(char *f, char stripext)
-{
- char *t;
-
- if ((t = strrchr(f, '/')) != NULL)
- t++;
- else
- t = f;
-
- strncpy(prog_inv_sh_nm_buf, t, sizeof(prog_inv_sh_nm_buf) - 1);
- prog_inv_sh_nm_buf[sizeof(prog_inv_sh_nm_buf) - 1] = '\0';
-
- if (stripext && (t = strrchr(prog_inv_sh_nm_buf, '.')) != NULL)
- *t = '\0';
-
- return prog_inv_sh_nm_buf;
-}
-# endif
-#endif
-
/*
* Fallback defines for old versions of glibc
*/
--
1.7.5.4
^ permalink raw reply related
* Re: [git pull] miscellaneous compiler warning fixes etc
From: Karel Zak @ 2011-07-29 9:07 UTC (permalink / raw)
To: kerolasa; +Cc: util-linux
In-Reply-To: <CAG27Bk2aOxVvj3gpeEnFEP=MSBaH38WuLaDK+F9ggrwen+hhkQ@mail.gmail.com>
On Fri, Jul 29, 2011 at 11:03:04AM +0200, Sami Kerola wrote:
> On Fri, Jul 29, 2011 at 10:46, Karel Zak <kzak@redhat.com> wrote:
> > On Fri, Jul 29, 2011 at 12:44:30AM +0200, Karel Zak wrote:
> >> On Thu, Jul 28, 2011 at 11:33:42PM +0200, Sami Kerola wrote:
> >> > - iter->done = 1;
> >> > + iter->done |= 1;
> >>
> >> Why we need this change? IMHO it's unnecessary.
> >
> > The bit-fields should probably "unsigned int" for better portability,
> > (otherwise it's implementation-defined). I'll fix it.
>
> My thinking with implicit overflow fixes where that the warning may
> mean there is a weird behaving bug. Making sure that the whole source
> compiles without implicit overflow warnings makes tracing of these
> easier. I used same rationality to the only `is always true/false'
> warnings.
Please, copy & past compiler command line and the warnings. I don't
see any warnings with gcc 4.6.0.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [git pull] miscellaneous compiler warning fixes etc
From: Sami Kerola @ 2011-07-29 9:03 UTC (permalink / raw)
To: Karel Zak; +Cc: util-linux
In-Reply-To: <20110729084638.GC24754@nb.net.home>
On Fri, Jul 29, 2011 at 10:46, Karel Zak <kzak@redhat.com> wrote:
> On Fri, Jul 29, 2011 at 12:44:30AM +0200, Karel Zak wrote:
>> On Thu, Jul 28, 2011 at 11:33:42PM +0200, Sami Kerola wrote:
>> > - =A0 iter->done =3D 1;
>> > + =A0 iter->done |=3D 1;
>>
>> =A0Why we need this change? IMHO it's unnecessary.
>
> =A0The bit-fields should probably "unsigned int" for better portability,
> =A0(otherwise it's implementation-defined). I'll fix it.
My thinking with implicit overflow fixes where that the warning may
mean there is a weird behaving bug. Making sure that the whole source
compiles without implicit overflow warnings makes tracing of these
easier. I used same rationality to the only `is always true/false'
warnings.
Getting the chrt usage & options right clearly has to wait
instructions in Documentation directory.
--=20
=A0=A0 Sami Kerola
=A0=A0 http://www.iki.fi/kerolasa/
^ permalink raw reply
* Re: [git pull] miscellaneous compiler warning fixes etc
From: Karel Zak @ 2011-07-29 8:46 UTC (permalink / raw)
To: kerolasa; +Cc: util-linux
In-Reply-To: <20110728224430.GB24754@nb.net.home>
On Fri, Jul 29, 2011 at 12:44:30AM +0200, Karel Zak wrote:
> On Thu, Jul 28, 2011 at 11:33:42PM +0200, Sami Kerola wrote:
> > - iter->done = 1;
> > + iter->done |= 1;
>
> Why we need this change? IMHO it's unnecessary.
The bit-fields should probably "unsigned int" for better portability,
(otherwise it's implementation-defined). I'll fix it.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [git pull] miscellaneous compiler warning fixes etc
From: Karel Zak @ 2011-07-28 22:44 UTC (permalink / raw)
To: kerolasa; +Cc: util-linux
In-Reply-To: <CAG27Bk1-X+eqrVwP7cfZp-9-aCBwPtnYYBRJGi7wBt2-zaOMjA@mail.gmail.com>
On Thu, Jul 28, 2011 at 11:33:42PM +0200, Sami Kerola wrote:
> - iter->done = 1;
> + iter->done |= 1;
Why we need this change? IMHO it's unnecessary. "A bit-field is
interpreted as a signed or unsigned integer type consisting of the
specified number of bits." (C99)
[...]
> - while((i = getopt_long(argc, argv, "+abfiphmoRrvV", longopts, NULL)) != -1)
> + shortopts = get_shortopts("+", longopts);
> + while((i = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1)
> {
> int ret = EXIT_FAILURE;
>
> @@ -227,11 +275,11 @@ int main(int argc, char **argv)
> case 'a':
> all_tasks = 1;
> break;
> - case 'b':
> #ifdef SCHED_BATCH
> + case 'b':
> policy = SCHED_BATCH;
> -#endif
> break;
> +#endif
> case 'f':
> policy = SCHED_FIFO;
> break;
> @@ -240,11 +288,11 @@ int main(int argc, char **argv)
> policy_flag |= SCHED_RESET_ON_FORK;
> break;
> #endif
> - case 'i':
> #ifdef SCHED_IDLE
> + case 'i':
> policy = SCHED_IDLE;
> -#endif
> break;
> +#endif
> case 'm':
> show_min_max();
> return EXIT_SUCCESS;
> @@ -271,6 +319,7 @@ int main(int argc, char **argv)
> show_usage(ret);
> }
> }
> + free(shortopts);
Hmm... I don't like this patch.
Command line options are our API, and the API should be stable
independently on supported features. The #ifdef for command
line options suck...
Note that SCHED_RESET_ON_FORK should be fixed and -R should be
silently ignored (now whole "case SCHED_RESET_ON_FORK:" is #ifdefed.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* [git pull] miscellaneous compiler warning fixes etc
From: Sami Kerola @ 2011-07-28 21:33 UTC (permalink / raw)
To: util-linux
The following changes since commit c632883f309762857b40003136eed9fb8eb63615:
libblkid: minor change in man page (2011-07-26 16:46:00 +0200)
are available in the git repository at:
https://github.com/kerolasa/lelux-utiliteetit misc
Sami Kerola (8):
docs: remove README.namei
chrt: conditional options & usage
taskset: fix implicit overflow
lib/loopdev: fix implicit overflows
libmount/lock: fix implicit overflows
lsblk: fix implicit overflows
dmesg: fix implicit overflows
libblkid: remove unnecessary test
lib/loopdev.c | 8 ++--
libblkid/src/superblocks/superblocks.c | 2 +-
libmount/src/lock.c | 6 +-
misc-utils/Makefile.am | 2 +-
misc-utils/README.namei | 31 --------------
misc-utils/lsblk.c | 6 +-
schedutils/chrt.c | 69 +++++++++++++++++++++++++++-----
schedutils/taskset.c | 4 +-
sys-utils/dmesg.c | 18 ++++----
9 files changed, 82 insertions(+), 64 deletions(-)
delete mode 100644 misc-utils/README.namei
diff --git a/lib/loopdev.c b/lib/loopdev.c
index 213063b..143aabc 100644
--- a/lib/loopdev.c
+++ b/lib/loopdev.c
@@ -239,7 +239,7 @@ int loopcxt_init_iterator(struct loopdev_cxt *lc, int flags)
memset(iter, 0, sizeof(*iter));
iter->ncur = -1;
iter->flags = flags;
- iter->default_check = 1;
+ iter->default_check |= 1;
if (!lc->extra_check) {
/*
@@ -249,7 +249,7 @@ int loopcxt_init_iterator(struct loopdev_cxt *lc, int flags)
stat(_PATH_DEV_LOOP, &st) == 0 && S_ISDIR(st.st_mode))
lc->flags |= LOOPDEV_FL_DEVSUBDIR;
- lc->extra_check = 1;
+ lc->extra_check |= 1;
}
return 0;
}
@@ -273,7 +273,7 @@ int loopcxt_deinit_iterator(struct loopdev_cxt *lc)
fclose(iter->proc);
iter->minors = NULL;
iter->proc = NULL;
- iter->done = 1;
+ iter->done |= 1;
return 0;
}
@@ -487,7 +487,7 @@ struct loop_info64 *loopcxt_get_info(struct loopdev_cxt *lc)
return NULL;
if (ioctl(fd, LOOP_GET_STATUS64, &lc->info) == 0) {
- lc->has_info = 1;
+ lc->has_info |= 1;
return &lc->info;
}
diff --git a/libblkid/src/superblocks/superblocks.c
b/libblkid/src/superblocks/superblocks.c
index 9b618b2..caa9720 100644
--- a/libblkid/src/superblocks/superblocks.c
+++ b/libblkid/src/superblocks/superblocks.c
@@ -306,7 +306,7 @@ int blkid_known_fstype(const char *fstype)
*/
int blkid_superblocks_get_name(size_t idx, const char **name, int *usage)
{
- if (idx >= 0 && idx < ARRAY_SIZE(idinfos)) {
+ if (idx < ARRAY_SIZE(idinfos)) {
if (name)
*name = idinfos[idx]->name;
if (usage)
diff --git a/libmount/src/lock.c b/libmount/src/lock.c
index a6619b3..088ebed 100644
--- a/libmount/src/lock.c
+++ b/libmount/src/lock.c
@@ -224,7 +224,7 @@ static int lock_simplelock(struct libmnt_lock *ml)
rc = -errsv;
goto err;
}
- ml->locked = 1;
+ ml->locked |= 1;
return 0;
err:
if (ml->sigblock)
@@ -346,7 +346,7 @@ static void unlock_mtab(struct libmnt_lock *ml)
if (!stat(ml->lockfile, &lo) && !stat(ml->linkfile, &li) &&
lo.st_dev == li.st_dev && lo.st_ino == li.st_ino)
- ml->locked = 1;
+ ml->locked |= 1;
}
if (ml->linkfile)
@@ -417,7 +417,7 @@ static int lock_mtab(struct libmnt_lock *ml)
j = link(linkfile, lockfile);
if (j == 0)
- ml->locked = 1;
+ ml->locked |= 1;
if (j < 0 && errno != EEXIST) {
if (errno > 0)
diff --git a/misc-utils/Makefile.am b/misc-utils/Makefile.am
index 0644373..9e2e66b 100644
--- a/misc-utils/Makefile.am
+++ b/misc-utils/Makefile.am
@@ -8,7 +8,7 @@ usrsbin_exec_PROGRAMS =
usrbin_exec_PROGRAMS = cal ddate logger look mcookie namei whereis
-EXTRA_DIST += README.cal README.ddate README.namei
+EXTRA_DIST += README.cal README.ddate
logger_SOURCES = logger.c $(top_srcdir)/lib/strutils.c
mcookie_SOURCES = mcookie.c $(top_srcdir)/lib/md5.c
diff --git a/misc-utils/README.namei b/misc-utils/README.namei
deleted file mode 100644
index 490939e..0000000
--- a/misc-utils/README.namei
+++ /dev/null
@@ -1,31 +0,0 @@
-Tired of running into "Too many levels of symlinks" problems on
-your 4.2 BSD derivitive machine?
-
-We sure did... our NFS'ed network of lots of Suns, Vaxen and so forth
-made it impossible at times to trace down where a file REALLY lived.
-I mean ls -l is nice, but wouldn't you like to follow things like
-the namei routine in the kernel does?
-
-Well here it is.... the namei program. It follows things out until
-a terminal state is found.
-
-This program compiles and runs under:
-
- SunOS 4.0.1 (sun3's)
- SunOS 4.0.3 (sun4's)
- SunOS 4.1.1 (sun4's)
- Ultrix 3.1
- BSD 4.3
-
-and probably a host of other 4.2 derived systems (but probably not
-System V).
-
-Anyway, if anyone has any bugs (or enhancements), please send them to
-me in E-mail form.
-
-And, by the way, if you make LOTS of money off of this program, please
-don't tell me :-).
-
- -Roger (rogers@fangorn.wr.tek.com)
- UUCP: ...!uunet!tektronix!fangorn.wr.tek.com!rogers
- ARPA: <rogers%fangorn.wr.tek.com@RELAY.CS.NET>
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index 2e2c457..7457ae1 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -940,13 +940,13 @@ int main(int argc, char *argv[])
while((c = getopt_long(argc, argv, "abdDe:fhlnmo:Pirt", longopts,
NULL)) != -1) {
switch(c) {
case 'a':
- lsblk->all_devices = 1;
+ lsblk->all_devices |= 1;
break;
case 'b':
- lsblk->bytes = 1;
+ lsblk->bytes |= 1;
break;
case 'd':
- lsblk->nodeps = 1;
+ lsblk->nodeps |= 1;
break;
case 'D':
columns[ncolumns++] = COL_NAME;
diff --git a/schedutils/chrt.c b/schedutils/chrt.c
index 58b71b5..2bbc657 100644
--- a/schedutils/chrt.c
+++ b/schedutils/chrt.c
@@ -34,6 +34,7 @@
#include "strutils.h"
#include "procutils.h"
+#include "xalloc.h"
/* the SCHED_BATCH is supported since Linux 2.6.16
* -- temporary workaround for people with old glibc headers
@@ -67,13 +68,20 @@ static void __attribute__((__noreturn__)) show_usage(int rc)
" chrt [options] {<pid> | <command> [<arg> ...]}\n"));
fprintf(out, _(
- "\nScheduling policies:\n"
- " -b | --batch set policy to SCHED_BATCH\n"
- " -f | --fifo set policy to SCHED_FIFO\n"
- " -i | --idle set policy to SCHED_IDLE\n"
+ "\nScheduling policies:\n"));
+#ifdef SCHED_BATCH
+ fprintf(out, _(
+ " -b | --batch set policy to SCHED_BATCH\n"));
+#endif
+ fprintf(out, _(
+ " -f | --fifo set policy to SCHED_FIFO\n"));
+#ifdef SCHED_IDLE
+ fprintf(out, _(
+ " -i | --idle set policy to SCHED_IDLE\n"));
+#endif
+ fprintf(out, _(
" -o | --other set policy to SCHED_OTHER\n"
" -r | --rr set policy to SCHED_RR (default)\n"));
-
#ifdef SCHED_RESET_ON_FORK
fprintf(out, _(
"\nScheduling flags:\n"
@@ -192,24 +200,63 @@ static void show_min_max(void)
}
}
+char *get_shortopts(const char *short_only, const struct option *longopts)
+{
+ char *shortopts;
+ int nopts;
+ int mopts = 16;
+
+ shortopts = xmalloc(sizeof(char) * mopts);
+ for (nopts = 0; short_only[0] != '\0'; short_only++) {
+ shortopts[nopts] = short_only[0];
+ nopts++;
+ if (nopts == mopts) {
+ mopts *= 2;
+ shortopts = xrealloc(shortopts, sizeof(char) * mopts);
+ }
+
+ }
+ for (; longopts->name != NULL; longopts++) {
+ if (longopts->val < CHAR_MAX) {
+ shortopts[nopts] = longopts->val;
+ nopts++;
+ if (nopts == mopts) {
+ mopts *= 2;
+ shortopts =
+ xrealloc(shortopts, sizeof(char) * mopts);
+ }
+ }
+ }
+ shortopts[nopts] = '\0';
+
+ return shortopts;
+}
+
int main(int argc, char **argv)
{
int i, policy = SCHED_RR, priority = 0, verbose = 0, policy_flag = 0,
all_tasks = 0;
+ char *shortopts;
struct sched_param sp;
pid_t pid = -1;
static const struct option longopts[] = {
{ "all-tasks", 0, NULL, 'a' },
+#ifdef SCHED_BATCH
{ "batch", 0, NULL, 'b' },
+#endif
{ "fifo", 0, NULL, 'f' },
+#ifdef SCHED_IDLE
{ "idle", 0, NULL, 'i' },
+#endif
{ "pid", 0, NULL, 'p' },
{ "help", 0, NULL, 'h' },
{ "max", 0, NULL, 'm' },
{ "other", 0, NULL, 'o' },
{ "rr", 0, NULL, 'r' },
+#ifdef SCHED_RESET_ON_FORK
{ "reset-on-fork", 0, NULL, 'R' },
+#endif
{ "verbose", 0, NULL, 'v' },
{ "version", 0, NULL, 'V' },
{ NULL, 0, NULL, 0 }
@@ -219,7 +266,8 @@ int main(int argc, char **argv)
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- while((i = getopt_long(argc, argv, "+abfiphmoRrvV", longopts, NULL)) != -1)
+ shortopts = get_shortopts("+", longopts);
+ while((i = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1)
{
int ret = EXIT_FAILURE;
@@ -227,11 +275,11 @@ int main(int argc, char **argv)
case 'a':
all_tasks = 1;
break;
- case 'b':
#ifdef SCHED_BATCH
+ case 'b':
policy = SCHED_BATCH;
-#endif
break;
+#endif
case 'f':
policy = SCHED_FIFO;
break;
@@ -240,11 +288,11 @@ int main(int argc, char **argv)
policy_flag |= SCHED_RESET_ON_FORK;
break;
#endif
- case 'i':
#ifdef SCHED_IDLE
+ case 'i':
policy = SCHED_IDLE;
-#endif
break;
+#endif
case 'm':
show_min_max();
return EXIT_SUCCESS;
@@ -271,6 +319,7 @@ int main(int argc, char **argv)
show_usage(ret);
}
}
+ free(shortopts);
if (((pid > -1) && argc - optind < 1) ||
((pid == -1) && argc - optind < 2))
diff --git a/schedutils/taskset.c b/schedutils/taskset.c
index 3a0db8f..d874693 100644
--- a/schedutils/taskset.c
+++ b/schedutils/taskset.c
@@ -159,7 +159,7 @@ int main(int argc, char **argv)
_("failed to parse pid"));
break;
case 'c':
- ts.use_list = 1;
+ ts.use_list |= 1;
break;
case 'V':
printf("%s from %s\n", program_invocation_short_name,
@@ -205,7 +205,7 @@ int main(int argc, char **argv)
err(EXIT_FAILURE, _("cpuset_alloc failed"));
if (argc - optind == 1)
- ts.get_only = 1;
+ ts.get_only |= 1;
else if (ts.use_list) {
if (cpulist_parse(argv[optind], new_set, new_setsize))
diff --git a/sys-utils/dmesg.c b/sys-utils/dmesg.c
index 7123c7f..1282411 100644
--- a/sys-utils/dmesg.c
+++ b/sys-utils/dmesg.c
@@ -667,24 +667,24 @@ int main(int argc, char *argv[])
cmd = SYSLOG_ACTION_CONSOLE_OFF;
break;
case 'd':
- ctl.delta = 1;
+ ctl.delta |= 1;
break;
case 'E':
cmd = SYSLOG_ACTION_CONSOLE_ON;
break;
case 'f':
- ctl.fltr_fac = 1;
+ ctl.fltr_fac |= 1;
list_to_bitarray(optarg, parse_facility, ctl.facilities);
break;
case 'h':
usage(stdout);
break;
case 'k':
- ctl.fltr_fac = 1;
+ ctl.fltr_fac |= 1;
setbit(ctl.facilities, FAC_BASE(LOG_KERN));
break;
case 'l':
- ctl.fltr_lev= 1;
+ ctl.fltr_lev |= 1;
list_to_bitarray(optarg, parse_level, ctl.levels);
break;
case 'n':
@@ -692,7 +692,7 @@ int main(int argc, char *argv[])
console_level = parse_level(optarg, 0);
break;
case 'r':
- ctl.raw = 1;
+ ctl.raw |= 1;
break;
case 's':
bufsize = strtol_or_err(optarg,
@@ -703,13 +703,13 @@ int main(int argc, char *argv[])
case 'T':
ctl.boot_time = get_boot_time();
if (ctl.boot_time)
- ctl.ctime = 1;
+ ctl.ctime |= 1;
break;
case 't':
- ctl.notime = 1;
+ ctl.notime |= 1;
break;
case 'u':
- ctl.fltr_fac = 1;
+ ctl.fltr_fac |= 1;
for (n = 1; n < ARRAY_SIZE(facility_names); n++)
setbit(ctl.facilities, n);
break;
@@ -718,7 +718,7 @@ int main(int argc, char *argv[])
PACKAGE_STRING);
return EXIT_SUCCESS;
case 'x':
- ctl.decode = 1;
+ ctl.decode |= 1;
break;
case '?':
default:
--
Sami Kerola
http://www.iki.fi/kerolasa/
^ permalink raw reply related
* Re: [PATCH] lscpu: add support for books
From: Karel Zak @ 2011-07-27 21:35 UTC (permalink / raw)
To: Jon Stanley; +Cc: Heiko Carstens, util-linux
In-Reply-To: <20110718222130.GF4354@nb.redhat.com>
On Tue, Jul 19, 2011 at 12:21:30AM +0200, Karel Zak wrote:
> On Mon, Jul 18, 2011 at 11:17:24AM -0400, Jon Stanley wrote:
> > On Mon, Jul 18, 2011 at 5:10 AM, Karel Zak <kzak@redhat.com> wrote:
> >
> > > I'm not sure if the currently used extra separators (,,) for the
> > > caches is a good idea. Maybe it would be better to force people to
> > > parse the last comment line where is the header for the columns.
> >
> > Speaking as a user of lscpu, I think that forcing people to parse the
> > last comment line is not a particularly good idea - no one is used to
> > doing it, and I'm not sure of any other utility that forces you to
> > parse it's "machine-readable" output. Stability of this format is key.
>
> Yes, -p sucks ;-)
>
> > > The ideal solution is to extend the "-p" functionality and allow to
> > > specify expected columns at command line, something like:
> > >
> > > lscpu -p -o cpu,core,book,socket
> >
> > I think that this is the only long-term supportable way to do this.
> > CPU architectures (even in the x86 world that I'm interested in) ARE
> > going to change and evolve. Heck, it's even possible that concepts
> > like the hypervisor scheduling parameters that you mentioned on s390
> > could eventually make their way down to x86 virtualization, and
> > exposing stuff like that in lscpu would be nice.
>
> I'll try to add this functionality in next days.
Implemented.
The command "lscpu -p" without any other argument is backwardly
compatible and does not include Books in the output, for example:
$ lscpu -p
# CPU,Core,Socket,Node,,L1d,L1i,L2
0,0,0,0,,0,0,0
1,1,0,0,,1,1,0
The command "lscpu -p=<columns>" prints always all requested
columns in the defined order. The caches are separated by ':', for
example:
$ lscpu -p=CPU,NODE,CACHE
# CPU,Node,L1d:L1i:L2
0,0,0:0:0
1,0,1:1:0
$ lscpu -p=CPU,NODE,CACHE,BOOK,SOCKET
# CPU,Node,L1d:L1i:L2,Book,Socket
0,0,0:0:0,,0
1,0,1:1:0,,0
(yeah, no Books on my ThinkPad :-)
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
* Re: [git pull] hwclock fixes
From: Karel Zak @ 2011-07-27 9:16 UTC (permalink / raw)
To: kerolasa; +Cc: util-linux
In-Reply-To: <CAG27Bk3x9Oab431BM-+AnjQHYc5cwuDeho3ufzz46PpN_uJ5=Q@mail.gmail.com>
On Tue, Jul 26, 2011 at 06:38:26PM +0200, Sami Kerola wrote:
> All is pushed to my repo with force. Let me know if there is something
> other that needs nudging.
Merged.
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox