]> andersk Git - moira.git/commitdiff
(mar) Don't expire timers on users currently over quota.
authorraeburn <raeburn>
Thu, 6 Oct 1988 10:46:08 +0000 (10:46 +0000)
committerraeburn <raeburn>
Thu, 6 Oct 1988 10:46:08 +0000 (10:46 +0000)
gen/setquota.c

index b39794776ffa9a8d14f721da713b907704480072..0d5357e97ba2f1657b80483faac2f6a2a83b74f7 100644 (file)
@@ -11,9 +11,8 @@
  * quota system.
  *     
  *     $Log$
- *     Revision 1.2  1988-10-06 10:41:55  raeburn
- *     (wesommer?) implemented -u flag to update quota values with increment
- *     from current.
+ *     Revision 1.3  1988-10-06 10:46:08  raeburn
+ *     (mar) Don't expire timers on users currently over quota.
  *
  * Revision 1.1  87/09/04  21:32:47  wesommer
  * Initial revision
@@ -70,23 +69,26 @@ quota is in 1KB units\n");
        device = argv[1];
        uid = atoi(argv[2]);
        
+       if (quotactl(Q_GETQUOTA, device, uid, &odb) != 0) {
+           perror("Can't get current quota info");
+           exit(1);
+       }
+
        db.dqb_bsoftlimit = atoi(argv[3]);
        db.dqb_bhardlimit = db.dqb_bsoftlimit * 1.2;
        db.dqb_fsoftlimit = atoi(argv[3]) * .5;
        db.dqb_fhardlimit = db.dqb_fsoftlimit * 1.2;
-       db.dqb_btimelimit = DQ_FTIMELIMIT;
-       db.dqb_btimelimit = DQ_BTIMELIMIT;
+       db.dqb_btimelimit = odb.dqb_btimelimit;
+       db.dqb_ftimelimit = odb.dqb_ftimelimit;
 
        db.dqb_bsoftlimit *= btodb(1024);
        db.dqb_bhardlimit *= btodb(1024);
 
        if (uflag) {
-               if (quotactl(Q_GETQUOTA, device, uid, &odb) == 0) {
                        db.dqb_bhardlimit += odb.dqb_curblocks;
                        db.dqb_bsoftlimit += odb.dqb_curblocks;
                        db.dqb_fhardlimit += odb.dqb_curfiles;
                        db.dqb_fsoftlimit += odb.dqb_curfiles;
-               }
        }
        
        if (quotactl(Q_SETQLIM, device, uid, &db) < 0) {
This page took 0.165699 seconds and 5 git commands to generate.