From: raeburn Date: Thu, 6 Oct 1988 10:46:08 +0000 (+0000) Subject: (mar) Don't expire timers on users currently over quota. X-Git-Tag: KREL1~97 X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/cd901bbd22b148c9da41b8bf4be89d62c892b40d (mar) Don't expire timers on users currently over quota. --- diff --git a/gen/setquota.c b/gen/setquota.c index b3979477..0d5357e9 100644 --- a/gen/setquota.c +++ b/gen/setquota.c @@ -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) {