Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Sep 1999 10:06:36 -0700 (PDT)
From:      cschuber@uumail.gov.bc.ca
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/13823: stat port not formatting device node
Message-ID:  <199909191706.KAA32541@cwsys.cwsent.com>

next in thread | raw e-mail | index | archive | help

>Number:         13823
>Category:       ports
>Synopsis:       stat port not formatting device node
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 19 10:20:01 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Cy Schubert
>Release:        FreeBSD 3.3-RELEASE i386
>Organization:
ITSD Province of BC
>Environment:

FreeBSD cwsys 3.3-RELEASE FreeBSD 3.3-RELEASE #0: Fri Sep 17 06:21:47 PDT 1999     root@:/opt2/cvs-330/src/sys/compile/CWSYS  i386

>Description:

Stat port prints device node as a %d of st_dev.  This patch prints the 
major and minor numbers as an ancient version of stat once did, as a
majornumber,minornumber.

>How-To-Repeat:

Run stat then apply patch and run it again to see the difference.

>Fix:
	
diff -urPN /opt/CVSup/usr/ports/sysutils/stat/patches/patch-aa stat-990919/patches/patch-aa
--- /opt/CVSup/usr/ports/sysutils/stat/patches/patch-aa	Wed Dec 31 16:00:00 1969
+++ stat-990919/patches/patch-aa	Sun Sep 19 09:56:24 1999
@@ -0,0 +1,11 @@
+--- stat.fmt.c.orig	Sun Feb 16 05:12:33 1997
++++ stat.fmt.c	Sun Sep 19 09:55:50 1999
+@@ -440,7 +440,7 @@
+ 					break;
+ 
+ 				case 'd':	/* The Device	*/
+-					sprintf(auxbuf, "%ld", ip -> st_dev);
++					sprintf(auxbuf, "%2d,%-2d",  major(ip -> st_dev), minor(ip -> st_dev));
+ 					bufp = fmt_app(auxbuf, bufp);
+ 					break;
+ 

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




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