Teach strmode(3) about whiteouts. They get w 'w' now.

This commit is contained in:
matthias 1997-01-30 09:23:46 +00:00
parent 192303707a
commit 97a71285c8
2 changed files with 9 additions and 2 deletions

View File

@ -30,7 +30,7 @@
.\" SUCH DAMAGE.
.\"
.\" from: @(#)strmode.3 5.4 (Berkeley) 7/31/91
.\" $Id: strmode.3,v 1.3 1994/01/10 23:59:00 jtc Exp $
.\" $Id: strmode.3,v 1.4 1997/01/30 09:23:46 matthias Exp $
.\"
.Dd July 31, 1991
.Dt STRMODE 3
@ -72,6 +72,8 @@ symbolic link
fifo
.It s
socket
.It w
whiteout
.It ?
unknown inode type
.El

View File

@ -33,7 +33,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)strmode.c 5.3 (Berkeley) 5/18/90";*/
static char *rcsid = "$Id: strmode.c,v 1.3 1993/08/26 00:51:54 jtc Exp $";
static char *rcsid = "$Id: strmode.c,v 1.4 1997/01/30 09:23:47 matthias Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@ -69,6 +69,11 @@ strmode(mode, p)
case S_IFIFO: /* fifo */
*p++ = 'p';
break;
#endif
#ifdef S_IFWHT
case S_IFWHT: /* whiteout */
*p++ = 'w';
break;
#endif
default: /* unknown */
*p++ = '?';