Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Jul 2017 14:34:58 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r321620 - head/usr.bin/w
Message-ID:  <201707271434.v6REYwf2018264@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Jul 27 14:34:57 2017
New Revision: 321620
URL: https://svnweb.freebsd.org/changeset/base/321620

Log:
  Fix singular/plural "users" output.
  
  It was broken during libxo'fication.
  
  PR:		221039
  Submitted by:	timur@
  MFC after:	1 week

Modified:
  head/usr.bin/w/w.c

Modified: head/usr.bin/w/w.c
==============================================================================
--- head/usr.bin/w/w.c	Thu Jul 27 13:37:21 2017	(r321619)
+++ head/usr.bin/w/w.c	Thu Jul 27 14:34:57 2017	(r321620)
@@ -511,7 +511,7 @@ pr_header(time_t *nowp, int nusers)
 	}
 
 	/* Print number of users logged in to system */
-	xo_emit(" {:users/%d} {N:user%s}", nusers, nusers == 1 ? "" : "s");
+	xo_emit(" {:users/%d} {Np:user,users}", nusers);
 
 	/*
 	 * Print 1, 5, and 15 minute load averages.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707271434.v6REYwf2018264>