Source-Changes-HG archive

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

[src/netbsd-1-6]: src/usr.bin/stat Pull up revision 1.3 (requested by atatat ...



details:   https://anonhg.NetBSD.org/src/rev/fb86d862e14c
branches:  netbsd-1-6
changeset: 527695:fb86d862e14c
user:      tv <tv%NetBSD.org@localhost>
date:      Sun Jun 02 15:34:00 2002 +0000

description:
Pull up revision 1.3 (requested by atatat in ticket #112):
When asked for the string representation of a device that isn't
found by devname(3), don't report a "bad format"...just use "???"
instead.

diffstat:

 usr.bin/stat/stat.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 6ed32e23e3ed -r fb86d862e14c usr.bin/stat/stat.c
--- a/usr.bin/stat/stat.c       Sun Jun 02 15:31:24 2002 +0000
+++ b/usr.bin/stat/stat.c       Sun Jun 02 15:34:00 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: stat.c,v 1.2 2002/05/09 17:52:03 atatat Exp $ */
+/*     $NetBSD: stat.c,v 1.2.2.1 2002/06/02 15:34:00 tv Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: stat.c,v 1.2 2002/05/09 17:52:03 atatat Exp $");
+__RCSID("$NetBSD: stat.c,v 1.2.2.1 2002/06/02 15:34:00 tv Exp $");
 #endif
 
 #include <sys/types.h>
@@ -500,6 +500,8 @@
                    S_ISCHR(st->st_mode) ? S_IFCHR :
                    S_ISBLK(st->st_mode) ? S_IFBLK :
                    0U);
+               if (sdata == NULL)
+                       sdata = "???";
                if (hilo == HIGH_PIECE) {
                        data = major(data);
                        hilo = 0;



Home | Main Index | Thread Index | Old Index