require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_UFS_UFS_QUOTA1_H_)) {
    eval 'sub _UFS_UFS_QUOTA1_H_ () {1;}' unless defined(&_UFS_UFS_QUOTA1_H_);
    require 'sys/quota.ph';
    require 'ufs/ufs/quota.ph';
    eval 'sub MAX_IQ_TIME () {(7*24*60*60);}' unless defined(&MAX_IQ_TIME);
    eval 'sub MAX_DQ_TIME () {(7*24*60*60);}' unless defined(&MAX_DQ_TIME);
    eval 'sub QUOTAFILENAME () {"quota";}' unless defined(&QUOTAFILENAME);
    eval 'sub QUOTAGROUP () {"operator";}' unless defined(&QUOTAGROUP);
    eval 'sub SUBCMDMASK () {0xff;}' unless defined(&SUBCMDMASK);
    eval 'sub SUBCMDSHIFT () {8;}' unless defined(&SUBCMDSHIFT);
    eval 'sub QCMD {
        my($cmd, $type) = @_;
	    eval q(((($cmd) <<  &SUBCMDSHIFT) | (($type) &  &SUBCMDMASK)));
    }' unless defined(&QCMD);
    eval 'sub Q_QUOTAON () {0x100;}' unless defined(&Q_QUOTAON);
    eval 'sub Q_QUOTAOFF () {0x200;}' unless defined(&Q_QUOTAOFF);
    eval 'sub Q_GETQUOTA () {0x300;}' unless defined(&Q_GETQUOTA);
    eval 'sub Q_SETQUOTA () {0x400;}' unless defined(&Q_SETQUOTA);
    eval 'sub Q_SETUSE () {0x500;}' unless defined(&Q_SETUSE);
    eval 'sub Q_SYNC () {0x600;}' unless defined(&Q_SYNC);
}
1;
