Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/lib/libc/gen/fstab.c,v retrieving revision 1.4 retrieving revision 1.6 diff -u -p -r1.4 -r1.6 --- src/lib/libc/gen/fstab.c 1994/08/13 09:03:21 1.4 +++ src/lib/libc/gen/fstab.c 1995/02/27 03:43:12 1.6 @@ -1,6 +1,8 @@ +/* $NetBSD: fstab.c,v 1.6 1995/02/27 03:43:12 cgd Exp $ */ + /* - * Copyright (c) 1980, 1988 Regents of the University of California. - * All rights reserved. + * Copyright (c) 1980, 1988, 1993 + * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,20 +34,25 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -/*static char *sccsid = "from: @(#)fstab.c 5.15 (Berkeley) 2/23/91";*/ -static char *rcsid = "$Id: fstab.c,v 1.4 1994/08/13 09:03:21 pk Exp $"; +#if 0 +static char sccsid[] = "@(#)fstab.c 8.1 (Berkeley) 6/4/93"; +#else +static char rcsid[] = "$NetBSD: fstab.c,v 1.6 1995/02/27 03:43:12 cgd Exp $"; +#endif #endif /* LIBC_SCCS and not lint */ -#include +#include #include -#include #include #include #include +#include static FILE *_fs_fp; static struct fstab _fs_fstab; -static error(); + +static error __P((int)); +static fstabscan __P((void)); static fstabscan() @@ -192,12 +199,17 @@ static error(err) int err; { - char *p; + struct iovec iov[5]; - (void)write(STDERR_FILENO, "fstab: ", 7); - (void)write(STDERR_FILENO, _PATH_FSTAB, sizeof(_PATH_FSTAB) - 1); - (void)write(STDERR_FILENO, ": ", 2); - p = strerror(err); - (void)write(STDERR_FILENO, p, strlen(p)); - (void)write(STDERR_FILENO, "\n", 1); + iov[0].iov_base = "fstab: "; + iov[0].iov_len = 7; + iov[1].iov_base = _PATH_FSTAB; + iov[1].iov_len = sizeof(_PATH_FSTAB) - 1; + iov[2].iov_base = ": "; + iov[2].iov_len = 2; + iov[3].iov_base = strerror(err); + iov[3].iov_len = strlen(iov[3].iov_base); + iov[4].iov_base = "\n"; + iov[4].iov_len = 1; + (void)writev(STDERR_FILENO, iov, 5); }