[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.37 and 1.38

version 1.37, 2015/12/09 19:39:10 version 1.38, 2016/03/16 15:41:11
Line 305 
Line 305 
                     qup->dqblk.dqb_bsoftlimit == 0 &&                      qup->dqblk.dqb_bsoftlimit == 0 &&
                     qup->dqblk.dqb_bhardlimit == 0)                      qup->dqblk.dqb_bhardlimit == 0)
                         continue;                          continue;
                 msgi = (char *)0;                  msgi = NULL;
                 if (qup->dqblk.dqb_ihardlimit &&                  if (qup->dqblk.dqb_ihardlimit &&
                     qup->dqblk.dqb_curinodes >= qup->dqblk.dqb_ihardlimit)                      qup->dqblk.dqb_curinodes >= qup->dqblk.dqb_ihardlimit)
                         msgi = "File limit reached on";                          msgi = "File limit reached on";
Line 316 
Line 316 
                         else                          else
                                 msgi = "Over file quota on";                                  msgi = "Over file quota on";
                 }                  }
                 msgb = (char *)0;                  msgb = NULL;
                 if (qup->dqblk.dqb_bhardlimit &&                  if (qup->dqblk.dqb_bhardlimit &&
                     qup->dqblk.dqb_curblocks >= qup->dqblk.dqb_bhardlimit)                      qup->dqblk.dqb_curblocks >= qup->dqblk.dqb_bhardlimit)
                         msgb = "Block limit reached on";                          msgb = "Block limit reached on";
Line 328 
Line 328 
                                 msgb = "Over block quota on";                                  msgb = "Over block quota on";
                 }                  }
                 if (qflag) {                  if (qflag) {
                         if ((msgi != (char *)0 || msgb != (char *)0) &&                          if ((msgi != NULL || msgb != NULL) &&
                             lines++ == 0)                              lines++ == 0)
                                 heading(type, id, name, "");                                  heading(type, id, name, "");
                         if (msgi != (char *)0)                          if (msgi != NULL)
                                 printf("\t%s %s\n", msgi, qup->fsname);                                  printf("\t%s %s\n", msgi, qup->fsname);
                         if (msgb != (char *)0)                          if (msgb != NULL)
                                 printf("\t%s %s\n", msgb, qup->fsname);                                  printf("\t%s %s\n", msgb, qup->fsname);
                         continue;                          continue;
                 }                  }
Line 351 
Line 351 
                             nam,                              nam,
                             (int)(dbtob((u_quad_t)qup->dqblk.dqb_curblocks)                              (int)(dbtob((u_quad_t)qup->dqblk.dqb_curblocks)
                                 / 1024),                                  / 1024),
                             (msgb == (char *)0) ? ' ' : '*',                              (msgb == NULL) ? ' ' : '*',
                             (int)(dbtob((u_quad_t)qup->dqblk.dqb_bsoftlimit)                              (int)(dbtob((u_quad_t)qup->dqblk.dqb_bsoftlimit)
                                 / 1024),                                  / 1024),
                             (int)(dbtob((u_quad_t)qup->dqblk.dqb_bhardlimit)                              (int)(dbtob((u_quad_t)qup->dqblk.dqb_bhardlimit)
                                 / 1024),                                  / 1024),
                             (msgb == (char *)0) ? ""                              (msgb == NULL) ? ""
                                 : timeprt(qup->dqblk.dqb_btime));                                  : timeprt(qup->dqblk.dqb_btime));
                         printf(" %7d%c %7d %7d %7s\n",                          printf(" %7d%c %7d %7d %7s\n",
                             qup->dqblk.dqb_curinodes,                              qup->dqblk.dqb_curinodes,
                             (msgi == (char *)0) ? ' ' : '*',                              (msgi == NULL) ? ' ' : '*',
                             qup->dqblk.dqb_isoftlimit,                              qup->dqblk.dqb_isoftlimit,
                             qup->dqblk.dqb_ihardlimit,                              qup->dqblk.dqb_ihardlimit,
                             (msgi == (char *)0) ? ""                              (msgi == NULL) ? ""
                                 : timeprt(qup->dqblk.dqb_itime)                                  : timeprt(qup->dqblk.dqb_itime)
                         );                          );
                         continue;                          continue;

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38