• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/diskdev_cmds-576/edquota.tproj/

Lines Matching defs:qup

142 	register struct quotause *qup, *protoprivs, *curprivs;
187 for (qup = protoprivs; qup; qup = qup->next) {
188 qup->dqblk.dqb_btime = 0;
189 qup->dqblk.dqb_itime = 0;
198 for (qup = protoprivs; qup; qup = qup->next) {
199 qup->dqblk.dqb_id = id;
327 register struct quotause *qup, *quptail;
352 qupsize = sizeof(*qup) + strlen(qfpathname);
353 if ((qup = (struct quotause *)malloc(qupsize)) == NULL) {
357 if (quotactl(fst[i].f_mntonname, qcmd, id, (char *)&qup->dqblk) != 0) {
368 free(qup);
380 free(qup);
384 if (qflookup(fd, id, quotatype, &qup->dqblk) != 0) {
388 free(qup);
393 strcpy(qup->qfname, qfpathname); // malloc'd size is correct for this
394 strlcpy(qup->fsname, fst[i].f_mntonname, sizeof(qup->fsname));
397 quphead = qup;
399 quptail->next = qup;
400 quptail = qup;
401 qup->next = 0;
412 register struct quotause *qup, *quptail;
426 qupsize = sizeof(*qup) + strlen(qfpathname);
427 if ((qup = (struct quotause *)malloc(qupsize)) == NULL) {
431 if (quotactl(fs->fs_file, qcmd, id, &qup->dqblk) != 0) {
442 free(qup);
453 switch (read(fd, &qup->dqblk, sizeof(struct dqblk))) {
459 bzero((caddr_t)&qup->dqblk,
470 free(qup);
475 strcpy(qup->qfname, qfpathname); // malloc'd size is correct for this
476 strlcpy(qup->fsname, fs->fs_file, sizeof(qup->fsname));
478 quphead = qup;
480 quptail->next = qup;
481 quptail = qup;
482 qup->next = 0;
624 register struct quotause *qup;
628 for (qup = quplist; qup; qup = qup->next) {
629 if (quotactl(qup->fsname, qcmd, id, (char *)&qup->dqblk) == 0)
632 if ((fd = open(qup->qfname, O_RDWR)) < 0) {
633 perror(qup->qfname);
635 if (qfupdate(fd, id, quotatype, &qup->dqblk) != 0) {
637 perror(qup->qfname);
640 if ((fd = open(qup->qfname, O_WRONLY)) < 0) {
641 perror(qup->qfname);
645 if (write(fd, &qup->dqblk, sizeof (struct dqblk)) !=
648 perror(qup->qfname);
789 register struct quotause *qup;
800 for (qup = quplist; qup; qup = qup->next) {
803 qup->fsname, "1K blocks in use:",
804 qup->dqblk.dqb_curbytes / 1024,
805 qup->dqblk.dqb_bsoftlimit / 1024,
806 qup->dqblk.dqb_bhardlimit / 1024);
809 qup->fsname, "blocks in use:",
810 dbtob(qup->dqblk.dqb_curblocks) / 1024,
811 dbtob(qup->dqblk.dqb_bsoftlimit) / 1024,
812 dbtob(qup->dqblk.dqb_bhardlimit) / 1024);
816 "\tinodes in use:", qup->dqblk.dqb_curinodes,
817 qup->dqblk.dqb_isoftlimit, qup->dqblk.dqb_ihardlimit);
831 register struct quotause *qup;
900 for (qup = quplist; qup; qup = qup->next) {
901 if (strcmp(fsp, qup->fsname))
911 qup->dqblk.dqb_curbytes >= dqblk.dqb_bsoftlimit &&
912 (qup->dqblk.dqb_bsoftlimit == 0 ||
913 qup->dqblk.dqb_curbytes <
914 qup->dqblk.dqb_bsoftlimit))
915 qup->dqblk.dqb_btime = 0;
918 qup->dqblk.dqb_curblocks >= dqblk.dqb_bsoftlimit &&
919 (qup->dqblk.dqb_bsoftlimit == 0 ||
920 qup->dqblk.dqb_curblocks <
921 qup->dqblk.dqb_bsoftlimit))
922 qup->dqblk.dqb_btime = 0;
925 qup->dqblk.dqb_curinodes >= dqblk.dqb_isoftlimit &&
926 (qup->dqblk.dqb_isoftlimit == 0 ||
927 qup->dqblk.dqb_curinodes <
928 qup->dqblk.dqb_isoftlimit))
929 qup->dqblk.dqb_itime = 0;
930 qup->dqblk.dqb_bsoftlimit = dqblk.dqb_bsoftlimit;
931 qup->dqblk.dqb_bhardlimit = dqblk.dqb_bhardlimit;
932 qup->dqblk.dqb_isoftlimit = dqblk.dqb_isoftlimit;
933 qup->dqblk.dqb_ihardlimit = dqblk.dqb_ihardlimit;
934 qup->flags |= FOUND;
936 if (dqblk.dqb_curbytes == qup->dqblk.dqb_curbytes &&
937 dqblk.dqb_curinodes == qup->dqblk.dqb_curinodes)
940 if (dqblk.dqb_curblocks == qup->dqblk.dqb_curblocks &&
941 dqblk.dqb_curinodes == qup->dqblk.dqb_curinodes)
953 for (qup = quplist; qup; qup = qup->next) {
954 if (qup->flags & FOUND) {
955 qup->flags &= ~FOUND;
958 qup->dqblk.dqb_bsoftlimit = 0;
959 qup->dqblk.dqb_bhardlimit = 0;
960 qup->dqblk.dqb_isoftlimit = 0;
961 qup->dqblk.dqb_ihardlimit = 0;
975 register struct quotause *qup;
989 for (qup = quplist; qup; qup = qup->next) {
991 qup->fsname, cvtstoa(qup->dqblk.dqb_btime));
993 cvtstoa(qup->dqblk.dqb_itime));
1007 register struct quotause *qup;
1046 for (qup = quplist; qup; qup = qup->next) {
1047 if (strcmp(fsp, qup->fsname))
1049 qup->dqblk.dqb_btime = (uint32_t) bseconds;
1050 qup->dqblk.dqb_itime = (uint32_t) iseconds;
1051 qup->flags |= FOUND;
1060 for (qup = quplist; qup; qup = qup->next) {
1061 if (qup->flags & FOUND) {
1062 qup->flags &= ~FOUND;
1065 qup->dqblk.dqb_btime = 0;
1066 qup->dqblk.dqb_itime = 0;
1127 register struct quotause *qup, *nextqup;
1129 for (qup = quplist; qup; qup = nextqup) {
1130 nextqup = qup->next;
1131 free(qup);