numfmt will accept lowercase 'k' to indicate Kilo or Kibi units on input,
and uses lowercase 'k' when outputting such units in '--to=si' mode.
+ pinky no longer tries to canonicalize the user's login location by default,
+ rather requiring the new --lookup option to enable this often slow feature.
+
wc no longer ignores encoding errors when counting words.
Instead, it treats them as non white space.
List only the entries that correspond to processes via which the
system is waiting for a user to login. The user name is always @samp{LOGIN}.
+@macro lookupOption
@item --lookup
@opindex --lookup
-Attempt to canonicalize hostnames found in utmp through a DNS lookup. This
-is not the default because it can cause significant delays on systems with
-automatic dial-up internet access.
+Attempt to canonicalize hostnames found in utmp through a DNS lookup.
+This is not the default because of potential delays.
+@end macro
+@lookupOption
@item -m
@opindex -m
Omit the user's full name, remote host, and idle time when printing in
short format.
+@lookupOption
+
@end table
@exitstatus
/* if true, use the "short" output format. */
static bool do_short_format = true;
+/* If true, attempt to canonicalize hostnames via a DNS lookup. */
+static bool do_lookup;
+
/* if true, display the ut_host field. */
#if HAVE_STRUCT_XTMP_UT_HOST
static bool include_where = true;
static char const *time_format;
static int time_format_width;
+/* for long options with no corresponding short option, use enum */
+enum
+{
+ LOOKUP_OPTION = CHAR_MAX + 1
+};
+
static struct option const longopts[] =
{
+ {"lookup", no_argument, nullptr, LOOKUP_OPTION},
{GETOPT_HELP_OPTION_DECL},
{GETOPT_VERSION_OPTION_DECL},
{nullptr, 0, nullptr, 0}
if (display)
*display++ = '\0';
- if (*ut_host)
+ if (*ut_host && do_lookup)
/* See if we can canonicalize it. */
host = canon_host (ut_host);
if ( ! host)
-i omit the user's full name and remote host in short format\n\
-q omit the user's full name, remote host and idle time\n\
in short format\n\
+"), stdout);
+ fputs (_("\
+ --lookup attempt to canonicalize hostnames via DNS\n\
"), stdout);
fputs (HELP_OPTION_DESCRIPTION, stdout);
fputs (VERSION_OPTION_DESCRIPTION, stdout);
include_home_and_shell = false;
break;
+ case LOOKUP_OPTION:
+ do_lookup = true;
+ break;
+
case_GETOPT_HELP_CHAR;
case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);