FreeBSD/sbin/quotacheck/quotacheck.c
/*
 * Display updated block and i-node counts.
 */
Display updated block and i-node counts.
Display updated block and i - node counts .
void
printchanges(const char *fsname, int type, struct dqblk *dp,
    struct fileusage *fup, u_long id)
{
	if (!vflag)
		return;
	if (aflag)
		(void)printf("%s: ", fsname);
	if (fup->fu_name[0] == '\0')
		(void)printf("%-8lu fixed ", id);
	else
		(void)printf("%-8s fixed ", fup->fu_name);
	switch (type) {
	case GRPQUOTA:
		(void)printf("(group):");
		break;
	case USRQUOTA:
		(void)printf("(user): ");
		break;
	default:
		(void)printf("(unknown quota type %d)", type);
		break;
	}
	if (dp->dqb_curinodes != fup->fu_curinodes)
		(void)printf("\tinodes %lu -> %lu", (u_long)dp->dqb_curinodes,
		    (u_long)fup->fu_curinodes);
	if (dp->dqb_curblocks != fup->fu_curblocks)
		(void)printf("\tblocks %lu -> %lu",
		    (u_long)dp->dqb_curblocks,
		    (u_long)fup->fu_curblocks);
	(void)printf("\n");
}
void printchanges ( const char * fsname , int type , struct dqblk * dp , struct fileusage * fup , u_long id ) { if ( ! vflag ) return ; if ( aflag ) ( void ) printf ( " " , fsname ) ; if ( fup -> fu_name [ 0 ] == ' \0 ' ) ( void ) printf ( " " , id ) ; else ( void ) printf ( " " , fup -> fu_name ) ; switch ( type ) { case GRPQUOTA : ( void ) printf ( " " ) ; break ; case USRQUOTA : ( void ) printf ( " " ) ; break ; default : ( void ) printf ( " " , type ) ; break ; } if ( dp -> dqb_curinodes != fup -> fu_curinodes ) ( void ) printf ( " \t " , ( u_long ) dp -> dqb_curinodes , ( u_long ) fup -> fu_curinodes ) ; if ( dp -> dqb_curblocks != fup -> fu_curblocks ) ( void ) printf ( " \t " , ( u_long ) dp -> dqb_curblocks , ( u_long ) fup -> fu_curblocks ) ; ( void ) printf ( " \n " ) ; }
Display updated block and i-node counts.
Display updated block and i - node counts .