summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2000-07-19 19:30:11 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2000-07-19 19:30:11 +0000
commit2dbbc1bfb22db03ec0424bb35a90a23b4491b679 (patch)
treeddb4fd091157a5f88eacc6fa4f73e6374fec2819 /usr.bin
parent632f7a30ffb583f4eeb9b6a2fd17c8af0d4ad2d1 (diff)
new strtofflags/fflagstostr
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/find/Makefile5
-rw-r--r--usr.bin/find/function.c8
-rw-r--r--usr.bin/xinstall/Makefile5
-rw-r--r--usr.bin/xinstall/xinstall.c9
4 files changed, 12 insertions, 15 deletions
diff --git a/usr.bin/find/Makefile b/usr.bin/find/Makefile
index db331cd2a13..e67ac5255e8 100644
--- a/usr.bin/find/Makefile
+++ b/usr.bin/find/Makefile
@@ -1,7 +1,6 @@
-# $OpenBSD: Makefile,v 1.3 2000/07/08 16:09:33 millert Exp $
+# $OpenBSD: Makefile,v 1.4 2000/07/19 19:30:10 mickey Exp $
PROG= find
-SRCS= find.c function.c ls.c main.c misc.c operator.c option.c stat_flags.c
-.PATH: ${.CURDIR}/../../bin/ls
+SRCS= find.c function.c ls.c main.c misc.c operator.c option.c
.include <bsd.prog.mk>
diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c
index fb969903b6c..fe26f822342 100644
--- a/usr.bin/find/function.c
+++ b/usr.bin/find/function.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: function.c,v 1.19 2000/07/08 16:09:34 millert Exp $ */
+/* $OpenBSD: function.c,v 1.20 2000/07/19 19:30:10 mickey Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -38,7 +38,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)function.c 8.1 (Berkeley) 6/6/93";*/
-static char rcsid[] = "$OpenBSD: function.c,v 1.19 2000/07/08 16:09:34 millert Exp $";
+static char rcsid[] = "$OpenBSD: function.c,v 1.20 2000/07/19 19:30:10 mickey Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -575,7 +575,7 @@ c_flags(flags_str)
char *flags_str;
{
PLAN *new;
- u_int flags, notflags;
+ u_int32_t flags, notflags;
ftsoptions &= ~FTS_NOSTAT;
@@ -586,7 +586,7 @@ c_flags(flags_str)
++flags_str;
}
- if (string_to_flags(&flags_str, &flags, &notflags) == 1)
+ if (strtofflags(&flags_str, &flags, &notflags) == 1)
errx(1, "-flags: %s: illegal flags string", flags_str);
new->fl_flags = flags;
diff --git a/usr.bin/xinstall/Makefile b/usr.bin/xinstall/Makefile
index b6922ad5681..80994830a8b 100644
--- a/usr.bin/xinstall/Makefile
+++ b/usr.bin/xinstall/Makefile
@@ -1,9 +1,8 @@
-# $OpenBSD: Makefile,v 1.5 1997/09/21 11:52:11 deraadt Exp $
+# $OpenBSD: Makefile,v 1.6 2000/07/19 19:29:16 mickey Exp $
PROG= xinstall
-SRCS= stat_flags.c xinstall.c
+SRCS= xinstall.c
MAN= install.1
-.PATH: ${.CURDIR}/../../bin/ls
realinstall:
${INSTALL} ${INSTALL_COPY} ${INSTALL_STRIP} -o ${BINOWN} -g ${BINGRP} \
diff --git a/usr.bin/xinstall/xinstall.c b/usr.bin/xinstall/xinstall.c
index e8ce80d921f..7b2b496f539 100644
--- a/usr.bin/xinstall/xinstall.c
+++ b/usr.bin/xinstall/xinstall.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xinstall.c,v 1.22 1999/08/04 18:24:09 mickey Exp $ */
+/* $OpenBSD: xinstall.c,v 1.23 2000/07/19 19:29:16 mickey Exp $ */
/* $NetBSD: xinstall.c,v 1.9 1995/12/20 10:25:17 jonathan Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)xinstall.c 8.1 (Berkeley) 7/21/93";
#endif
-static char rcsid[] = "$OpenBSD: xinstall.c,v 1.22 1999/08/04 18:24:09 mickey Exp $";
+static char rcsid[] = "$OpenBSD: xinstall.c,v 1.23 2000/07/19 19:29:16 mickey Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -86,7 +86,6 @@ void copy __P((int, char *, int, char *, off_t, int));
int compare __P((int, const char *, size_t, int, const char *, size_t));
void install __P((char *, char *, u_long, u_int));
void install_dir __P((char *));
-u_long string_to_flags __P((char **, u_long *, u_long *));
void strip __P((char *));
void usage __P((void));
int create_newfile __P((char *, struct stat *));
@@ -100,7 +99,7 @@ main(argc, argv)
{
struct stat from_sb, to_sb;
mode_t *set;
- u_long fset;
+ u_int32_t fset;
u_int iflags;
int ch, no_target;
char *flags, *to_name, *group = NULL, *owner = NULL;
@@ -122,7 +121,7 @@ main(argc, argv)
break;
case 'f':
flags = optarg;
- if (string_to_flags(&flags, &fset, NULL))
+ if (strtofflags(&flags, &fset, NULL))
errx(EX_USAGE, "%s: invalid flag", flags);
iflags |= SETFLAGS;
break;