Make a functions heading, similar to the existing options heading.
* include/c.h: define USAGE_FUNCTIONS
* Documentation/boilerplate.c: add USAGE_FUNCTIONS
* sys-utils/hwclock.c add functions header to usage()
Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: J William Piggott <elseifthen@gmx.com>
It seems good enough to use the current semantic and check for
"noauto" string rather than evaluate "auto/noauto" as a bit flag.
We use flags for mount options, but in this case (mount --all) it's
overkill to convert all options on all fstab entries to flags just to
be sure that somewhere is no "auto,noauto" obscure setting.
Signed-off-by: Karel Zak <kzak@redhat.com>
Now lsblk uses --list when --sort <column> is specified. This patch
allows to specify --tree to overwrite this default behavior add to
force tree-like output. In this case tree branches are sorted by the
<column>.
$ lsblk --sort SIZE
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda2 8:2 0 200M 0 part /boot
sda1 8:1 0 200M 0 part /boot/efi
sda6 8:6 0 7.8G 0 part [SWAP]
sda5 8:5 0 35.1G 0 part /home/misc
sda4 8:4 0 50G 0 part /
sdb1 8:17 0 74.5G 0 part /home/archive
sdb 8:16 0 74.5G 0 disk
sda3 8:3 0 130.3G 0 part /home
sda 8:0 0 223.6G 0 disk
$ lsblk --sort SIZE --tree
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 74.5G 0 disk
└─sdb1 8:17 0 74.5G 0 part /home/archive
sda 8:0 0 223.6G 0 disk
├─sda2 8:2 0 200M 0 part /boot
├─sda1 8:1 0 200M 0 part /boot/efi
├─sda6 8:6 0 7.8G 0 part [SWAP]
├─sda5 8:5 0 35.1G 0 part /home/misc
├─sda4 8:4 0 50G 0 part /
└─sda3 8:3 0 130.3G 0 part /home
Signed-off-by: Karel Zak <kzak@redhat.com>
source-code-management.txt and README had similar content so combine
them in README.
Change Documentation/source-code-management.txt references to README.
Remove Documentation/source-code-management.txt.
Move IRC Channel information to README
Expand information about git branches and tags in README.
Add workflow to README; written by Karel Zak <kzak@redhat.com>
Signed-off-by: J William Piggott <elseifthen@gmx.com>
This patch does not change any wording or grammar. It
only shuffles the order of things and adds a table of
contents. For example: it moves coding related bullet
points into the Coding Style Chapter; it groups email
related Chapters together, and so fourth.
Signed-off-by: J William Piggott <elseifthen@gmx.com>
March 2017 is gone, it is time to remove this utility as scheduled in
earlier commit, and promised in manual page.
Reference: 3f8478a71c
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Make usage() translations to contain complete option help in single
translation unit. And make -z option example complete.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
text-utils/tailf.c:69:21: warning: Using plain integer as NULL pointer
Since many 'struct option' has used zero as NULL make them more readable in
same go by reindenting, and using named argument requirements.
Reference: https://lwn.net/Articles/93577/
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Compare functionality was printing nonsense values. There is no knowledge
of anyone using this broken functionality. Instead of deprecating the code
for months, and removing it after few release, it is removed immediately.
Needless to say this is unusual removal.
Reference: http://marc.info/?l=util-linux-ng&m=148396210506652&w=2
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Removal was promised to happen in March 2016 and the time has come to get
rid of this unexpected feature.
Reference: c5b057b342
Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The patch has been planned for weeks and now the kernel part is
already in Linus' tree. It's a new feature, but it's probably better
to merge the userspace stuff now (v2.28 rc1) than wait next 6 months
for the next util-linux release.
Signed-off-by: Karel Zak <kzak@redhat.com>
Now it's necessary t use two mount(8) calls to create a read-only
mount:
mount /foo /bar -o bind
mount /bar -o remount,ro,bind
This patch allows to specify "bind,ro" and the remount is done
automatically by libmount by additional mount(2) syscall. It's not
atomic of course.
Signed-off-by: Karel Zak <kzak@redhat.com>
Most distributions probably ship reset from ncurses, which means
util-linux reset(1) is unlikely to be in use anywhere. Assuming the
previous being true it is almost unimaginable anyone one would be using
the alternative script, so remove it and mark the script deprecated.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The last/lastb(1) from sysvinit has been around for about two years,
and the better implementation is already part of releases 2.24 to 2.26.
It should be safe to remove the unused last code from the source tree.
Reference: ce60272039
Signed-off-by: Sami Kerola <sami.kerola@lastminute.com>
We want to remove it in 2 years, March 2017.
See discussion "tailf, really needed?"
http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/10967
[kzak@redhat.com: - move warning to usage()]
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
The sfdisk does not care about compatibility with classic DOS
partitioning, and it does not warn about incompatibility with DOS at
all. It means that --Linux is default and it's unnecessary to use
this option.
It's the same situation like with "--unit S", these options are very
probably often used in scripts, and these all is default now. So for
backward compatibility new sfdisk accepts these options on command
line, but prints "option is deprecated" warning message.
Signed-off-by: Karel Zak <kzak@redhat.com>
Sometimes we use "behaviour" and "behavior" in the same text, let's
use "behavior" only everywhere.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1011068
Signed-off-by: Karel Zak <kzak@redhat.com>
Having howtos is good, having an working code that can be used as-is to
kickstart a write of a new command is better.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Theodore Ts'o:
I'll add that I've never been convinced that the mkfs front end is all
that useful. It's probably better for people to explicitly run
/sbin/mkfs.xfs, /sbin/mkfs.ext4, etc.., so you don't have to worry
about which options get passed down to the file system specific mkfs
program, and which ones are interpreted by /sbin/mkfs --- and I don't
believe /sbin/mkfs adds enough (err, any?) value that using
"/sbin/mkfs -t xxx" vs "/sbin/mkfs.xxx" makes any sense whatsoever.
... and I absolutely agree.
Reported-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
This is necessary for paranoid security guys who believe that things
like "-Wl,-z,relro" or "-Wl,-z,bind_now" is a way how to make the
world a safer place...
Signed-off-by: Karel Zak <kzak@redhat.com>
The first removal managed to remove only most of the elvtune, this commit
will complete the task.
Original-removal: 7f1fe74248
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
I made following survey which was sent to all email addresses in po/
directory that had the on-going millenium as time when translator had
been active.
There are two quite common styles to write a command usage print out,
which one you prefer?
1. Each option as separated translatable string. 18 votes
2. Or the whole thing as one big output. 1 vote
3. No preference. 1 vote
The questionaire had also free text field asking 'Why do you prefer
that?', and here are the answers.
[Separately] It is easier to follow changes with the translations. If
you change only one line or two, the big string would change to fuzzy
and I have to check the whole thing to see what was changed in the
original. If the changed line is a single string, the string to check
is a lot shorter.
[No preference] Usually, if there is no reason to separate strings,
better keep them together so that the context is obvious. In the case at
hand, it might help if in some language e.g. one translated line is too
wide for the screen. This is unlikely, but... OTOH, with this solution,
if you change one string the whole translation will be discarded until a
translator comes and updates it...
[Separately] It may be a bit harder to get the formatting right, but it
is much easier in maintenance. With one option changing, the
translator immediately sees the spot. And even with a lazy translator,
program author will have all the options translated that have not
changed at all.
[Separately] First one would be more in elegant I believe
[Separately] I prefer to have them separately because they don't form a
single text paragraph. In other words, they can be translated
separately because they are complete and separate "sentences". Of
course consistency of format and word choices need to be taken care of,
but the fact that the messages appear next to each other in the PO file
should be enough. Also if the options are not translated separately,
adding or editing one option causes the translation of all options to
become fuzzy and if for some reason it isn't checked before next
release (happens sometimes), all of them will show untranslated to the
user.
[Separately] Translations are a lot easier to update that way. If an
option is added, removed or changed, only a small amount of text
becomes fuzzy. If everything is in one big output, a lot of text
becomes fuzzy, and you have to read a lot more text to discover what
exactly changed.
[Separately] When updating a fuzzy translation, with one big output
it's very tedious and error-prone to find out the reason for fuzziness,
i.e. what actually has changed in the msgid.
[Separately] Way easier to translate, and especially to spot
translation updates when one string gets removed, added or modified.
[Separately] Makes translation memory more efficient. Some hard terms
in the list don't prevent translation of the whole block. Actually the
beginning of the strings don't need any translation ta all before []
part. Information about the context can be provided in comments or the
context parameter.
[Separately] Please consider the case when a part of string, (= msgid)
is changed. It is marked as fuzzy in the .po files, we translators
have to check whole sentences for the difference between it and
previous version.
[Separately] Every sentence must be a separate translation unit.
[One big output] for performance to ouput strings
[Separately] In the second case, if only one option changes (or a new
one is added), the translator will see as if all of the options
changed, having to find out which one of them is really new or has
actually changed. Also, if the translator has had no time to update
the string, only one of the options will be shown in the original
language (which is arguably ugly, but better than nothing for many
users).
[Separately] It's easier to translate the options separately using
translation memory.
[Separately] Easier to separate and see changes
[Separately] more translator friendly
[Separately] From the user POV I found the separeted version more
interesting because if a maintainer can't update the translation fast
enough between releases the user will still get the current translated
string with the new ones untraslated. From the translator POV the big
output will give more context information as one can see the whole
command options. With a new string added while the rest is translated
having some context can be more difficult.
[Separately] Additions to the list or changes to one options means you
don't have to check all lines each time.
So unless you have very, _very_ good reason you should not output all
usage as one big table. This implies also that when large usage output
is changed it should be split to small hunks. That may be a bit more
work once, but the next change will pay the extrawork off so never
hesitate when splitting.
Reference: http://www.surveymonkey.com/s/QKZ75HK
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
If the target directory (mountpoint) does not exist then mount(8) will create
it before mount.<type> is executed or mount(2) syscall is called.
Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Commands cal col ipcrm ipcs kill line logger mesg more newgrp pg renice
has Open Group requirements. Contributors need to be aware of them.
Reviewed-by: Adam Sampson <ats@offog.org>
Reviewed-by: Bruce Dubbs <bruce.dubbs@gmail.com>
Reviewed-by: Ángel González <ingenit@zoho.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The goal is to consolidate the very basic linux commands and minimize
dependence on another packages (e.g. shadow-utils). It seems better to
keep newgrp, vipw and vigr as non-deprecated for now. Maybe we will
found a way how to improve the code. We will see... :-)
Signed-off-by: Karel Zak <kzak@redhat.com>
See RedHat bug for reasons why the ddate is cleaned up. The reference is
where to get the command in future.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=823156
References: https://github.com/bo0ts/ddate
Acked-by: Petr Uzel <petr.uzel@suse.cz>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Additionally to the fixes in commit v2.21-325-g455fe9a,
fix typos in release notes and NEWS.
Signed-off-by: Bernhard Voelker <mail@...>
Signed-off-by: Karel Zak <kzak@redhat.com>
The tool misspellings (https://github.com/lyda/misspell-check)
detected several typos. Command used:
$ git ls-files | grep -v ^po/ | misspellings -f -
* isosize: Fix typo in usage string.
* configure.ac: Fix typo in help string of --enable-most-builds option.
* fdisk: Fix typo in man page.
* libblkid, blkid, mount: Likewise.
* Fix various typos in docs and in source code comments.
Signed-off-by: Bernhard Voelker <mail@bernhard-voelker.de>