TEAM ENVI^ ENVIMODE=1| ENVI^ FORCELOCAL=1
//指加载500M以上的分区
//LOGS * CONOUT$

MOUNTSZ 500M

_SUB MOUNTSZ 
    ENVI^ FORCELOCAL=1
    SET &MINSZ=%~1
    CALC #MINSZ=%&MINSZ%
    IFEX $%MINSZ%<100K, SET MINSZ=100K

    PART lIST disk,&&disks
    FORX *  %disks%,&&dsk,
    {
        PART LIST PART %dsk%, &&parts
        FORX *  %parts%,&&prt,
        {
           CALC -err=-1 #prt=%prt% 
           IFEX $%prt%<=0, EXIT  -   //不能加载
           PART -hextp -phy# LIST PART %dsk%:%prt%, &&pmsg
           // 1    0x0C   0       10383360     5242880000       20280     5253263360    1  K:
           MSTR &&tp,&&sz,&&pid,&&drv=<2><5><8><9>%pmsg%
           FIND $%drv%<>, EXIT -  //已加载
           IFEX $%sz%<%&MINSZ%, EXIT -  //<500M不加载
           TEAM FDRV *idlec &&all=*:|  MSTR &&drv2=<1>%&all%
           SHOW   * %dsk%#%pid%,%drv2%
        }
    }
_END

