mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-26 13:05:18 +01:00
When "-c" is specified, don't pad the command with spaces if it is
the last field on the line. "ps -axlc" was needlessly wrapping around on 80-character windows.
This commit is contained in:
parent
eff7ae0f7b
commit
3cc273e0be
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24983
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id$
|
||||
* $Id: print.c,v 1.19 1997/02/22 14:05:05 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -103,7 +103,10 @@ command(k, ve)
|
||||
v = ve->var;
|
||||
|
||||
if (cflag) {
|
||||
(void)printf("%-*s", v->width, KI_PROC(k)->p_comm);
|
||||
if (ve->next == NULL) /* last field, don't pad */
|
||||
(void)printf("%s", KI_PROC(k)->p_comm);
|
||||
else
|
||||
(void)printf("%-*s", v->width, KI_PROC(k)->p_comm);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user