- Timestamp:
- Dec 8, 2016, 8:59:33 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/include/ahci-idc.h
r133 r179 4 4 * Copyright (c) 2011 thi.guten Software Development 5 5 * Copyright (c) 2011 Mensys B.V. 6 * Copyright (c) 2013-2016 David Azarewicz 6 7 * 7 8 * Authors: Christian Mueller, Markus Thielen … … 45 46 46 47 /* AHCI_IDC_ENTRY defines a function pointer to the OS2AHCI IDC entry point */ 47 typedef void (_cdecl _far *PFN_AHCI_IDC_ENTRY) (unsigned short real_ds, 48 RP_GENIOCTL _far *ioctl); 48 typedef void (_cdecl *PFN_AHCI_IDC_ENTRY) (unsigned short real_ds, REQPACKET *ioctl); 49 49 50 50 #pragma pack(1) … … 54 54 * to attach to os2ahci.add using DevHelp_AttachDD 55 55 */ 56 typedef struct { 56 typedef struct 57 { 57 58 PFN_AHCI_IDC_ENTRY real_entry_point; /* real mode entry point address */ 58 59 unsigned short real_ds; /* real mode DS */ … … 60 61 PFN_AHCI_IDC_ENTRY prot_entry_point; /* protected mode entry point address */ 61 62 unsigned short prot_ds; /* protected mode DS */ 62 63 } AHCI_ATTACH_AREA; 63 64 64 65 #pragma pack() -
trunk/src/os2ahci/ioctl.c
r178 r179 65 65 USHORT *d); 66 66 67 IORBH *IoctlWakeup(ULONG ulArg);68 67 extern IORBH FAR16DATA * __far16 IoctlWakeup16(IORBH FAR16DATA*); 69 68 -
trunk/tools/AddToFile.cmd
r176 r179 1 /* Add specified line to file */ 2 /* Adds the specified line to the end of the specified file. 3 * Usage: 4 * AddToFile.cmd FileName,PrefixString,Function[,Parameters...] 1 /** AddToFile.cmd 2 * Adds the specified line to the end of the specified file. 3 * Written by and Copyright (c) 2010-2016 David Azarewicz http://88watts.net 5 4 * 6 * Examples: 7 * AddToFile.cmd FileName,#define DDATE,DATEL 8 * Adds today's date to Filename: #define DDATE 20130312L 5 * @#D Azarewicz:1.01#@##1## 16 Sep 2016 DAZAR1 ::::::@@AddToFile.cmd (c) David Azarewicz 2016 6 * V1.01 16-Sep-2016 First official release 9 7 * 10 * AddToFile.cmd FileName,#define BLDLEVEL,BLDLEVEL2,D Azarewicz,1.2.3,Description,Fixpack 11 * Adds a formatted BLDLEVEL string to Filename using double quotes: #define BLDLEVEL "<bldlevel string>" 12 * 13 * AddToFile.cmd FileName,option description,BLDLEVEL,D Azarewicz,1.2.3,Description,Fixpack 14 * Adds a formatted BLDLEVEL string to Filename using single quotes: option description '<bldlevel string>' 15 */ 16 17 parse arg OutFile','String','What','ProjVendor','BuildVersion','ProductName','FixPack; 8 * The following line is for the help sample code for the VAR function: 9 EXAMPLEVAR=Example String 10 */ 11 call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs' 12 call SysLoadFuncs 13 parse arg OutFile','String','Function','Parm1','Parm2','Parm3','Parm4; 14 15 if (OutFile='') then do 16 Say 'Usage:'; 17 Say ' AddToFile.cmd FileName,String,Function[,Parameters...]'; 18 Say 'Functions:'; 19 Say ' DATEL - Adds the date as a long number.'; 20 Say ' BLDLEVEL - Adds a formatted BLDLEVEL string.'; 21 Say ' DATEYEAR - Adds the current year.'; 22 Say ' DATEMONTH - Adds the current month.'; 23 Say ' DATEDAY - Adds the current day.'; 24 Say ' VERSIONMAJOR - Adds the major portion of the provided version number.'; 25 Say ' VERSIONMINOR - Adds the minor portion of the provided version number.'; 26 Say ' VERSIONREVISION - Adds the revision portion of the provided version number.'; 27 Say ' VAR - Adds the value of the specified variable from a specified file.'; 28 Say ' FILE - Adds the contents of a file.'; 29 Say 'Examples:'; 30 MyFile='AddToFile.tmp'; 31 rc=SysFileDelete(MyFile); 32 MyCmd=MyFile||',#define DDATE,DATEL'; 33 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 34 call 'AddToFile.cmd' MyCmd; 35 MyCmd=MyFile||',option description,BLDLEVEL,Vendor,1.2.3,Description,Fixpack'; 36 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 37 call 'AddToFile.cmd' MyCmd; 38 MyCmd=MyFile||',char *bl = "%A";,BLDLEVEL,Vendor,1.2.3,Description,Fixpack'; 39 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 40 call 'AddToFile.cmd' MyCmd; 41 MyCmd=MyFile||',#define DYEAR,DATEYEAR'; 42 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 43 call 'AddToFile.cmd' MyCmd; 44 MyCmd=MyFile||',#define DMONTH,DATEMONTH'; 45 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 46 call 'AddToFile.cmd' MyCmd; 47 MyCmd=MyFile||',#define DDAY,DATEDAY'; 48 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 49 call 'AddToFile.cmd' MyCmd; 50 MyCmd=MyFile||',#define DVMAJ,VERSIONMAJOR,1.2.3'; 51 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 52 call 'AddToFile.cmd' MyCmd; 53 MyCmd=MyFile||',#define DVMIN,VERSIONMINOR,1.2.3'; 54 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 55 call 'AddToFile.cmd' MyCmd; 56 MyCmd=MyFile||',#define DVREV,VERSIONREVISION,1.2.3'; 57 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 58 call 'AddToFile.cmd' MyCmd; 59 MyCmd=MyFile||',#define XYZ "%A",VAR,EXAMPLEVAR=,AddToFile.cmd'; 60 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 61 call 'AddToFile.cmd' MyCmd; 62 MyCmd=MyFile||',InFileName,FILE'; 63 rc=LineOut(MyFile, '--- AddToFile.cmd '||MyCmd); 64 call 'AddToFile.cmd' MyCmd; 65 do while LINES(MyFile) <> 0; 66 Say LINEIN(MyFile); 67 end; 68 rc=stream(MyFile,'c','close'); 69 rc=SysFileDelete(MyFile); 70 exit; 71 end 18 72 19 73 select 20 when (What='DATEL') then do 21 rc=lineout(OutFile, String||' '||DATE('S')||'L'); 22 rc=lineout(OutFile); 23 end 24 25 when (LEFT(What,8)='BLDLEVEL') then do 26 Type=SUBSTR(What,9,1); 74 when (Function='DATEL') then do 75 NewStr=DATE('S')||'L' 76 RepLoc=Pos('%A', String); 77 if (RepLoc>0) then OutStr=Substr(String,1,RepLoc-1)||NewStr||Substr(String,RepLoc+2); 78 else OutStr=String||' '||NewStr; 79 rc=lineout(OutFile, OutStr); 80 rc=lineout(OutFile); 81 end 82 83 when (LEFT(Function,8)='BLDLEVEL') then do 84 Type=SUBSTR(Function,9,1); 27 85 28 86 /* get hostname for build system */ … … 33 91 34 92 /* get fixpack from SVN version */ 35 if (FixPack='SVN') then FixPack='SVN'||SvnVersion(); 36 37 parse var BuildVersion major'.'minor'.'ProjVersion; 38 93 if (Parm4='SVN') then Parm4='SVN'||SvnVersion(); 94 95 parse var Parm2 major'.'minor'.'ProjVersion; 96 97 RepLoc=Pos('%Y', Parm3); 98 if (RepLoc>0) then do 99 Parm3=Substr(Parm3,1,RepLoc-1)||FORMAT(SUBSTR(DATE('S'), 1, 4))||Substr(Parm3,RepLoc+2); 100 end 101 102 NewStr='@#'||Parm1||':'||Parm2||'#@##1## '||ProjString||'::::'||ProjVersion||'::'||Parm4||'@@'||Parm3; 39 103 if (Type='2') then do 40 rc=lineout(OutFile, String||' "@#'||ProjVendor||':'||BuildVersion||'#@##1## '||ProjString||'::::'||ProjVersion||'::'||FixPack||'@@'||ProductName||'"'); 104 /*OutStr=String||' "@#'||Parm1||':'||Parm2||'#@##1## '||ProjString||'::::'||ProjVersion||'::'||Parm4||'@@'||Parm3||'"';*/ 105 OutStr=String||' "'||NewStr||'"'; 41 106 end 42 107 else do 43 rc=lineout(OutFile, String||" '@#"||ProjVendor||":"||BuildVersion||"#@##1## "||ProjString||"::::"||ProjVersion||"::"||FixPack||"@@"||ProductName||"'"); 108 RepLoc=Pos('%A', String); 109 if (RepLoc>0) then OutStr=Substr(String,1,RepLoc-1)||NewStr||Substr(String,RepLoc+2); 110 else OutStr=String||" '"||NewStr||"'"; 44 111 end 45 rc=lineout(OutFile); 46 end 47 48 when (What='DATEYEAR') then do 49 rc=lineout(OutFile, String||' '||FORMAT(SUBSTR(DATE('S'), 1, 4))); 50 rc=lineout(OutFile); 51 end 52 53 when (What='DATEMONTH') then do 54 rc=lineout(OutFile, String||' '||FORMAT(SUBSTR(DATE('S'), 5, 2))); 55 rc=lineout(OutFile); 56 end 57 58 when (What='DATEDAY') then do 59 rc=lineout(OutFile, String||' '||FORMAT(SUBSTR(DATE('S'), 7, 2))); 60 rc=lineout(OutFile); 61 end 62 63 when (What="VERSIONMAJOR") then do 64 parse var ProjVendor Major'.'Minor'.'Revision; 65 rc=lineout(OutFile, String||' '||FORMAT(Major)); 66 rc=lineout(OutFile); 67 end 68 69 when (What="VERSIONMINOR") then do 70 parse var ProjVendor Major'.'Minor'.'Revision; 71 rc=lineout(OutFile, String||' '||FORMAT(Minor)); 72 rc=lineout(OutFile); 73 end 74 75 when (What="VERSIONREVISION") then do 76 parse var ProjVendor Major'.'Minor'.'Revision; 77 rc=lineout(OutFile, String||' '||FORMAT(Revision)); 112 rc=lineout(OutFile, OutStr); 113 rc=lineout(OutFile); 114 end 115 116 when (Function='DATEYEAR') then do 117 NewStr=FORMAT(SUBSTR(DATE('S'), 1, 4)); 118 RepLoc=Pos('%A', String); 119 if (RepLoc>0) then OutStr=Substr(String,1,RepLoc-1)||NewStr||Substr(String,RepLoc+2); 120 else OutStr=String||' '||NewStr; 121 rc=lineout(OutFile, OutStr); 122 rc=lineout(OutFile); 123 end 124 125 when (Function='DATEMONTH') then do 126 NewStr=FORMAT(SUBSTR(DATE('S'), 5, 2)); 127 RepLoc=Pos('%A', String); 128 if (RepLoc>0) then OutStr=Substr(String,1,RepLoc-1)||NewStr||Substr(String,RepLoc+2); 129 else OutStr=String||' '||NewStr; 130 rc=lineout(OutFile, OutStr); 131 rc=lineout(OutFile); 132 end 133 134 when (Function='DATEDAY') then do 135 NewStr=FORMAT(SUBSTR(DATE('S'), 7, 2)); 136 RepLoc=Pos('%A', String); 137 if (RepLoc>0) then OutStr=Substr(String,1,RepLoc-1)||NewStr||Substr(String,RepLoc+2); 138 else OutStr=String||' '||NewStr; 139 rc=lineout(OutFile, OutStr); 140 rc=lineout(OutFile); 141 end 142 143 when (Function="VERSIONMAJOR") then do 144 parse var Parm1 Major'.'Minor'.'Revision; 145 NewStr=FORMAT(Major); 146 RepLoc=Pos('%A', String); 147 if (RepLoc>0) then OutStr=Substr(String,1,RepLoc-1)||NewStr||Substr(String,RepLoc+2); 148 else OutStr=String||' '||NewStr; 149 rc=lineout(OutFile, OutStr); 150 rc=lineout(OutFile); 151 end 152 153 when (Function="VERSIONMINOR") then do 154 parse var Parm1 Major'.'Minor'.'Revision; 155 NewStr=FORMAT(Minor); 156 RepLoc=Pos('%A', String); 157 if (RepLoc>0) then OutStr=Substr(String,1,RepLoc-1)||NewStr||Substr(String,RepLoc+2); 158 else OutStr=String||' '||NewStr; 159 rc=lineout(OutFile, OutStr); 160 rc=lineout(OutFile); 161 end 162 163 when (Function="VERSIONREVISION") then do 164 parse var Parm1 Major'.'Minor'.'Revision; 165 NewStr=FORMAT(Revision); 166 RepLoc=Pos('%A', String); 167 if (RepLoc>0) then OutStr=Substr(String,1,RepLoc-1)||NewStr||Substr(String,RepLoc+2); 168 else OutStr=String||' '||NewStr; 169 rc=lineout(OutFile, OutStr); 170 rc=lineout(OutFile); 171 end 172 173 when (Function="FILE") then do 174 do while LINES(String) <> 0; 175 rc=LINEOUT(OutFile, LINEIN(String)); 176 end; 177 rc=stream(String,'c','close'); 178 rc=lineout(OutFile); 179 end 180 181 when (Function="VAR") then do 182 Type=SUBSTR(Function,4,1); 183 NewStr = ''; 184 Len=LENGTH(Parm1); 185 do while LINES(Parm2) <> 0; 186 Line1=LINEIN(Parm2); 187 if (LEFT(Line1, Len) = Parm1) then do 188 NewStr=SUBSTR(Line1, Len+1); 189 LEAVE; 190 end 191 end; 192 rc=stream(Parm2,'c','close'); 193 194 RepLoc=Pos('%A', String); 195 if (RepLoc>0) then OutStr=Substr(String,1,RepLoc-1)||NewStr||Substr(String,RepLoc+2); 196 else OutStr=String||' '||NewStr; 197 rc=LINEOUT(OutFile, OutStr); 78 198 rc=lineout(OutFile); 79 199 end 80 200 81 201 otherwise do 82 say "AddToFile: Unrecognized command: "|| What;202 say "AddToFile: Unrecognized command: "||Function; 83 203 exit 1; 84 204 end
Note:
See TracChangeset
for help on using the changeset viewer.