require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_DEV_BIOVAR_H_)) {
    eval 'sub _DEV_BIOVAR_H_ () {1;}' unless defined(&_DEV_BIOVAR_H_);
    require 'sys/types.ph';
    require 'sys/device.ph';
    require 'sys/ioccom.ph';
    unless(defined(&_KERNEL)) {
	require 'stdbool.ph';
    }
    eval 'sub BIOCLOCATE () { &_IOWR(ord(\'B\'), 0, \'struct bio_locate\');}' unless defined(&BIOCLOCATE);
    if(defined(&_KERNEL)) {
    }
    eval 'sub BIOCINQ () { &_IOWR(ord(\'B\'), 32, \'struct bioc_inq\');}' unless defined(&BIOCINQ);
    eval 'sub BIOCDISK_NOVOL () { &_IOWR(ord(\'b\'), 38, \'struct bioc_disk\');}' unless defined(&BIOCDISK_NOVOL);
    eval 'sub BIOCDISK () { &_IOWR(ord(\'B\'), 33, \'struct bioc_disk\');}' unless defined(&BIOCDISK);
    eval 'sub BIOC_SDONLINE () {0x;}' unless defined(&BIOC_SDONLINE);
    eval 'sub BIOC_SDONLINE_S () {"Online";}' unless defined(&BIOC_SDONLINE_S);
    eval 'sub BIOC_SDOFFLINE () {0x1;}' unless defined(&BIOC_SDOFFLINE);
    eval 'sub BIOC_SDOFFLINE_S () {"Offline";}' unless defined(&BIOC_SDOFFLINE_S);
    eval 'sub BIOC_SDFAILED () {0x2;}' unless defined(&BIOC_SDFAILED);
    eval 'sub BIOC_SDFAILED_S () {"Failed";}' unless defined(&BIOC_SDFAILED_S);
    eval 'sub BIOC_SDREBUILD () {0x3;}' unless defined(&BIOC_SDREBUILD);
    eval 'sub BIOC_SDREBUILD_S () {"Rebuild";}' unless defined(&BIOC_SDREBUILD_S);
    eval 'sub BIOC_SDHOTSPARE () {0x4;}' unless defined(&BIOC_SDHOTSPARE);
    eval 'sub BIOC_SDHOTSPARE_S () {"Hot spare";}' unless defined(&BIOC_SDHOTSPARE_S);
    eval 'sub BIOC_SDUNUSED () {0x5;}' unless defined(&BIOC_SDUNUSED);
    eval 'sub BIOC_SDUNUSED_S () {"Unused";}' unless defined(&BIOC_SDUNUSED_S);
    eval 'sub BIOC_SDSCRUB () {0x6;}' unless defined(&BIOC_SDSCRUB);
    eval 'sub BIOC_SDSCRUB_S () {"Scrubbing";}' unless defined(&BIOC_SDSCRUB_S);
    eval 'sub BIOC_SDPASSTHRU () {0x7;}' unless defined(&BIOC_SDPASSTHRU);
    eval 'sub BIOC_SDPASSTHRU_S () {"Pass through";}' unless defined(&BIOC_SDPASSTHRU_S);
    eval 'sub BIOC_SDINVALID () {0xff;}' unless defined(&BIOC_SDINVALID);
    eval 'sub BIOC_SDINVALID_S () {"Invalid";}' unless defined(&BIOC_SDINVALID_S);
    if(defined(&_KERNEL)) {
	eval 'sub OBIOCDISK () { &_IOWR(ord(\'B\'), 33, \'struct obioc_disk\');}' unless defined(&OBIOCDISK);
    }
    eval 'sub BIOCVOL () { &_IOWR(ord(\'B\'), 34, \'struct bioc_vol\');}' unless defined(&BIOCVOL);
    eval 'sub BIOC_SVONLINE () {0x;}' unless defined(&BIOC_SVONLINE);
    eval 'sub BIOC_SVONLINE_S () {"Online";}' unless defined(&BIOC_SVONLINE_S);
    eval 'sub BIOC_SVOFFLINE () {0x1;}' unless defined(&BIOC_SVOFFLINE);
    eval 'sub BIOC_SVOFFLINE_S () {"Offline";}' unless defined(&BIOC_SVOFFLINE_S);
    eval 'sub BIOC_SVDEGRADED () {0x2;}' unless defined(&BIOC_SVDEGRADED);
    eval 'sub BIOC_SVDEGRADED_S () {"Degraded";}' unless defined(&BIOC_SVDEGRADED_S);
    eval 'sub BIOC_SVBUILDING () {0x3;}' unless defined(&BIOC_SVBUILDING);
    eval 'sub BIOC_SVBUILDING_S () {"Building";}' unless defined(&BIOC_SVBUILDING_S);
    eval 'sub BIOC_SVSCRUB () {0x4;}' unless defined(&BIOC_SVSCRUB);
    eval 'sub BIOC_SVSCRUB_S () {"Scrubbing";}' unless defined(&BIOC_SVSCRUB_S);
    eval 'sub BIOC_SVREBUILD () {0x5;}' unless defined(&BIOC_SVREBUILD);
    eval 'sub BIOC_SVREBUILD_S () {"Rebuild";}' unless defined(&BIOC_SVREBUILD_S);
    eval 'sub BIOC_SVMIGRATING () {0x6;}' unless defined(&BIOC_SVMIGRATING);
    eval 'sub BIOC_SVMIGRATING_S () {"Migrating";}' unless defined(&BIOC_SVMIGRATING_S);
    eval 'sub BIOC_SVCHECKING () {0x7;}' unless defined(&BIOC_SVCHECKING);
    eval 'sub BIOC_SVCHECKING_S () {"Checking";}' unless defined(&BIOC_SVCHECKING_S);
    eval 'sub BIOC_SVINVALID () {0xff;}' unless defined(&BIOC_SVINVALID);
    eval 'sub BIOC_SVINVALID_S () {"Invalid";}' unless defined(&BIOC_SVINVALID_S);
    eval 'sub BIOC_SVOL_RAID01 () {0xe;}' unless defined(&BIOC_SVOL_RAID01);
    eval 'sub BIOC_SVOL_RAID10 () {0x1e;}' unless defined(&BIOC_SVOL_RAID10);
    eval 'sub BIOC_SVOL_UNUSED () {0xaa;}' unless defined(&BIOC_SVOL_UNUSED);
    eval 'sub BIOC_SVOL_HOTSPARE () {0xbb;}' unless defined(&BIOC_SVOL_HOTSPARE);
    eval 'sub BIOC_SVOL_PASSTHRU () {0xcc;}' unless defined(&BIOC_SVOL_PASSTHRU);
    if(defined(&_KERNEL)) {
	eval 'sub OBIOCVOL () { &_IOWR(ord(\'B\'), 34, \'struct obioc_vol\');}' unless defined(&OBIOCVOL);
    }
    eval 'sub BIOCALARM () { &_IOWR(ord(\'B\'), 35, \'struct bioc_alarm\');}' unless defined(&BIOCALARM);
    eval 'sub BIOC_SADISABLE () {0x;}' unless defined(&BIOC_SADISABLE);
    eval 'sub BIOC_SAENABLE () {0x1;}' unless defined(&BIOC_SAENABLE);
    eval 'sub BIOC_SASILENCE () {0x2;}' unless defined(&BIOC_SASILENCE);
    eval 'sub BIOC_GASTATUS () {0x3;}' unless defined(&BIOC_GASTATUS);
    eval 'sub BIOC_SATEST () {0x4;}' unless defined(&BIOC_SATEST);
    eval 'sub BIOCBLINK () { &_IOWR(ord(\'B\'), 36, \'struct bioc_blink\');}' unless defined(&BIOCBLINK);
    eval 'sub BIOC_SBUNBLINK () {0x;}' unless defined(&BIOC_SBUNBLINK);
    eval 'sub BIOC_SBBLINK () {0x1;}' unless defined(&BIOC_SBBLINK);
    eval 'sub BIOC_SBALARM () {0x2;}' unless defined(&BIOC_SBALARM);
    eval 'sub BIOCSETSTATE () { &_IOWR(ord(\'B\'), 37, \'struct bioc_setstate\');}' unless defined(&BIOCSETSTATE);
    eval 'sub BIOC_SSONLINE () {0x;}' unless defined(&BIOC_SSONLINE);
    eval 'sub BIOC_SSOFFLINE () {0x1;}' unless defined(&BIOC_SSOFFLINE);
    eval 'sub BIOC_SSHOTSPARE () {0x2;}' unless defined(&BIOC_SSHOTSPARE);
    eval 'sub BIOC_SSREBUILD () {0x3;}' unless defined(&BIOC_SSREBUILD);
    eval 'sub BIOC_SSDELHOTSPARE () {0x4;}' unless defined(&BIOC_SSDELHOTSPARE);
    eval 'sub BIOC_SSPASSTHRU () {0x5;}' unless defined(&BIOC_SSPASSTHRU);
    eval 'sub BIOC_SSDELPASSTHRU () {0x6;}' unless defined(&BIOC_SSDELPASSTHRU);
    eval 'sub BIOC_SSCHECKSTART_VOL () {0x7;}' unless defined(&BIOC_SSCHECKSTART_VOL);
    eval 'sub BIOC_SSCHECKSTOP_VOL () {0x8;}' unless defined(&BIOC_SSCHECKSTOP_VOL);
    eval 'sub BIOCVOLOPS () { &_IOWR(ord(\'B\'), 39, \'struct bioc_volops\');}' unless defined(&BIOCVOLOPS);
    eval 'sub BIOC_VCREATE_VOLUME () {0x;}' unless defined(&BIOC_VCREATE_VOLUME);
    eval 'sub BIOC_VREMOVE_VOLUME () {0x1;}' unless defined(&BIOC_VREMOVE_VOLUME);
}
1;
