summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2000-02-05 18:42:36 +0000
committerjoe <joe@FreeBSD.org>2000-02-05 18:42:36 +0000
commitb57f9be4b788fc9ec1fdcfb1979d076f6dfb6be6 (patch)
tree5948d533f1f00d26c5add7b73cba4ee62f634a1b /bin
parent3f518216d3568e20b83d41ad700ea49f6fb54223 (diff)
downloadFreeBSD-src-b57f9be4b788fc9ec1fdcfb1979d076f6dfb6be6.zip
FreeBSD-src-b57f9be4b788fc9ec1fdcfb1979d076f6dfb6be6.tar.gz
Revert part of the last commit, remove {g|s}etflags from the libc
interface, and statically link them to the programs using them. These functions, upon reflection and discussion, are too generically named for a library interface with such specific functionality. Also the api that they use, whilst ok for private use, isn't good enough for a libc function. Additionally there were complications with the build/install-world process. It depends heavily upon xinstall, which got broken by the change in api, and caused bootstrap problems and general mayhem. There is work in progress to address future problems that may be caused by changes in install-chain tools, and better names for {g|s}etflags can be derived when some future program requires them. For now the code has been left in src/lib/libc/gen (it started off in src/bin/ls). It's important to provide library functions for manipulating file flag strings if we ever want this interface to be adopted outside of the source tree, but now isn't necessarily the right moment with 4.0-release just around the corner. Approved: jkh
Diffstat (limited to 'bin')
-rw-r--r--bin/chflags/Makefile2
-rw-r--r--bin/chflags/chflags.c2
-rw-r--r--bin/ls/Makefile3
-rw-r--r--bin/ls/ls.c2
-rw-r--r--bin/rm/Makefile2
-rw-r--r--bin/rm/rm.c2
6 files changed, 12 insertions, 1 deletions
diff --git a/bin/chflags/Makefile b/bin/chflags/Makefile
index 30b6699..b545bfa 100644
--- a/bin/chflags/Makefile
+++ b/bin/chflags/Makefile
@@ -5,5 +5,7 @@ NOSHARED?=yes
PROG= chflags
CFLAGS+=-Wall
+.PATH: ${.CURDIR}/../../lib/libc/gen
+SRCS= chflags.c setflags.c
.include <bsd.prog.mk>
diff --git a/bin/chflags/chflags.c b/bin/chflags/chflags.c
index daeab4d..784243e 100644
--- a/bin/chflags/chflags.c
+++ b/bin/chflags/chflags.c
@@ -56,6 +56,8 @@ static const char rcsid[] =
#include <string.h>
#include <unistd.h>
+extern u_long setflags __P((char **, u_long *, u_long *));
+
void usage __P((void));
int
diff --git a/bin/ls/Makefile b/bin/ls/Makefile
index 1ab70dc..8496dd9 100644
--- a/bin/ls/Makefile
+++ b/bin/ls/Makefile
@@ -3,6 +3,7 @@
PROG= ls
-SRCS= cmp.c ls.c print.c util.c
+SRCS= cmp.c setflags.c ls.c print.c util.c
+.PATH: ${.CURDIR}/../../lib/libc/gen
.include <bsd.prog.mk>
diff --git a/bin/ls/ls.c b/bin/ls/ls.c
index 5db9997..754236b 100644
--- a/bin/ls/ls.c
+++ b/bin/ls/ls.c
@@ -74,6 +74,8 @@ static const char rcsid[] =
*/
#define STRBUF_SIZEOF(t) (1 + CHAR_BIT * sizeof(t) / 3 + 1)
+char *getflags __P((u_long, char *));
+
static void display __P((FTSENT *, FTSENT *));
static u_quad_t makenines __P((u_long));
static int mastercmp __P((const FTSENT **, const FTSENT **));
diff --git a/bin/rm/Makefile b/bin/rm/Makefile
index 7058fa0..2bbcdf8 100644
--- a/bin/rm/Makefile
+++ b/bin/rm/Makefile
@@ -2,8 +2,10 @@
# $FreeBSD$
PROG= rm
+SRCS= rm.c setflags.c
LINKS= ${BINDIR}/rm ${BINDIR}/unlink
MLINKS= rm.1 unlink.1
+.PATH: ${.CURDIR}/../../lib/libc/gen
.include <bsd.prog.mk>
diff --git a/bin/rm/rm.c b/bin/rm/rm.c
index 4315f99..3c9071f 100644
--- a/bin/rm/rm.c
+++ b/bin/rm/rm.c
@@ -61,6 +61,8 @@ static const char rcsid[] =
#include <sysexits.h>
#include <unistd.h>
+char *getflags __P((u_long, char *));
+
int dflag, eval, fflag, iflag, Pflag, vflag, Wflag, stdin_ok;
uid_t uid;
OpenPOWER on IntegriCloud