diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-08-10 00:42:10 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-08-10 00:42:10 +0000 |
commit | 86039bd4136a48050ac1fe7521180bf967f22569 (patch) | |
tree | c78d9187ac59ca9a7eea478d6d25107aa4e776a8 /usr.sbin/mtree/extern.h | |
parent | bbdd33e5ecee3792bd6e1f7f5fe3492acf7fa763 (diff) |
Call open(2) with O_NONBLOCK and O_NOFOLLOW to make sure mtree can't
be halted by a FIFO or special device.
Use fgetln() instead of fgets() to handle arbitrarily long lines.
If a line starts with a comment char, don't check for line continuation char.
Adapted from a diff by Solar Designer. OK deraadt@ henning@
Diffstat (limited to 'usr.sbin/mtree/extern.h')
-rw-r--r-- | usr.sbin/mtree/extern.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/mtree/extern.h b/usr.sbin/mtree/extern.h index 4954adb6749..c855c1a4188 100644 --- a/usr.sbin/mtree/extern.h +++ b/usr.sbin/mtree/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.7 2004/11/21 19:36:04 otto Exp $ */ +/* $OpenBSD: extern.h,v 1.8 2005/08/10 00:42:09 millert Exp $ */ /* $NetBSD: extern.h,v 1.3 1995/03/07 21:12:07 cgd Exp $ */ /*- @@ -39,7 +39,8 @@ int compare(char *, struct _node *, struct _ftsent *); int dsort(const struct _ftsent **, const struct _ftsent **); int crc(int, u_int32_t *, u_int32_t *); void cwalk(void); -void error(const char *, ...); +void error(const char *, ...) + __attribute__((__format__ (printf, 1, 2))); char *inotype(u_int); u_int parsekey(char *, int *); char *rlink(char *); |