| @@ -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 |
43 | static char sccsid[] = "@(#)quota.c 8.4 (Berkeley) 4/28/95"; | | 43 | static 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 | |
67 | const char *qfextension[] = INITQFNAMES; | | 67 | const char *qfextension[] = INITQFNAMES; |
68 | const char *qfnamep = QUOTAFILENAME; | | 68 | const 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 | */ |
73 | int | | 73 | int |
74 | hasquota(char *buf, size_t len, struct fstab *fs, int type) | | 74 | hasquota(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) { |