[PATCH] sbin/quotacheck cleanup
Peter Avalos
pavalos at theshell.com
Thu Apr 21 01:55:34 PDT 2005
Remove register keywords and WARNS6 cleanups.
Peter
Index: quotacheck.c
===================================================================
RCS file: /ftp/pub/DragonFly/dcvs/src/sbin/quotacheck/quotacheck.c,v
retrieving revision 1.7
diff -u -r1.7 quotacheck.c
--- quotacheck.c 18 Dec 2004 21:43:40 -0000 1.7
+++ quotacheck.c 21 Apr 2005 08:50:56 -0000
@@ -60,9 +60,9 @@
#include <string.h>
#include <unistd.h>
-char *qfname = QUOTAFILENAME;
-char *qfextension[] = INITQFNAMES;
-char *quotagroup = QUOTAGROUP;
+const char *qfname = QUOTAFILENAME;
+const char *qfextension[] = INITQFNAMES;
+const char *quotagroup = QUOTAGROUP;
union {
struct fs sblk;
@@ -70,7 +70,7 @@
} un;
#define sblock un.sblk
long dev_bsize = 1;
-long maxino;
+ino_t maxino;
struct quotaname {
long flags;
@@ -102,8 +102,8 @@
addid(u_long, int, char *);
char *blockcheck(char *);
void bread(daddr_t, char *, long);
-extern int checkfstab(int, int, int (*)(struct fstab *),
- int (*)(char *, char *, long, int));
+extern int checkfstab(int, int, void * (*)(struct fstab *),
+ int (*)(char *, char *, struct quotaname *));
int chkquota(char *, char *, struct quotaname *);
void freeinodebuf(void);
struct dinode *
@@ -121,9 +121,9 @@
int
main(int argc, char **argv)
{
- register struct fstab *fs;
- register struct passwd *pw;
- register struct group *gr;
+ struct fstab *fs;
+ struct passwd *pw;
+ struct group *gr;
struct quotaname *auxdata;
int i, argnum, maxrun, errs;
long done = 0;
@@ -202,9 +202,9 @@
}
void *
-needchk(register struct fstab *fs)
+needchk(struct fstab *fs)
{
- register struct quotaname *qnp;
+ struct quotaname *qnp;
char *qfnp;
if (strcmp(fs->fs_vfstype, "ufs") ||
@@ -231,10 +231,10 @@
* Scan the specified filesystem to check quota(s) present on it.
*/
int
-chkquota(char *fsname, char *mntpt, register struct quotaname *qnp)
+chkquota(char *fsname, char *mntpt, struct quotaname *qnp)
{
- register struct fileusage *fup;
- register struct dinode *dp;
+ struct fileusage *fup;
+ struct dinode *dp;
int cg, i, mode, errs = 0;
ino_t ino;
@@ -296,12 +296,12 @@
* Update a specified quota file.
*/
int
-update(char *fsname, char *quotafile, register int type)
+update(char *fsname, char *quotafile, int type)
{
- register struct fileusage *fup;
- register FILE *qfi, *qfo;
- register u_long id, lastid;
- register off_t offset;
+ struct fileusage *fup;
+ FILE *qfi, *qfo;
+ u_long id, lastid;
+ off_t offset;
struct dqblk dqbuf;
static int warned = 0;
static struct dqblk zerodqbuf;
@@ -393,9 +393,9 @@
* Check to see if target appears in list of size cnt.
*/
int
-oneof(register char *target, register char **list, int cnt)
+oneof(char *target, char **list, int cnt)
{
- register int i;
+ int i;
for (i = 0; i < cnt; i++)
if (strcmp(target, list[i]) == 0)
@@ -420,9 +420,9 @@
* Check to see if a particular quota is to be enabled.
*/
int
-hasquota(register struct fstab *fs, int type, char **qfnamep)
+hasquota(struct fstab *fs, int type, char **qfnamep)
{
- register char *opt;
+ char *opt;
char *cp;
static char initname, usrname[100], grpname[100];
static char buf[BUFSIZ];
@@ -463,7 +463,7 @@
struct fileusage *
lookup(u_long id, int type)
{
- register struct fileusage *fup;
+ struct fileusage *fup;
for (fup = fuhead[type][id & (FUHASH-1)]; fup != 0; fup = fup->fu_next)
if (fup->fu_id == id)
Attachment:
pgp00001.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00001.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/submit/attachments/20050421/0a710ae2/attachment-0018.obj>
More information about the Submit
mailing list