Add and document support for using new archive state mode flags. Now
archived files will show up as either "a" (S_ARCH1) or "A" (S_ARCH2) in ls -l. As noted, archive state is fs-dependent, and not maintained by most fs's.
This commit is contained in:
parent
3bf14d81e9
commit
0217e4fdc2
@ -30,7 +30,7 @@
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" from: @(#)strmode.3 8.3 (Berkeley) 7/28/94
|
||||
.\" $NetBSD: strmode.3,v 1.9 1998/02/05 18:50:53 perry Exp $
|
||||
.\" $NetBSD: strmode.3,v 1.10 1999/08/03 21:43:13 wrstuden Exp $
|
||||
.\"
|
||||
.Dd July 28, 1994
|
||||
.Dt STRMODE 3
|
||||
@ -62,6 +62,10 @@ The first character is the inode type, and will be one of the following:
|
||||
.Bl -tag -width flag -offset indent -compact
|
||||
.It \-
|
||||
regular file
|
||||
.It a
|
||||
regular file in archive state 1
|
||||
.It A
|
||||
regular file in archive state 2
|
||||
.It b
|
||||
block special
|
||||
.It c
|
||||
@ -135,6 +139,14 @@ None of the above apply.
|
||||
The last character is a plus sign ``+'' if there are any alternative
|
||||
or additional access control methods associated with the inode, otherwise
|
||||
it will be a space.
|
||||
.Pp
|
||||
Archive state 1 and archive state 2 represent file system dependent
|
||||
archive state for a file. Most file systems do not retain file archive
|
||||
state, and so will not report files in either archive state.
|
||||
msdosfs will report a file in archive state 1 if it has been
|
||||
archived more recently than modified. Hierarchical storage systems
|
||||
may have multiple archive states for a file and may define archive
|
||||
states 1 and 2 as appropriate.
|
||||
.Sh SEE ALSO
|
||||
.Xr chmod 1 ,
|
||||
.Xr find 1 ,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: strmode.c,v 1.8 1998/02/03 18:49:20 perry Exp $ */
|
||||
/* $NetBSD: strmode.c,v 1.9 1999/08/03 21:43:13 wrstuden Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@ -38,7 +38,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)strmode.c 8.3 (Berkeley) 8/15/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: strmode.c,v 1.8 1998/02/03 18:49:20 perry Exp $");
|
||||
__RCSID("$NetBSD: strmode.c,v 1.9 1999/08/03 21:43:13 wrstuden Exp $");
|
||||
#endif
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
@ -63,7 +63,17 @@ strmode(mode, p)
|
||||
*p++ = 'b';
|
||||
break;
|
||||
case S_IFREG: /* regular */
|
||||
#ifdef S_ARCH2
|
||||
if ((mode & S_ARCH2) != 0) {
|
||||
*p++ = 'A';
|
||||
} else if ((mode & S_ARCH1) != 0) {
|
||||
*p++ = 'a';
|
||||
} else {
|
||||
#endif
|
||||
*p++ = '-';
|
||||
#ifdef S_ARCH2
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case S_IFLNK: /* symbolic link */
|
||||
*p++ = 'l';
|
||||
|
Loading…
Reference in New Issue
Block a user