summaryrefslogtreecommitdiffstats
path: root/bin/pax
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2010-01-13 17:56:54 +0000
committered <ed@FreeBSD.org>2010-01-13 17:56:54 +0000
commit41d3ef12588da7a97389a26cf928312aac1f68eb (patch)
tree7c6cb6ab13aa9dd8e121913d20f77bf933b35439 /bin/pax
parente1ca65924212b3501520240cf3028c1ba9aec1b7 (diff)
downloadFreeBSD-src-41d3ef12588da7a97389a26cf928312aac1f68eb.zip
FreeBSD-src-41d3ef12588da7a97389a26cf928312aac1f68eb.tar.gz
Port everything in bin/ from utmp to utmpx.
date: use libc utmpx routines instead of the ones provided by libulog. pax: don't depend on <utmp.h>
Diffstat (limited to 'bin/pax')
-rw-r--r--bin/pax/gen_subs.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/bin/pax/gen_subs.c b/bin/pax/gen_subs.c
index ce20419..708e8af 100644
--- a/bin/pax/gen_subs.c
+++ b/bin/pax/gen_subs.c
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#include <langinfo.h>
#include <stdint.h>
#include <stdio.h>
-#include <utmp.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
@@ -66,10 +65,6 @@ __FBSDID("$FreeBSD$");
#define OLDFRMTM "%b %e %Y"
#define CURFRMTD "%e %b %H:%M"
#define OLDFRMTD "%e %b %Y"
-#ifndef UT_NAMESIZE
-#define UT_NAMESIZE 8
-#endif
-#define UT_GRPSIZE 6
static int d_first = -1;
@@ -116,9 +111,8 @@ ls_list(ARCHD *arcn, time_t now, FILE *fp)
*/
if (strftime(f_date,DATELEN,timefrmt,localtime(&(sbp->st_mtime))) == 0)
f_date[0] = '\0';
- (void)fprintf(fp, "%s%2u %-*s %-*s ", f_mode, sbp->st_nlink,
- UT_NAMESIZE, name_uid(sbp->st_uid, 1), UT_GRPSIZE,
- name_gid(sbp->st_gid, 1));
+ (void)fprintf(fp, "%s%2u %-12s %-12s ", f_mode, sbp->st_nlink,
+ name_uid(sbp->st_uid, 1), name_gid(sbp->st_gid, 1));
/*
* print device id's for devices, or sizes for other nodes
OpenPOWER on IntegriCloud