[kzak@redhat.com: - move paths to pathnames.h,
- use static path buffer]
Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
This feature is hopefully mostly used to give MESSAGE_ID labels for
messages coming from scripts, making search of messages easy. The
logger(1) manual page update should give enough information how to use
--journald option.
[kzak@redhat.com: - add missing #ifdefs
- use xalloc.h]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
It seems that linux 3.14 is able to produce things like:
19 0 8:3 / / rw,relatime - ext4 /dev/sda3 rw,data=ordered
^
Reported-by: Mantas Mikulėnas <grawity@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
This is done to keep things simple, when considering tests, for both 64
and 32 bit architectures. Setting the upper limit of a year value to to
2^31-1 (2147483646) should be enough for anyone.
Reported-by: Mike Frysinger <vapier@gentoo.org>
Reference: http://www.spinics.net/lists/util-linux-ng/msg08662.html
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
It's better to be smart than make things inconsistent (without
BLKRRPART kernel still uses the erased PT and udev-db still contains
obsolete information).
Signed-off-by: Karel Zak <kzak@redhat.com>
[kzak@redhat.com: - remove USE_SOCKET_ACTIVATION and use
HAVE_* as we use for another libs]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
In September 1752 the Gregorian reformation happen in Great Britain and
Dominions (including what is now the USA). One could argue the cal(1)
should consider locale when determining the reformation, but such is
nearly impossible implement correctly.
The dates when reformation happen are split by areas that cannot be
expressed with current locales, for example the Netherlands is split to
two and Germany three categories depending on where in the modern country
one is. Secondly the track when reformation happen is lost for some
countries, Lithuania or Japan are good examples of such.
One of the worst for a programmer is Sweden. They got gradual calendar
change which made Swedish calendar to be completely out of sync. Later
the Swedish calendar jumped in 1753 to be in sync with everyone else.
Notice that some countries, including Saudi Arabia, Ethiopia, Nepal, Iran
and Afghanistan, still have not adopted the Gregorian calendar. Hence
the output of the cal(1) cannot be considered to be correct for everyone.
References: http://calendopedia.com/gregory.htm
References: http://en.wikipedia.org/wiki/Gregorian_calendar#Gregorian_reform
Reviewed-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
While prototypes such as 'function(int, int, char, int);' are legal they
do not help when trying to understand how the function is expected to be
used. Adding variable names gives at least a hint when looking the
prototypes.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Runtime configuration is set at the time of command line option parsing,
and other initialization. Later the configuration is read-only. This
should make code a little bit more understandable.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This change should make namei output more readable when multiple
arguments are supplied.
The old:
$ namei -l /usr/foo
f: /usr/foo
drwxr-xr-x root root /
drwxr-xr-x root root usr
foo - No such file or directory
The new:
$ namei -l /usr/foo
f: /usr/foo
drwxr-xr-x root root /
drwxr-xr-x root root usr
foo - No such file or directory
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
The long option --week still has the optional argument as --week=<wnum>
This was suggested on the mailing list by Padraig Brady and I do agree with that.
Actually, the whole idea of --week=<wnum> came from him.
Signed-off-by: Tommi Kyntola <kynde@iki.fi>
Because many years have two sections of week 52 or 53, the week that
this argument points to is the one that starts during that year (when available).
The week number in argument is also highlighted in addition to possibly visible
current/defined date highlighting.
Signed-off-by: Tommi Kyntola <kynde@iki.fi>
Added week numbers both in ISO-6801 and North America numbering.
The mode is determined by first day of the week, Monday
for ISO and Sunday for North America mode.
ISO week numbers are defined as the first Thursday being part of week 1.
The North America numbering is defined, at least by gcal, as first Sunday
being in the first week.
Signed-off-by: Tommi Kyntola <kynde@iki.fi>
/usr/bin/xgettext: Non-ASCII comment at or before misc-utils/cal.c:473.
Please specify the source encoding through --from-code.
Signed-off-by: Karel Zak <kzak@redhat.com>
* misc-utils/cal.c: Add a little doc string, and mention that the
current month is implicit if not specified. Also remove mention
of "current" from two option descriptions as a specific date may
have been specified.
* misc-utils/cal.1: Likewise.
[kzak@redhat.com: - use fputs and USAGE_SEPARATOR]
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
Signed-off-by: Pádraig Brady <P@draigBrady.com>
Signed-off-by: Karel Zak <kzak@redhat.com>