Permalink
Browse files

OpenBSD 3.4

  • Loading branch information...
1 parent 14f869e commit ee17df65e07ee7e6dc5546d4ba1635b221743788 itojun committed Nov 9, 2003
Showing with 365 additions and 593 deletions.
  1. +3 −1 openbsd/bin/ls/Makefile
  2. +13 −27 openbsd/bin/ls/cmp.c
  3. +2 −6 openbsd/bin/ls/extern.h
  4. +37 −36 openbsd/bin/ls/ls.1
  5. +17 −23 openbsd/bin/ls/ls.c
  6. +5 −6 openbsd/bin/ls/ls.h
  7. +2 −4 openbsd/bin/ls/main.c
  8. +28 −30 openbsd/bin/ls/print.c
  9. +7 −12 openbsd/bin/ls/util.c
  10. +12 −16 openbsd/usr.bin/fstat/fstat.1
  11. +15 −20 openbsd/usr.bin/fstat/fstat.c
  12. +2 −6 openbsd/usr.bin/fstat/fstat.h
  13. +4 −6 openbsd/usr.bin/fstat/isofs.c
  14. +1 −3 openbsd/usr.bin/netstat/Makefile
  15. +3 −7 openbsd/usr.bin/netstat/atalk.c
  16. +6 −9 openbsd/usr.bin/netstat/if.c
  17. +38 −14 openbsd/usr.bin/netstat/inet.c
  18. +4 −8 openbsd/usr.bin/netstat/inet6.c
  19. +3 −7 openbsd/usr.bin/netstat/ipx.c
  20. +4 −8 openbsd/usr.bin/netstat/iso.c
  21. +14 −16 openbsd/usr.bin/netstat/main.c
  22. +4 −8 openbsd/usr.bin/netstat/mbuf.c
  23. +3 −7 openbsd/usr.bin/netstat/mroute.c
  24. +2 −6 openbsd/usr.bin/netstat/mroute6.c
  25. +36 −37 openbsd/usr.bin/netstat/netstat.1
  26. +4 −8 openbsd/usr.bin/netstat/netstat.h
  27. +3 −7 openbsd/usr.bin/netstat/ns.c
  28. +10 −15 openbsd/usr.bin/netstat/route.c
  29. +3 −7 openbsd/usr.bin/netstat/unix.c
  30. +3 −7 openbsd/usr.bin/systat/cmds.c
  31. +3 −7 openbsd/usr.bin/systat/cmdtab.c
  32. +3 −7 openbsd/usr.bin/systat/disks.c
  33. +2 −6 openbsd/usr.bin/systat/extern.h
  34. +3 −7 openbsd/usr.bin/systat/fetch.c
  35. +3 −7 openbsd/usr.bin/systat/iostat.c
  36. +4 −7 openbsd/usr.bin/systat/keyboard.c
  37. +3 −7 openbsd/usr.bin/systat/main.c
  38. +3 −7 openbsd/usr.bin/systat/mbufs.c
  39. +3 −7 openbsd/usr.bin/systat/netcmds.c
  40. +3 −7 openbsd/usr.bin/systat/netstat.c
  41. +3 −7 openbsd/usr.bin/systat/pigs.c
  42. +3 −7 openbsd/usr.bin/systat/swap.c
  43. +6 −14 openbsd/usr.bin/systat/systat.1
  44. +2 −6 openbsd/usr.bin/systat/systat.h
  45. +8 −12 openbsd/usr.bin/systat/vmstat.c
  46. +6 −9 openbsd/usr.bin/vmstat/dkstats.c
  47. +11 −13 openbsd/usr.bin/vmstat/vmstat.8
  48. +8 −89 openbsd/usr.bin/vmstat/vmstat.c
