Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/mtree dump_nodes() fixes:



details:   https://anonhg.NetBSD.org/src/rev/6434ed5853f7
branches:  trunk
changeset: 515810:6434ed5853f7
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Oct 05 12:44:47 2001 +0000

description:
dump_nodes() fixes:
- in F_GID, print the gid not the uid
- support F_GNAME

diffstat:

 usr.sbin/mtree/spec.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 1635f2f530d3 -r 6434ed5853f7 usr.sbin/mtree/spec.c
--- a/usr.sbin/mtree/spec.c     Fri Oct 05 12:37:39 2001 +0000
+++ b/usr.sbin/mtree/spec.c     Fri Oct 05 12:44:47 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spec.c,v 1.28 2001/10/05 01:03:25 lukem Exp $  */
+/*     $NetBSD: spec.c,v 1.29 2001/10/05 12:44:47 lukem Exp $  */
 
 /*-
  * Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)spec.c     8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: spec.c,v 1.28 2001/10/05 01:03:25 lukem Exp $");
+__RCSID("$NetBSD: spec.c,v 1.29 2001/10/05 12:44:47 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -173,7 +173,9 @@
                if (keys & F_UNAME)
                        printf("uname=%s ", user_from_uid(cur->st_uid, 0));
                if (keys & F_GID)
-                       printf("gid=%u ", cur->st_uid);
+                       printf("gid=%u ", cur->st_gid);
+               if (keys & F_GNAME)
+                       printf("gname=%s ", group_from_gid(cur->st_gid, 0));
                if (keys & F_MODE)
                        printf("mode=%#o ", cur->st_mode);
                if (keys & F_NLINK && cur->type != F_DIR &&



Home | Main Index | Thread Index | Old Index