[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.22 and 1.23

version 1.22, 2003/06/03 02:56:14 version 1.23, 2003/06/10 22:20:49
Line 105 
Line 105 
 int     vflag;  int     vflag;
   
 int  int
 main(argc, argv)  main(int argc, char *argv[])
         int argc;  
         char *argv[];  
 {  {
         int ngroups;          int ngroups;
         gid_t mygid, gidset[NGROUPS];          gid_t mygid, gidset[NGROUPS];
Line 179 
Line 177 
 }  }
   
 void  void
 usage()  usage(void)
 {  {
   
         fprintf(stderr, "%s\n%s\n%s\n",          fprintf(stderr, "%s\n%s\n%s\n",
Line 193 
Line 191 
  * Print out quotas for a specified user identifier.   * Print out quotas for a specified user identifier.
  */   */
 void  void
 showuid(uid)  showuid(uid_t uid)
         uid_t uid;  
 {  {
         struct passwd *pwd = getpwuid(uid);          struct passwd *pwd = getpwuid(uid);
         uid_t myuid;          uid_t myuid;
Line 216 
Line 213 
  * Print out quotas for a specified user name.   * Print out quotas for a specified user name.
  */   */
 void  void
 showusrname(name)  showusrname(const char *name)
         const char *name;  
 {  {
         struct passwd *pwd = getpwnam(name);          struct passwd *pwd = getpwnam(name);
         uid_t myuid;          uid_t myuid;
Line 239 
Line 235 
  * Print out quotas for a specified group identifier.   * Print out quotas for a specified group identifier.
  */   */
 void  void
 showgid(gid)  showgid(gid_t gid)
         gid_t gid;  
 {  {
         struct group *grp = getgrgid(gid);          struct group *grp = getgrgid(gid);
         int ngroups;          int ngroups;
Line 274 
Line 269 
  * Print out quotas for a specified group name.   * Print out quotas for a specified group name.
  */   */
 void  void
 showgrpname(name)  showgrpname(const char *name)
         const char *name;  
 {  {
         struct group *grp = getgrnam(name);          struct group *grp = getgrnam(name);
         int ngroups;          int ngroups;
Line 306 
Line 300 
 }  }
   
 void  void
 showquotas(type, id, name)  showquotas(int type, u_long id, const char *name)
         int type;  
         u_long id;  
         const char *name;  
 {  {
         struct quotause *qup;          struct quotause *qup;
         struct quotause *quplist;          struct quotause *quplist;
Line 396 
Line 387 
 }  }
   
 void  void
 heading(type, id, name, tag)  heading(int type, u_long id, const char *name, const char *tag)
         int type;  
         u_long id;  
         const char *name, *tag;  
 {  {
   
         printf("Disk quotas for %s %s (%cid %ld): %s\n", qfextension[type],          printf("Disk quotas for %s %s (%cid %ld): %s\n", qfextension[type],
Line 422 
Line 410 
  * Calculate the grace period and return a printable string for it.   * Calculate the grace period and return a printable string for it.
  */   */
 char *  char *
 timeprt(seconds)  timeprt(time_t seconds)
         time_t seconds;  
 {  {
         time_t hours, minutes;          time_t hours, minutes;
         static char buf[20];          static char buf[20];
Line 454 
Line 441 
  * Collect the requested quota information.   * Collect the requested quota information.
  */   */
 struct quotause *  struct quotause *
 getprivs(id, quotatype)  getprivs(long id, int quotatype)
         long id;  
         int quotatype;  
 {  {
         struct quotause *qup, *quptail;          struct quotause *qup, *quptail;
         struct fstab *fs;          struct fstab *fs;
Line 516 
Line 501 
  * Check to see if a particular quota is to be enabled.   * Check to see if a particular quota is to be enabled.
  */   */
 int  int
 ufshasquota(fs, type, qfnamep)  ufshasquota(struct fstab *fs, int type, char **qfnamep)
         struct fstab *fs;  
         int type;  
         char **qfnamep;  
 {  {
         static char initname, usrname[100], grpname[100];          static char initname, usrname[100], grpname[100];
         static char buf[BUFSIZ];          static char buf[BUFSIZ];
Line 556 
Line 538 
 }  }
   
 int  int
 getufsquota(fst, fs, qup, id, quotatype)  getufsquota(struct statfs *fst, struct fstab *fs, struct quotause *qup,
         struct statfs *fst;      long id, int quotatype)
         struct fstab *fs;  
         struct quotause *qup;  
         long id;  
         int quotatype;  
 {  {
         char *qfpathname;          char *qfpathname;
         int fd, qcmd;          int fd, qcmd;
Line 597 
Line 575 
 }  }
   
 int  int
 getnfsquota(fst, fs, qup, id, quotatype)  getnfsquota(struct statfs *fst, struct fstab *fs, struct quotause *qup,
         struct statfs *fst;      long id, int quotatype)
         struct fstab *fs;  
         struct quotause *qup;  
         long id;  
         int quotatype;  
 {  {
         struct getquota_args gq_args;          struct getquota_args gq_args;
         struct getquota_rslt gq_rslt;          struct getquota_rslt gq_rslt;
Line 684 
Line 658 
 }  }
   
 int  int
 callaurpc(host, prognum, versnum, procnum, inproc, in, outproc, out)  callaurpc(char *host, int prognum, int versnum, int procnum,
         char *host;      xdrproc_t inproc, void *in, xdrproc_t outproc, void *out)
         int prognum, versnum, procnum;  
         xdrproc_t inproc;  
         void *in;  
         xdrproc_t outproc;  
         void *out;  
 {  {
         struct sockaddr_in server_addr;          struct sockaddr_in server_addr;
         enum clnt_stat clnt_stat;          enum clnt_stat clnt_stat;
Line 724 
Line 693 
 }  }
   
 int  int
 alldigits(s)  alldigits(char *s)
         char *s;  
 {  {
         int c;          int c;
   

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23