syslinux.pp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 1999-2000 by Michael Van Canneyt,
  5. member of the Free Pascal development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. { These things are set in the makefile, }
  13. { But you can override them here.}
  14. { If you want to link to the C library, set the conditional crtlib }
  15. { $define crtlib}
  16. { If you use an aout system, set the conditional AOUT}
  17. { $Define AOUT}
  18. Unit SysLinux;
  19. Interface
  20. {$ifdef m68k}
  21. { used for single computations }
  22. const
  23. BIAS4 = $7f-1;
  24. {$endif}
  25. {$I systemh.inc}
  26. {$I heaph.inc}
  27. const
  28. UnusedHandle = -1;
  29. StdInputHandle = 0;
  30. StdOutputHandle = 1;
  31. StdErrorHandle = 2;
  32. var
  33. argc : longint;
  34. argv : ppchar;
  35. envp : ppchar;
  36. Implementation
  37. {$I system.inc}
  38. {$ifdef crtlib}
  39. Procedure _rtl_exit(l: longint); cdecl;
  40. Function _rtl_paramcount: longint; cdecl;
  41. Procedure _rtl_paramstr(st: pchar; l: longint); cdecl;
  42. Function _rtl_open(f: pchar; flags: longint): longint; cdecl;
  43. Procedure _rtl_close(h: longint); cdecl;
  44. Procedure _rtl_write(h: longint; addr: longInt; len : longint); cdecl;
  45. Procedure _rtl_erase(p: pchar); cdecl;
  46. Procedure _rtl_rename(p1: pchar; p2 : pchar); cdecl;
  47. Function _rtl_read(h: longInt; addr: longInt; len : longint) : longint; cdecl;
  48. Function _rtl_filepos(Handle: longint): longint; cdecl;
  49. Procedure _rtl_seek(Handle: longint; pos:longint); cdecl;
  50. Function _rtl_filesize(Handle:longint): longInt; cdecl;
  51. Procedure _rtl_rmdir(buffer: pchar); cdecl;
  52. Procedure _rtl_mkdir(buffer: pchar); cdecl;
  53. Procedure _rtl_chdir(buffer: pchar); cdecl;
  54. {$else}
  55. { used in syscall to report errors.}
  56. var
  57. Errno : longint;
  58. { Include constant and type definitions }
  59. {$i errno.inc } { Error numbers }
  60. {$i sysnr.inc } { System call numbers }
  61. {$i sysconst.inc } { Miscellaneous constants }
  62. {$i systypes.inc } { Types needed for system calls }
  63. { Read actual system call definitions. }
  64. {$i syscalls.inc }
  65. {$endif}
  66. {*****************************************************************************
  67. Misc. System Dependent Functions
  68. *****************************************************************************}
  69. procedure prthaltproc;external name '_haltproc';
  70. procedure System_exit;
  71. begin
  72. {$ifdef i386}
  73. asm
  74. jmp prthaltproc
  75. end;
  76. {$else}
  77. asm
  78. jmp prthaltproc
  79. end;
  80. {$endif}
  81. End;
  82. Function ParamCount: Longint;
  83. Begin
  84. Paramcount:=argc-1
  85. End;
  86. Function ParamStr(l: Longint): String;
  87. var
  88. link,
  89. hs : string;
  90. i : longint;
  91. begin
  92. if l=0 then
  93. begin
  94. str(sys_getpid,hs);
  95. hs:='/proc/'+hs+'/exe'#0;
  96. i:=Sys_readlink(@hs[1],@link[1],high(link));
  97. if i>0 then
  98. begin
  99. link[0]:=chr(i);
  100. paramstr:=link;
  101. end
  102. else
  103. paramstr:=strpas(argv[0]);
  104. end
  105. else
  106. if (l>0) and (l<argc) then
  107. paramstr:=strpas(argv[l])
  108. else
  109. paramstr:='';
  110. end;
  111. Procedure Randomize;
  112. Begin
  113. randseed:=sys_time;
  114. End;
  115. {*****************************************************************************
  116. Heap Management
  117. *****************************************************************************}
  118. var
  119. _HEAP : longint;external name 'HEAP';
  120. _HEAPSIZE : longint;external name 'HEAPSIZE';
  121. function getheapstart:pointer;assembler;
  122. {$ifdef i386}
  123. asm
  124. leal _HEAP,%eax
  125. end ['EAX'];
  126. {$else}
  127. asm
  128. lea.l _HEAP,a0
  129. move.l a0,d0
  130. end;
  131. {$endif}
  132. function getheapsize:longint;assembler;
  133. {$ifdef i386}
  134. asm
  135. movl _HEAPSIZE,%eax
  136. end ['EAX'];
  137. {$else}
  138. asm
  139. move.l _HEAPSIZE,d0
  140. end ['D0'];
  141. {$endif}
  142. Function sbrk(size : longint) : Longint;
  143. type
  144. tmmapargs=packed record
  145. address : longint;
  146. size : longint;
  147. prot : longint;
  148. flags : longint;
  149. fd : longint;
  150. offset : longint;
  151. end;
  152. var
  153. t : syscallregs;
  154. mmapargs : tmmapargs;
  155. begin
  156. mmapargs.address:=0;
  157. mmapargs.size:=Size;
  158. mmapargs.prot:=3;
  159. mmapargs.flags:=$22;
  160. mmapargs.fd:=-1;
  161. mmapargs.offset:=0;
  162. t.reg2:=longint(@mmapargs);
  163. Sbrk:=syscall(syscall_nr_mmap,t);
  164. if ErrNo<>0 then
  165. Sbrk:=0;
  166. end;
  167. { include standard heap management }
  168. {$I heap.inc}
  169. {*****************************************************************************
  170. Low Level File Routines
  171. *****************************************************************************}
  172. {
  173. The lowlevel file functions should take care of setting the InOutRes to the
  174. correct value if an error has occured, else leave it untouched
  175. }
  176. Procedure Errno2Inoutres;
  177. {
  178. Convert ErrNo error to the correct Inoutres value
  179. }
  180. begin
  181. if ErrNo=0 then { Else it will go through all the cases }
  182. exit;
  183. case ErrNo of
  184. Sys_ENFILE,
  185. Sys_EMFILE : Inoutres:=4;
  186. Sys_ENOENT : Inoutres:=2;
  187. Sys_EBADF : Inoutres:=6;
  188. Sys_ENOMEM,
  189. Sys_EFAULT : Inoutres:=217;
  190. Sys_EINVAL : Inoutres:=218;
  191. Sys_EPIPE,
  192. Sys_EINTR,
  193. Sys_EIO,
  194. Sys_EAGAIN,
  195. Sys_ENOSPC : Inoutres:=101;
  196. Sys_ENAMETOOLONG,
  197. Sys_ELOOP,
  198. Sys_ENOTDIR : Inoutres:=3;
  199. Sys_EROFS,
  200. Sys_EEXIST,
  201. Sys_EACCES : Inoutres:=5;
  202. Sys_ETXTBSY : Inoutres:=162;
  203. end;
  204. end;
  205. Procedure Do_Close(Handle:Longint);
  206. Begin
  207. if Handle<=4 then
  208. exit;
  209. {$ifdef crtlib}
  210. _rtl_close(Handle);
  211. {$else}
  212. sys_close(Handle);
  213. {$endif}
  214. End;
  215. Procedure Do_Erase(p:pchar);
  216. Begin
  217. {$ifdef crtlib}
  218. _rtl_erase(p);
  219. {$else}
  220. sys_unlink(p);
  221. Errno2Inoutres;
  222. {$endif}
  223. End;
  224. Procedure Do_Rename(p1,p2:pchar);
  225. Begin
  226. {$ifdef crtlib}
  227. _rtl_rename(p1,p2);
  228. {$else }
  229. sys_rename(p1,p2);
  230. Errno2Inoutres;
  231. {$endif}
  232. End;
  233. Function Do_Write(Handle,Addr,Len:Longint):longint;
  234. Begin
  235. {$ifdef crtlib}
  236. _rtl_write(Handle,addr,len);
  237. Do_Write:=Len;
  238. {$else}
  239. Do_Write:=sys_write(Handle,pchar(addr),len);
  240. Errno2Inoutres;
  241. {$endif}
  242. if Do_Write<0 then
  243. Do_Write:=0;
  244. End;
  245. Function Do_Read(Handle,Addr,Len:Longint):Longint;
  246. Begin
  247. {$ifdef crtlib}
  248. Do_Read:=_rtl_read(Handle,addr,len);
  249. {$else}
  250. Do_Read:=sys_read(Handle,pchar(addr),len);
  251. Errno2Inoutres;
  252. {$endif}
  253. if Do_Read<0 then
  254. Do_Read:=0;
  255. End;
  256. Function Do_FilePos(Handle: Longint): Longint;
  257. Begin
  258. {$ifdef crtlib}
  259. Do_FilePos:=_rtl_filepos(Handle);
  260. {$else}
  261. Do_FilePos:=sys_lseek(Handle, 0, Seek_Cur);
  262. Errno2Inoutres;
  263. {$endif}
  264. End;
  265. Procedure Do_Seek(Handle,Pos:Longint);
  266. Begin
  267. {$ifdef crtlib}
  268. _rtl_seek(Handle, Pos);
  269. {$else}
  270. sys_lseek(Handle, pos, Seek_set);
  271. {$endif}
  272. End;
  273. Function Do_SeekEnd(Handle:Longint): Longint;
  274. begin
  275. {$ifdef crtlib}
  276. Do_SeekEnd:=_rtl_filesize(Handle);
  277. {$else}
  278. Do_SeekEnd:=sys_lseek(Handle,0,Seek_End);
  279. {$endif}
  280. end;
  281. Function Do_FileSize(Handle:Longint): Longint;
  282. {$ifndef crtlib}
  283. var
  284. regs : Syscallregs;
  285. Info : Stat;
  286. {$endif}
  287. Begin
  288. {$ifdef crtlib}
  289. Do_FileSize:=_rtl_filesize(Handle);
  290. {$else}
  291. regs.reg2:=Handle;
  292. regs.reg3:=longint(@Info);
  293. if SysCall(SysCall_nr_fstat,regs)=0 then
  294. Do_FileSize:=Info.Size
  295. else
  296. Do_FileSize:=0;
  297. Errno2Inoutres;
  298. {$endif}
  299. End;
  300. Procedure Do_Truncate(Handle,Pos:longint);
  301. {$ifndef crtlib}
  302. var
  303. sr : syscallregs;
  304. {$endif}
  305. begin
  306. {$ifndef crtlib}
  307. sr.reg2:=Handle;
  308. sr.reg3:=Pos;
  309. syscall(syscall_nr_ftruncate,sr);
  310. Errno2Inoutres;
  311. {$endif}
  312. end;
  313. Procedure Do_Open(var f;p:pchar;flags:longint);
  314. {
  315. FileRec and textrec have both Handle and mode as the first items so
  316. they could use the same routine for opening/creating.
  317. when (flags and $100) the file will be append
  318. when (flags and $1000) the file will be truncate/rewritten
  319. when (flags and $10000) there is no check for close (needed for textfiles)
  320. }
  321. var
  322. {$ifndef crtlib}
  323. oflags : longint;
  324. {$endif}
  325. Begin
  326. { close first if opened }
  327. if ((flags and $10000)=0) then
  328. begin
  329. case FileRec(f).mode of
  330. fminput,fmoutput,fminout : Do_Close(FileRec(f).Handle);
  331. fmclosed : ;
  332. else
  333. begin
  334. inoutres:=102; {not assigned}
  335. exit;
  336. end;
  337. end;
  338. end;
  339. { reset file Handle }
  340. FileRec(f).Handle:=UnusedHandle;
  341. { We do the conversion of filemodes here, concentrated on 1 place }
  342. case (flags and 3) of
  343. 0 : begin
  344. oflags :=Open_RDONLY;
  345. FileRec(f).mode:=fminput;
  346. end;
  347. 1 : begin
  348. oflags :=Open_WRONLY;
  349. FileRec(f).mode:=fmoutput;
  350. end;
  351. 2 : begin
  352. oflags :=Open_RDWR;
  353. FileRec(f).mode:=fminout;
  354. end;
  355. end;
  356. if (flags and $1000)=$1000 then
  357. oflags:=oflags or (Open_CREAT or Open_TRUNC)
  358. else
  359. if (flags and $100)=$100 then
  360. oflags:=oflags or (Open_APPEND);
  361. { empty name is special }
  362. if p[0]=#0 then
  363. begin
  364. case FileRec(f).mode of
  365. fminput :
  366. FileRec(f).Handle:=StdInputHandle;
  367. fminout, { this is set by rewrite }
  368. fmoutput :
  369. FileRec(f).Handle:=StdOutputHandle;
  370. fmappend :
  371. begin
  372. FileRec(f).Handle:=StdOutputHandle;
  373. FileRec(f).mode:=fmoutput; {fool fmappend}
  374. end;
  375. end;
  376. exit;
  377. end;
  378. { real open call }
  379. {$ifdef crtlib}
  380. FileRec(f).Handle:=_rtl_open(p, oflags);
  381. if FileRec(f).Handle<0 then
  382. InOutRes:=2
  383. else
  384. InOutRes:=0;
  385. {$else}
  386. FileRec(f).Handle:=sys_open(p,oflags,438);
  387. if (ErrNo=Sys_EROFS) and ((OFlags and Open_RDWR)<>0) then
  388. begin
  389. Oflags:=Oflags and not(Open_RDWR);
  390. FileRec(f).Handle:=sys_open(p,oflags,438);
  391. end;
  392. Errno2Inoutres;
  393. {$endif}
  394. End;
  395. Function Do_IsDevice(Handle:Longint):boolean;
  396. {
  397. Interface to Unix ioctl call.
  398. Performs various operations on the filedescriptor Handle.
  399. Ndx describes the operation to perform.
  400. Data points to data needed for the Ndx function. The structure of this
  401. data is function-dependent.
  402. }
  403. var
  404. sr: SysCallRegs;
  405. Data : array[0..255] of byte; {Large enough for termios info}
  406. begin
  407. sr.reg2:=Handle;
  408. sr.reg3:=$5401; {=TCGETS}
  409. sr.reg4:=Longint(@Data);
  410. Do_IsDevice:=(SysCall(Syscall_nr_ioctl,sr)=0);
  411. end;
  412. {*****************************************************************************
  413. UnTyped File Handling
  414. *****************************************************************************}
  415. {$i file.inc}
  416. {*****************************************************************************
  417. Typed File Handling
  418. *****************************************************************************}
  419. {$i typefile.inc}
  420. {*****************************************************************************
  421. Text File Handling
  422. *****************************************************************************}
  423. {$DEFINE SHORT_LINEBREAK}
  424. {$DEFINE EXTENDED_EOF}
  425. {$i text.inc}
  426. {*****************************************************************************
  427. Directory Handling
  428. *****************************************************************************}
  429. Procedure MkDir(Const s: String);[IOCheck];
  430. Var
  431. Buffer: Array[0..255] of Char;
  432. Begin
  433. If InOutRes <> 0 then exit;
  434. Move(s[1], Buffer, Length(s));
  435. Buffer[Length(s)] := #0;
  436. {$ifdef crtlib}
  437. _rtl_mkdir(@buffer);
  438. {$else}
  439. sys_mkdir(@buffer, 511);
  440. Errno2Inoutres;
  441. {$endif}
  442. End;
  443. Procedure RmDir(Const s: String);[IOCheck];
  444. Var
  445. Buffer: Array[0..255] of Char;
  446. Begin
  447. If InOutRes <> 0 then exit;
  448. Move(s[1], Buffer, Length(s));
  449. Buffer[Length(s)] := #0;
  450. {$ifdef crtlib}
  451. _rtl_rmdir(@buffer);
  452. {$else}
  453. sys_rmdir(@buffer);
  454. Errno2Inoutres;
  455. {$endif}
  456. End;
  457. Procedure ChDir(Const s: String);[IOCheck];
  458. Var
  459. Buffer: Array[0..255] of Char;
  460. Begin
  461. If InOutRes <> 0 then exit;
  462. Move(s[1], Buffer, Length(s));
  463. Buffer[Length(s)] := #0;
  464. {$ifdef crtlib}
  465. _rtl_chdir(@buffer);
  466. {$else}
  467. sys_chdir(@buffer);
  468. Errno2Inoutres;
  469. {$endif}
  470. End;
  471. procedure getdir(drivenr : byte;var dir : shortstring);
  472. {$ifndef crtlib}
  473. var
  474. thisdir : stat;
  475. rootino,
  476. thisino,
  477. dotdotino : longint;
  478. rootdev,
  479. thisdev,
  480. dotdotdev : word;
  481. thedir,dummy : string[255];
  482. dirstream : pdir;
  483. d : pdirent;
  484. mountpoint : boolean;
  485. predot : string[255];
  486. {$endif}
  487. begin
  488. drivenr:=0;
  489. dir:='';
  490. {$ifndef crtlib}
  491. thedir:='/'#0;
  492. if sys_stat(@thedir[1],thisdir)<0 then
  493. exit;
  494. rootino:=thisdir.ino;
  495. rootdev:=thisdir.dev;
  496. thedir:='.'#0;
  497. if sys_stat(@thedir[1],thisdir)<0 then
  498. exit;
  499. thisino:=thisdir.ino;
  500. thisdev:=thisdir.dev;
  501. { Now we can uniquely identify the current and root dir }
  502. thedir:='';
  503. predot:='';
  504. while not ((thisino=rootino) and (thisdev=rootdev)) do
  505. begin
  506. { Are we on a mount point ? }
  507. dummy:=predot+'..'#0;
  508. if sys_stat(@dummy[1],thisdir)<0 then
  509. exit;
  510. dotdotino:=thisdir.ino;
  511. dotdotdev:=thisdir.dev;
  512. mountpoint:=(thisdev<>dotdotdev);
  513. { Now, Try to find the name of this dir in the previous one }
  514. dirstream:=opendir (@dummy[1]);
  515. if dirstream=nil then
  516. exit;
  517. repeat
  518. d:=sys_readdir (dirstream);
  519. if (d<>nil) and
  520. (not ((d^.name[0]='.') and ((d^.name[1]=#0) or ((d^.name[1]='.') and (d^.name[2]=#0))))) and
  521. (mountpoint or (d^.ino=thisino)) then
  522. begin
  523. dummy:=predot+'../'+strpas(@(d^.name[0]))+#0;
  524. if sys_stat (@(dummy[1]),thisdir)<0 then
  525. d:=nil;
  526. end;
  527. until (d=nil) or ((thisdir.dev=thisdev) and (thisdir.ino=thisino) );
  528. if (closedir(dirstream)<0) or (d=nil) then
  529. exit;
  530. { At this point, d.name contains the name of the current dir}
  531. thedir:='/'+strpas(@(d^.name[0]))+thedir;
  532. thisdev:=dotdotdev;
  533. thisino:=dotdotino;
  534. predot:=predot+'../';
  535. end;
  536. { Now rootino=thisino and rootdev=thisdev so we've reached / }
  537. dir:=thedir
  538. {$endif}
  539. end;
  540. {*****************************************************************************
  541. SystemUnit Initialization
  542. *****************************************************************************}
  543. Procedure SignalToRunError(Sig:longint);
  544. begin
  545. case sig of
  546. 8 : HandleError(200);
  547. 11 : HandleError(216);
  548. end;
  549. end;
  550. Procedure InstallSignals;
  551. var
  552. sr : syscallregs;
  553. begin
  554. sr.reg3:=longint(@SignalToRunError);
  555. { sigsegv }
  556. sr.reg2:=11;
  557. syscall(syscall_nr_signal,sr);
  558. { sigfpe }
  559. sr.reg2:=8;
  560. syscall(syscall_nr_signal,sr);
  561. end;
  562. procedure SetupCmdLine;
  563. var
  564. bufsize,
  565. len,j,
  566. size,i : longint;
  567. found : boolean;
  568. buf : array[0..1026] of char;
  569. procedure AddBuf;
  570. begin
  571. reallocmem(cmdline,size+bufsize);
  572. move(buf,cmdline[size],bufsize);
  573. inc(size,bufsize);
  574. bufsize:=0;
  575. end;
  576. begin
  577. size:=0;
  578. bufsize:=0;
  579. i:=0;
  580. while (i<argc) do
  581. begin
  582. len:=strlen(argv[i]);
  583. if len>sizeof(buf)-2 then
  584. len:=sizeof(buf)-2;
  585. found:=false;
  586. for j:=1 to len do
  587. if argv[i][j]=' ' then
  588. begin
  589. found:=true;
  590. break;
  591. end;
  592. if bufsize+len>=sizeof(buf)-2 then
  593. AddBuf;
  594. if found then
  595. begin
  596. buf[bufsize]:='"';
  597. inc(bufsize);
  598. end;
  599. move(argv[i]^,buf[bufsize],len);
  600. inc(bufsize,len);
  601. if found then
  602. begin
  603. buf[bufsize]:='"';
  604. inc(bufsize);
  605. end;
  606. if i<argc then
  607. buf[bufsize]:=' '
  608. else
  609. buf[bufsize]:=#0;
  610. inc(bufsize);
  611. inc(i);
  612. end;
  613. AddBuf;
  614. end;
  615. Begin
  616. { Set up signals handlers }
  617. InstallSignals;
  618. { Setup heap }
  619. InitHeap;
  620. InitExceptions;
  621. { Arguments }
  622. SetupCmdLine;
  623. { Setup stdin, stdout and stderr }
  624. OpenStdIO(Input,fmInput,StdInputHandle);
  625. OpenStdIO(Output,fmOutput,StdOutputHandle);
  626. OpenStdIO(StdOut,fmOutput,StdOutputHandle);
  627. OpenStdIO(StdErr,fmOutput,StdErrorHandle);
  628. { Reset IO Error }
  629. InOutRes:=0;
  630. End.
  631. {
  632. $Log$
  633. Revision 1.37 2000-02-09 16:59:32 peter
  634. * truncated log
  635. Revision 1.36 2000/02/09 12:17:51 peter
  636. * moved halt to system.inc
  637. * syslinux doesn't use direct asm anymore
  638. Revision 1.35 2000/02/08 11:47:09 peter
  639. * paramstr(0) support
  640. Revision 1.34 2000/01/20 23:38:02 peter
  641. * support fm_inout as stdoutput for assign(f,'');rewrite(f,1); becuase
  642. rewrite opens always with filemode 2
  643. Revision 1.33 2000/01/16 22:25:38 peter
  644. * check handle for file closing
  645. Revision 1.32 2000/01/07 16:41:41 daniel
  646. * copyright 2000
  647. Revision 1.31 2000/01/07 16:32:28 daniel
  648. * copyright 2000 added
  649. Revision 1.30 1999/12/01 22:57:31 peter
  650. * cmdline support
  651. Revision 1.29 1999/11/06 14:39:12 peter
  652. * truncated log
  653. Revision 1.28 1999/10/28 09:50:06 peter
  654. * use mmap instead of brk
  655. Revision 1.27 1999/09/10 15:40:35 peter
  656. * fixed do_open flags to be > $100, becuase filemode can be upto 255
  657. Revision 1.26 1999/09/08 16:14:43 peter
  658. * pointer fixes
  659. Revision 1.25 1999/07/28 23:18:36 peter
  660. * closedir fixes, which now disposes the pdir itself
  661. }