[BACK]Return to quota.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / quota

Diff for /src/usr.bin/quota/quota.c between version 1.19 and 1.20

version 1.19, 2002/02/17 19:42:31 version 1.20, 2002/05/14 12:24:10
Line 37 
Line 37 
  */   */
   
 #ifndef lint  #ifndef lint
 static char copyright[] =  static const char copyright[] =
 "@(#) Copyright (c) 1980, 1990, 1993\n\  "@(#) Copyright (c) 1980, 1990, 1993\n\
         The Regents of the University of California.  All rights reserved.\n";          The Regents of the University of California.  All rights reserved.\n";
 #endif /* not lint */  #endif /* not lint */
   
 #ifndef lint  #ifndef lint
 /*static char sccsid[] = "from: @(#)quota.c     8.1 (Berkeley) 6/6/93";*/  /*static char sccsid[] = "from: @(#)quota.c     8.1 (Berkeley) 6/6/93";*/
 static char rcsid[] = "$OpenBSD$";  static const char rcsid[] =
   "$OpenBSD$";
 #endif /* not lint */  #endif /* not lint */
   
 /*  /*
Line 88 
Line 89 
   
 int     alldigits(char *);  int     alldigits(char *);
 int     callaurpc(char *, int, int, int, xdrproc_t, void *, xdrproc_t, void *);  int     callaurpc(char *, int, int, int, xdrproc_t, void *, xdrproc_t, void *);
 int     main(int, char **);  
 int     getnfsquota(struct statfs *, struct fstab *, struct quotause *,  int     getnfsquota(struct statfs *, struct fstab *, struct quotause *,
             long, int);              long, int);
 struct quotause *getprivs(long id, int quotatype);  struct quotause
          *getprivs(long id, int quotatype);
 int     getufsquota(struct statfs *, struct fstab *, struct quotause *,  int     getufsquota(struct statfs *, struct fstab *, struct quotause *,
             long, int);              long, int);
 void    heading(int, u_long, const char *, const char *);  void    heading(int, u_long, const char *, const char *);
Line 177 
Line 178 
                 exit(0);                  exit(0);
         }          }
         /* NOTREACHED */          /* NOTREACHED */
   
           exit(1);
 }  }
   
 void  void
Line 229 
Line 232 
         }          }
         myuid = getuid();          myuid = getuid();
         if (pwd->pw_uid != myuid && myuid != 0) {          if (pwd->pw_uid != myuid && myuid != 0) {
                 warnx("%s (uid %u): permission denied", pwd->pw_name, pwd->pw_uid);                  warnx("%s (uid %u): permission denied", pwd->pw_name,
                       pwd->pw_uid);
                 return;                  return;
         }          }
         showquotas(USRQUOTA, pwd->pw_uid, pwd->pw_name);          showquotas(USRQUOTA, pwd->pw_uid, pwd->pw_name);
Line 472 
Line 476 
         setfsent();          setfsent();
         for (i = 0; i < nfst; i++) {          for (i = 0; i < nfst; i++) {
                 if (qup == NULL) {                  if (qup == NULL) {
                         if ((qup = (struct quotause *)malloc(sizeof *qup)) == NULL)                          if ((qup =
                               (struct quotause *)malloc(sizeof *qup)) == NULL)
                                 errx(2, "out of memory");                                  errx(2, "out of memory");
                 }                  }
                 if (strncmp(fst[i].f_fstypename, "nfs", MFSNAMELEN) == 0) {                  if (strncmp(fst[i].f_fstypename, "nfs", MFSNAMELEN) == 0) {

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20