Mon Jan 30 06:14:43 2012 UTC ()
Remove stray p in identifier name. This has (as far as I can tell)
prevented quotacheck and other old-style quota bits from working since
last March. Use a correct declaration in the header file, so that if
something similar happens again affected programs will fail to link
instead of failing to work.

This kind of nonsense is why I like -Wl,-warn-common.


(dholland)
diff -r1.5 -r1.6 src/usr.bin/quota/quotautil.c
diff -r1.3 -r1.4 src/usr.bin/quota/quotautil.h

cvs diff -r1.5 -r1.6 src/usr.bin/quota/quotautil.c (expand / switch to unified diff)

--- src/usr.bin/quota/quotautil.c 2012/01/30 06:02:12 1.5
+++ src/usr.bin/quota/quotautil.c 2012/01/30 06:14:43 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: quotautil.c,v 1.5 2012/01/30 06:02:12 dholland Exp $ */ 1/* $NetBSD: quotautil.c,v 1.6 2012/01/30 06:14:43 dholland Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1980, 1990, 1993 4 * Copyright (c) 1980, 1990, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * Robert Elz at The University of Melbourne. 8 * Robert Elz at The University of Melbourne.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -32,50 +32,50 @@ @@ -32,50 +32,50 @@
32 * SUCH DAMAGE. 32 * SUCH DAMAGE.
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36#ifndef lint 36#ifndef lint
37__COPYRIGHT("@(#) Copyright (c) 1980, 1990, 1993\ 37__COPYRIGHT("@(#) Copyright (c) 1980, 1990, 1993\
38 The Regents of the University of California. All rights reserved."); 38 The Regents of the University of California. All rights reserved.");
39#endif /* not lint */ 39#endif /* not lint */
40 40
41#ifndef lint 41#ifndef lint
42#if 0 42#if 0
43static char sccsid[] = "@(#)quota.c 8.4 (Berkeley) 4/28/95"; 43static char sccsid[] = "@(#)quota.c 8.4 (Berkeley) 4/28/95";
44#else 44#else
45__RCSID("$NetBSD: quotautil.c,v 1.5 2012/01/30 06:02:12 dholland Exp $"); 45__RCSID("$NetBSD: quotautil.c,v 1.6 2012/01/30 06:14:43 dholland Exp $");
46#endif 46#endif
47#endif /* not lint */ 47#endif /* not lint */
48 48
49#include <sys/param.h> 49#include <sys/param.h>
50#include <sys/types.h> 50#include <sys/types.h>
51 51
52#include <ctype.h> 52#include <ctype.h>
53#include <stdio.h> 53#include <stdio.h>
54#include <stdlib.h> 54#include <stdlib.h>
55#include <string.h> 55#include <string.h>
56#include <time.h> 56#include <time.h>
57#include <unistd.h> 57#include <unistd.h>
58#include <fstab.h> 58#include <fstab.h>
59#include <errno.h> 59#include <errno.h>
60#include <limits.h> 60#include <limits.h>
61#include <inttypes.h> 61#include <inttypes.h>
62 62
63#include <ufs/ufs/quota1.h> 63#include <ufs/ufs/quota1.h>
64 64
65#include "quotautil.h" 65#include "quotautil.h"
66 66
67const char *qfextension[] = INITQFNAMES; 67const char *qfextension[] = INITQFNAMES;
68const char *qfnamep = QUOTAFILENAME; 68const char *qfname = QUOTAFILENAME;
69  69
70/* 70/*
71 * Check to see if a particular quota is to be enabled. 71 * Check to see if a particular quota is to be enabled.
72 */ 72 */
73int 73int
74hasquota(char *buf, size_t len, struct fstab *fs, int type) 74hasquota(char *buf, size_t len, struct fstab *fs, int type)
75{ 75{
76 char *opt; 76 char *opt;
77 char *cp = NULL; 77 char *cp = NULL;
78 static char initname, usrname[100], grpname[100]; 78 static char initname, usrname[100], grpname[100];
79 char optbuf[256]; 79 char optbuf[256];
80 80
81 if (!initname) { 81 if (!initname) {

cvs diff -r1.3 -r1.4 src/usr.bin/quota/quotautil.h (expand / switch to unified diff)

--- src/usr.bin/quota/quotautil.h 2011/03/24 17:05:46 1.3
+++ src/usr.bin/quota/quotautil.h 2012/01/30 06:14:43 1.4
@@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
1/* $NetBSD: quotautil.h,v 1.3 2011/03/24 17:05:46 bouyer Exp $ */ 1/* $NetBSD: quotautil.h,v 1.4 2012/01/30 06:14:43 dholland Exp $ */
2 2
3const char *qfextension[MAXQUOTAS]; 3extern const char *qfextension[MAXQUOTAS];
4const char *qfname; 4extern const char *qfname;
5struct fstab; 5struct fstab;
6int hasquota(char *, size_t, struct fstab *, int); 6int hasquota(char *, size_t, struct fstab *, int);
7int oneof(const char *, char *[], int); 7int oneof(const char *, char *[], int);