Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Nov 1999 15:54:24 -0800 (PST)
From:      krentel@dreamscape.com
To:        freebsd-gnats-submit@freebsd.org
Subject:   ports/14965: stat port doesn't know fifo file type
Message-ID:  <19991117235424.1D50314E99@hub.freebsd.org>

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

>Number:         14965
>Category:       ports
>Synopsis:       stat port doesn't know fifo file type
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 17 16:00:01 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Mark W. Krentel
>Release:        3.3
>Organization:
none
>Environment:
3.3-STABLE FreeBSD 3.3-STABLE #0: Sun Nov  7 19:22:39 EST 1999

>Description:
The stat-1.3 port (sysutils) doesn't recognize type FIFO.
Instead, it reports Filetype: "Unknown" and Mode: "?".

In Mark's Humble Opinion, I prefer "FIFO" to "Named Pipe".

P.S. If someone commits this patch, please also take a look
at PR ports/12761 and PR ports/13823 (other minor problems 
with stat).

>How-To-Repeat:
% mkfifo myfifo
% /usr/local/bin/stat myfifo 
  File: "myfifo"
  Size: 0       Allocated Blocks: 0     Filetype: Unknown
  Mode: (0755/?rwxr-xr-x)       Uid: (1000/krentel) Gid: (1000/krentel)
Device: 263173  Inode: 316429   Links: 1        
Access: Wed Nov 17 15:18:22 1999
Modify: Wed Nov 17 15:18:22 1999
Change: Wed Nov 17 15:18:22 1999

%

>Fix:
--- stat.fmt.c.orig	Sun Feb 16 08:12:33 1997
+++ stat.fmt.c	Wed Nov 17 14:57:30 1999
@@ -279,6 +279,8 @@
 					break;
 		case	S_IFSOCK:	buf[5 + 0] = 's';
 					break;
+		case	S_IFIFO:	buf[5 + 0] = 'p';
+					break;
 		default		:	buf[5 + 0] = '?';
 	}
 }
@@ -328,6 +330,10 @@
 
 		case	S_IFSOCK:
 			strcpy(buf, "Socket");
+			break;
+
+		case	S_IFIFO:
+			strcpy(buf, "FIFO");
 			break;
 
 		default:



>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?19991117235424.1D50314E99>