quota.c (176378) | quota.c (181262) |
---|---|
1/* 2 * Copyright (c) 1980, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Robert Elz at The University of Melbourne. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 34 unchanged lines hidden (view full) --- 43#ifndef lint 44static const char sccsid[] = "from: @(#)quota.c 8.1 (Berkeley) 6/6/93"; 45#endif /* not lint */ 46 47/* 48 * Disk quota reporting program. 49 */ 50#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1980, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Robert Elz at The University of Melbourne. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 34 unchanged lines hidden (view full) --- 43#ifndef lint 44static const char sccsid[] = "from: @(#)quota.c 8.1 (Berkeley) 6/6/93"; 45#endif /* not lint */ 46 47/* 48 * Disk quota reporting program. 49 */ 50#include <sys/cdefs.h> |
51__FBSDID("$FreeBSD: head/usr.bin/quota/quota.c 176378 2008-02-18 01:36:40Z mpp $"); | 51__FBSDID("$FreeBSD: head/usr.bin/quota/quota.c 181262 2008-08-03 20:36:40Z cognet $"); |
52 53#include <sys/param.h> 54#include <sys/types.h> 55#include <sys/file.h> 56#include <sys/stat.h> 57#include <sys/mount.h> 58#include <sys/socket.h> 59 --- 331 unchanged lines hidden (view full) --- 391} 392 393static void 394showrawquotas(type, id, qup) 395 int type; 396 u_long id; 397 struct quotause *qup; 398{ | 52 53#include <sys/param.h> 54#include <sys/types.h> 55#include <sys/file.h> 56#include <sys/stat.h> 57#include <sys/mount.h> 58#include <sys/socket.h> 59 --- 331 unchanged lines hidden (view full) --- 391} 392 393static void 394showrawquotas(type, id, qup) 395 int type; 396 u_long id; 397 struct quotause *qup; 398{ |
399 time_t tt; |
|
399 printf("Raw %s quota information for id %lu on %s\n", 400 type == USRQUOTA ? "user" : "group", id, qup->fsname); 401 printf("block hard limit: %ju\n", (uintmax_t)qup->dqblk.dqb_bhardlimit); 402 printf("block soft limit: %ju\n", (uintmax_t)qup->dqblk.dqb_bsoftlimit); 403 printf("current block count: %ju\n", (uintmax_t)qup->dqblk.dqb_curblocks); 404 printf("i-node hard limit: %ju\n", (uintmax_t)qup->dqblk.dqb_ihardlimit); 405 printf("i-node soft limit: %ju\n", (uintmax_t)qup->dqblk.dqb_isoftlimit); 406 printf("current i-node count: %ju\n", (uintmax_t)qup->dqblk.dqb_curinodes); 407 printf("block grace time: %jd", (intmax_t)qup->dqblk.dqb_btime); | 400 printf("Raw %s quota information for id %lu on %s\n", 401 type == USRQUOTA ? "user" : "group", id, qup->fsname); 402 printf("block hard limit: %ju\n", (uintmax_t)qup->dqblk.dqb_bhardlimit); 403 printf("block soft limit: %ju\n", (uintmax_t)qup->dqblk.dqb_bsoftlimit); 404 printf("current block count: %ju\n", (uintmax_t)qup->dqblk.dqb_curblocks); 405 printf("i-node hard limit: %ju\n", (uintmax_t)qup->dqblk.dqb_ihardlimit); 406 printf("i-node soft limit: %ju\n", (uintmax_t)qup->dqblk.dqb_isoftlimit); 407 printf("current i-node count: %ju\n", (uintmax_t)qup->dqblk.dqb_curinodes); 408 printf("block grace time: %jd", (intmax_t)qup->dqblk.dqb_btime); |
408 if (qup->dqblk.dqb_btime != 0) 409 printf(" %s", ctime(&qup->dqblk.dqb_btime)); 410 else | 409 if (qup->dqblk.dqb_btime != 0) { 410 tt = qup->dqblk.dqb_btime; 411 printf(" %s", ctime(&tt)); 412 } else |
411 printf("\n"); 412 printf("i-node grace time: %jd", (intmax_t)qup->dqblk.dqb_itime); | 413 printf("\n"); 414 printf("i-node grace time: %jd", (intmax_t)qup->dqblk.dqb_itime); |
413 if (qup->dqblk.dqb_itime != 0) 414 printf(" %s", ctime(&qup->dqblk.dqb_itime)); 415 else | 415 if (qup->dqblk.dqb_itime != 0) { 416 tt = qup->dqblk.dqb_itime; 417 printf(" %s", ctime(&tt)); 418 } else |
416 printf("\n"); 417} 418 419 420static void 421heading(int type, u_long id, const char *name, const char *tag) 422{ 423 --- 341 unchanged lines hidden --- | 419 printf("\n"); 420} 421 422 423static void 424heading(int type, u_long id, const char *name, const char *tag) 425{ 426 --- 341 unchanged lines hidden --- |