Changeset 206 for trunk


Ignore:
Timestamp:
Jan 23, 2021, 6:50:32 PM (5 years ago)
Author:
David Azarewicz
Message:

Reworked internal implementation of /U

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/os2ahci/ReadMe.txt

    r205 r206  
    388388Change Log
    389389==========
    390 v.2.08 01-Nov-2020 - David Azarewicz
     390v.2.08 01-Jan-2021 - David Azarewicz
    391391  Corrected RM ADD handle and unit.
     392  Changed the internal implementation of /U to accomodate gpt filter.
    392393
    393394v.2.07 19-May-2019 - David Azarewicz
  • trunk/src/os2ahci/apm.c

    r205 r206  
    124124      for (d = 0; d <= ai->ports[p].dev_max; d++)
    125125      {
    126         if (ai->ports[p].devs[d].present && !ai->ports[p].devs[d].ignored)
     126        if (ai->ports[p].devs[d].present)
    127127        {
    128128          ahci_flush_cache(ai, p, d);
     
    244244      writel(port_mmio + PORT_SCR_ACT, 0);
    245245      readl(port_mmio + PORT_SCR_ACT);  /* flush */
    246 
    247       #if 0
    248       /* cannot flush caches this way */
    249       ahci_start_port(ai, p, 0);
    250 
    251       /* flush cache on all attached devices */
    252       for (d = 0; d <= ai->ports[p].dev_max; d++)
    253       {
    254         if (ai->ports[p].devs[d].present && !ai->ports[p].devs[d].ignored)
    255         {
    256           ahci_flush_cache(ai, p, d);
    257         }
    258       }
    259       #endif
    260246    }
    261247  }
  • trunk/src/os2ahci/ioctl.c

    r205 r206  
    8888      for (d = 0; d <= pi->dev_max; d++)
    8989      {
    90         if (pi->devs[d].present && !pi->devs[d].ignored)
     90        if (pi->devs[d].present)
    9191        {
    9292          /* add this device to the device list */
     
    140140  if (a >= ad_info_cnt || p > ad_infos[a].port_max
    141141     || d > ad_infos[a].ports[p].dev_max
    142      || !ad_infos[a].ports[p].devs[d].present
    143      || ad_infos[a].ports[p].devs[d].ignored)
     142     || !ad_infos[a].ports[p].devs[d].present)
    144143  {
    145144    return(RPDONE | RPERR_UNIT);
     
    537536      for (_d = 0; _d <= pi->dev_max; _d++)
    538537      {
    539         if (pi->devs[_d].present && !pi->devs[_d].ignored)
     538        if (pi->devs[_d].present)
    540539        {
    541540          if (unit-- == 0)
  • trunk/src/os2ahci/os2ahci.c

    r205 r206  
    11181118        for (d = 0; d <= ad_info->ports[p].dev_max; d++)
    11191119        {
    1120           if (ad_info->ports[p].devs[d].present && !ad_info->ports[p].devs[d].ignored)
     1120          if (ad_info->ports[p].devs[d].present)
    11211121          {
    11221122            if (ad_info->ports[p].devs[d].atapi && emulate_scsi[dta][p])
     
    11571157          for (d = 0; d <= ad_info->ports[p].dev_max; d++)
    11581158          {
    1159             if (ad_info->ports[p].devs[d].present && !ad_info->ports[p].devs[d].ignored
    1160                 && ad_info->ports[p].devs[d].atapi && emulate_scsi[a][p])
     1159            if (ad_info->ports[p].devs[d].present && ad_info->ports[p].devs[d].atapi && emulate_scsi[a][p])
    11611160            {
    11621161              if (add_unit_info(pIorb_conf, dta, a, p, d, scsi_id++))
     
    16481647    pUi->UnitType     = ai->ports[p].devs[d].dev_type;
    16491648    pUi->QueuingCount = ai->ports[p].devs[d].ncq_max;
    1650     if (ai->ports[p].devs[d].removable)
    1651     {
    1652       pUi->UnitFlags |= UF_REMOVABLE;
    1653     }
    1654     if (scsi_id > 0) {
    1655       /* set fake SCSI ID for this unit */
    1656       pUi->UnitSCSITargetID = scsi_id;
    1657     }
     1649    if (ai->ports[p].devs[d].removable) pUi->UnitFlags |= UF_REMOVABLE;
     1650    if (ai->ports[p].devs[d].ignored) pUi->UnitFlags |= UF_NODASD_SUPT;
     1651    if (scsi_id > 0) pUi->UnitSCSITargetID = scsi_id; /* set fake SCSI ID for this unit */
    16581652  }
    16591653  else
  • trunk/tools/AddToFile.cmd

    r205 r206  
    33 * Written by and Copyright (c) 2010-2018 David Azarewicz http://88watts.net
    44 *
    5  * @#D Azarewicz:1.03#@##1## 02 Mar 2020              DAZAR1    ::::::@@AddToFile.cmd (c) David Azarewicz 2020
     5 * @#D Azarewicz:1.04#@##1## 02 Jan 2021              DAZAR1    ::::::@@AddToFile.cmd (c) David Azarewicz 2021
    66 * V1.01 16-Sep-2016 First official release
    77 * V1.02 02-Jun-2017 Added Asd to bldlevel, added DATE1
    88 * V1.03 02-Mar-2020 Added STRING function
     9 * V1.04 02-Jan-2021 Added FILESIZE function
    910 *
    1011 * The following line is for the help sample code for the VAR function:
     
    3031  Say '  STRING - Adds the string with %Y substitution.';
    3132  Say '  VAR - Adds the value of the specified variable from a specified file.';
     33  Say '  FILESIZE - Adds the file size.';
    3234  Say '  FILE - Adds the contents of a file.';
    3335  Say 'Examples:';
     
    6870  call 'AddToFile.cmd' MyCmd;
    6971  MyCmd=MyFile||',#define XYZ "%A",VAR,EXAMPLEVAR=,AddToFile.cmd';
     72  rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd);
     73  call 'AddToFile.cmd' MyCmd;
     74  MyCmd=MyFile||',#define FSIZE,FILESIZE,addtofile.cmd';
    7075  rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd);
    7176  call 'AddToFile.cmd' MyCmd;
     
    213218    end;
    214219    rc=stream(String,'c','close');
     220    rc=lineout(OutFile);
     221  end
     222
     223  when (Function="FILESIZE") then do
     224    NewStr=stream(Parm1,'c','query size');
     225    RepLoc=Pos('%A', String);
     226    if (RepLoc>0) then OutStr=Substr(String,1,RepLoc-1)||NewStr||Substr(String,RepLoc+2);
     227    else OutStr=String||' '||NewStr;
     228    rc=lineout(OutFile, OutStr);
    215229    rc=lineout(OutFile);
    216230  end
Note: See TracChangeset for help on using the changeset viewer.