View
@@ -1,6 +1,8 @@
-# $OpenBSD: Makefile,v 1.6 2000/07/19 19:27:35 mickey Exp $
+# $OpenBSD: Makefile,v 1.7 2003/08/06 19:09:09 tedu Exp $
PROG= ls
SRCS= cmp.c ls.c main.c print.c util.c
+DPADD= ${LIBUTIL}
+LDADD= -lutil
.include <bsd.prog.mk>
View
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmp.c,v 1.3 1997/01/03 22:36:07 millert Exp $ */
+/* $OpenBSD: cmp.c,v 1.5 2003/06/11 23:42:12 deraadt Exp $ */
/* $NetBSD: cmp.c,v 1.10 1996/07/08 10:32:01 mycroft Exp $ */
/*
@@ -16,11 +16,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
@@ -41,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)cmp.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: cmp.c,v 1.3 1997/01/03 22:36:07 millert Exp $";
+static char rcsid[] = "$OpenBSD: cmp.c,v 1.5 2003/06/11 23:42:12 deraadt Exp $";
#endif
#endif /* not lint */
@@ -55,22 +51,19 @@ static char rcsid[] = "$OpenBSD: cmp.c,v 1.3 1997/01/03 22:36:07 millert Exp $";
#include "extern.h"
int
-namecmp(a, b)
- const FTSENT *a, *b;
+namecmp(const FTSENT *a, const FTSENT *b)
{
return (strcmp(a->fts_name, b->fts_name));
}
int
-revnamecmp(a, b)
- const FTSENT *a, *b;
+revnamecmp(const FTSENT *a, const FTSENT *b)
{
return (strcmp(b->fts_name, a->fts_name));
}
int
-modcmp(a, b)
- const FTSENT *a, *b;
+modcmp(const FTSENT *a, const FTSENT *b)
{
if (b->fts_statp->st_mtime > a->fts_statp->st_mtime)
return (1);
@@ -85,8 +78,7 @@ modcmp(a, b)
}
int
-revmodcmp(a, b)
- const FTSENT *a, *b;
+revmodcmp(const FTSENT *a, const FTSENT *b)
{
if (b->fts_statp->st_mtime > a->fts_statp->st_mtime)
return (-1);
@@ -101,8 +93,7 @@ revmodcmp(a, b)
}
int
-acccmp(a, b)
- const FTSENT *a, *b;
+acccmp(const FTSENT *a, const FTSENT *b)
{
if (b->fts_statp->st_atime > a->fts_statp->st_atime)
return (1);
@@ -117,8 +108,7 @@ acccmp(a, b)
}
int
-revacccmp(a, b)
- const FTSENT *a, *b;
+revacccmp(const FTSENT *a, const FTSENT *b)
{
if (b->fts_statp->st_atime > a->fts_statp->st_atime)
return (-1);
@@ -133,8 +123,7 @@ revacccmp(a, b)
}
int
-statcmp(a, b)
- const FTSENT *a, *b;
+statcmp(const FTSENT *a, const FTSENT *b)
{
if (b->fts_statp->st_ctime > a->fts_statp->st_ctime)
return (1);
@@ -149,8 +138,7 @@ statcmp(a, b)
}
int
-revstatcmp(a, b)
- const FTSENT *a, *b;
+revstatcmp(const FTSENT *a, const FTSENT *b)
{
if (b->fts_statp->st_ctime > a->fts_statp->st_ctime)
return (-1);
@@ -165,8 +153,7 @@ revstatcmp(a, b)
}
int
-sizecmp(a, b)
- const FTSENT *a, *b;
+sizecmp(const FTSENT *a, const FTSENT *b)
{
if (b->fts_statp->st_size > a->fts_statp->st_size)
return (1);
@@ -177,8 +164,7 @@ sizecmp(a, b)
}
int
-revsizecmp(a, b)
- const FTSENT *a, *b;
+revsizecmp(const FTSENT *a, const FTSENT *b)
{
if (b->fts_statp->st_size > a->fts_statp->st_size)
return (-1);
View
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.8 2002/02/16 21:27:07 millert Exp $ */
+/* $OpenBSD: extern.h,v 1.9 2003/06/02 23:32:08 millert Exp $ */
/* $NetBSD: extern.h,v 1.5 1995/03/21 09:06:24 cgd Exp $ */
/*-
@@ -13,11 +13,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
View
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ls.1,v 1.34 2003/03/12 20:12:35 deraadt Exp $
+.\" $OpenBSD: ls.1,v 1.39 2003/09/02 18:09:43 jmc Exp $
.\" $NetBSD: ls.1,v 1.14 1995/12/05 02:44:01 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
@@ -15,11 +15,7 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\" must display the following acknowledgement:
-.\" This product includes software developed by the University of
-.\" California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
+.\" 3. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
@@ -45,7 +41,7 @@
.Nd list directory contents
.Sh SYNOPSIS
.Nm ls
-.Op Fl 1ACFLRSTWacdfgiklmnopqrstux
+.Op Fl 1ACFLRSTWacdfghiklmnopqrstux
.Op Ar file ...
.Sh DESCRIPTION
For each operand that names a
@@ -128,7 +124,12 @@ symbolic links in the argument list are not indirected through.
Output is not sorted.
.It Fl g
Does nothing; kept for compatibility with older versions of
-.Xr ls 1 .
+.Nm ls .
+.It Fl h
+When used with a long format
+option, use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte,
+Petabyte and Exabyte in order to reduce the number of digits to four or fewer
+using powers of 2 for sizes (K=1024, M=1048576, etc.).
.It Fl i
For each file, print its inode number.
.It Fl k
@@ -140,7 +141,7 @@ Overrides any value specified by the
environment variable.
.It Fl l
(The lowercase letter
-.Dq ell. Ns )
+.Dq ell. )
List in long format (see below).
If the output is to a terminal, a total sum of all file
sizes is output on a line before the long listing.
@@ -161,7 +162,7 @@ immediately after each pathname that is a directory.
.It Fl q
Force printing of non-graphic characters in file names as
the character
-.Dq ? ;
+.Sq \&? ;
this is the default when output is to a terminal.
.It Fl r
Reverse the order of the sort to get reverse
@@ -189,7 +190,7 @@ or printing
Multi-column output sorted across the page rather than down the page.
.It Fl \&1
(The numeric digit
-.Dq one. Ns )
+.Dq one. )
Force output to be one entry per line.
This is the default when
output is not to a terminal.
@@ -278,8 +279,8 @@ The file mode printed under the
.Fl l
or
.Fl n
-options consists of the entry type, owner permissions, and group
-permissions.
+options consists of the entry type, owner permissions, group permissions,
+and other permissions.
The entry type character describes the type of file, as follows:
.Pp
.Bl -tag -width 4n -offset indent -compact
@@ -393,24 +394,6 @@ system immutable
The
.Nm
utility exits 0 on success or >0 if an error occurred.
-.Sh EXAMPLES
-.Li $ ls -l
-.Pp
-List the contents of the current working directory in long format.
-.Pp
-.Li $ ls -lioF
-.Pp
-In addition to listing the contents of the current working directory in
-long format, show inode numbers, file flags (see
-.Xr chflags 1 ) ,
-and suffix each filename with a symbol representing its file type.
-.Pp
-.Li $ ls -lt /var/log
-.Pp
-List the files in
-.Pa /var/log ,
-sorting the output such that the mostly recently modified entries are
-printed first.
.Sh ENVIRONMENT
.Bl -tag -width BLOCKSIZE
.It Ev BLOCKSIZE
@@ -440,17 +423,35 @@ See
.Xr environ 7
for more information.
.El
-.Sh COMPATIBILITY
-The group field is now automatically included in the long listing for
-files in order to be compatible with the
-.St -p1003.2
-specification.
+.Sh EXAMPLES
+.Li $ ls -l
+.Pp
+List the contents of the current working directory in long format.
+.Pp
+.Li $ ls -lioF
+.Pp
+In addition to listing the contents of the current working directory in
+long format, show inode numbers, file flags (see
+.Xr chflags 1 ) ,
+and suffix each filename with a symbol representing its file type.
+.Pp
+.Li $ ls -lt /var/log
+.Pp
+List the files in
+.Pa /var/log ,
+sorting the output such that the mostly recently modified entries are
+printed first.
.Sh SEE ALSO
.Xr chflags 1 ,
.Xr chmod 1 ,
.Xr symlink 7 ,
.Xr sticky 8
.Sh STANDARDS
+The group field is now automatically included in the long listing for
+files in order to be compatible with the
+.St -p1003.2
+specification.
+.Pp
The
.Nm
utility is expected to be a superset of the
Oops, something went wrong.

0 comments on commit ee17df6

Please sign in to comment.