syslinux.pp 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767
  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. {$ifdef crtlib}
  208. _rtl_close(Handle);
  209. {$else}
  210. sys_close(Handle);
  211. {$endif}
  212. End;
  213. Procedure Do_Erase(p:pchar);
  214. Begin
  215. {$ifdef crtlib}
  216. _rtl_erase(p);
  217. {$else}
  218. sys_unlink(p);
  219. Errno2Inoutres;
  220. {$endif}
  221. End;
  222. Procedure Do_Rename(p1,p2:pchar);
  223. Begin
  224. {$ifdef crtlib}
  225. _rtl_rename(p1,p2);
  226. {$else }
  227. sys_rename(p1,p2);
  228. Errno2Inoutres;
  229. {$endif}
  230. End;
  231. Function Do_Write(Handle,Addr,Len:Longint):longint;
  232. Begin
  233. {$ifdef crtlib}
  234. _rtl_write(Handle,addr,len);
  235. Do_Write:=Len;
  236. {$else}
  237. Do_Write:=sys_write(Handle,pchar(addr),len);
  238. Errno2Inoutres;
  239. {$endif}
  240. if Do_Write<0 then
  241. Do_Write:=0;
  242. End;
  243. Function Do_Read(Handle,Addr,Len:Longint):Longint;
  244. Begin
  245. {$ifdef crtlib}
  246. Do_Read:=_rtl_read(Handle,addr,len);
  247. {$else}
  248. Do_Read:=sys_read(Handle,pchar(addr),len);
  249. Errno2Inoutres;
  250. {$endif}
  251. if Do_Read<0 then
  252. Do_Read:=0;
  253. End;
  254. Function Do_FilePos(Handle: Longint): Longint;
  255. Begin
  256. {$ifdef crtlib}
  257. Do_FilePos:=_rtl_filepos(Handle);
  258. {$else}
  259. Do_FilePos:=sys_lseek(Handle, 0, Seek_Cur);
  260. Errno2Inoutres;
  261. {$endif}
  262. End;
  263. Procedure Do_Seek(Handle,Pos:Longint);
  264. Begin
  265. {$ifdef crtlib}
  266. _rtl_seek(Handle, Pos);
  267. {$else}
  268. sys_lseek(Handle, pos, Seek_set);
  269. {$endif}
  270. End;
  271. Function Do_SeekEnd(Handle:Longint): Longint;
  272. begin
  273. {$ifdef crtlib}
  274. Do_SeekEnd:=_rtl_filesize(Handle);
  275. {$else}
  276. Do_SeekEnd:=sys_lseek(Handle,0,Seek_End);
  277. {$endif}
  278. end;
  279. Function Do_FileSize(Handle:Longint): Longint;
  280. {$ifndef crtlib}
  281. var
  282. regs : Syscallregs;
  283. Info : Stat;
  284. {$endif}
  285. Begin
  286. {$ifdef crtlib}
  287. Do_FileSize:=_rtl_filesize(Handle);
  288. {$else}
  289. regs.reg2:=Handle;
  290. regs.reg3:=longint(@Info);
  291. if SysCall(SysCall_nr_fstat,regs)=0 then
  292. Do_FileSize:=Info.Size
  293. else
  294. Do_FileSize:=0;
  295. Errno2Inoutres;
  296. {$endif}
  297. End;
  298. Procedure Do_Truncate(Handle,Pos:longint);
  299. {$ifndef crtlib}
  300. var
  301. sr : syscallregs;
  302. {$endif}
  303. begin
  304. {$ifndef crtlib}
  305. sr.reg2:=Handle;
  306. sr.reg3:=Pos;
  307. syscall(syscall_nr_ftruncate,sr);
  308. Errno2Inoutres;
  309. {$endif}
  310. end;
  311. Procedure Do_Open(var f;p:pchar;flags:longint);
  312. {
  313. FileRec and textrec have both Handle and mode as the first items so
  314. they could use the same routine for opening/creating.
  315. when (flags and $100) the file will be append
  316. when (flags and $1000) the file will be truncate/rewritten
  317. when (flags and $10000) there is no check for close (needed for textfiles)
  318. }
  319. var
  320. {$ifndef crtlib}
  321. oflags : longint;
  322. {$endif}
  323. Begin
  324. { close first if opened }
  325. if ((flags and $10000)=0) then
  326. begin
  327. case FileRec(f).mode of
  328. fminput,fmoutput,fminout : Do_Close(FileRec(f).Handle);
  329. fmclosed : ;
  330. else
  331. begin
  332. inoutres:=102; {not assigned}
  333. exit;
  334. end;
  335. end;
  336. end;
  337. { reset file Handle }
  338. FileRec(f).Handle:=UnusedHandle;
  339. { We do the conversion of filemodes here, concentrated on 1 place }
  340. case (flags and 3) of
  341. 0 : begin
  342. oflags :=Open_RDONLY;
  343. FileRec(f).mode:=fminput;
  344. end;
  345. 1 : begin
  346. oflags :=Open_WRONLY;
  347. FileRec(f).mode:=fmoutput;
  348. end;
  349. 2 : begin
  350. oflags :=Open_RDWR;
  351. FileRec(f).mode:=fminout;
  352. end;
  353. end;
  354. if (flags and $1000)=$1000 then
  355. oflags:=oflags or (Open_CREAT or Open_TRUNC)
  356. else
  357. if (flags and $100)=$100 then
  358. oflags:=oflags or (Open_APPEND);
  359. { empty name is special }
  360. if p[0]=#0 then
  361. begin
  362. case FileRec(f).mode of
  363. fminput :
  364. FileRec(f).Handle:=StdInputHandle;
  365. fminout, { this is set by rewrite }
  366. fmoutput :
  367. FileRec(f).Handle:=StdOutputHandle;
  368. fmappend :
  369. begin
  370. FileRec(f).Handle:=StdOutputHandle;
  371. FileRec(f).mode:=fmoutput; {fool fmappend}
  372. end;
  373. end;
  374. exit;
  375. end;
  376. { real open call }
  377. {$ifdef crtlib}
  378. FileRec(f).Handle:=_rtl_open(p, oflags);
  379. if FileRec(f).Handle<0 then
  380. InOutRes:=2
  381. else
  382. InOutRes:=0;
  383. {$else}
  384. FileRec(f).Handle:=sys_open(p,oflags,438);
  385. if (ErrNo=Sys_EROFS) and ((OFlags and Open_RDWR)<>0) then
  386. begin
  387. Oflags:=Oflags and not(Open_RDWR);
  388. FileRec(f).Handle:=sys_open(p,oflags,438);
  389. end;
  390. Errno2Inoutres;
  391. {$endif}
  392. End;
  393. Function Do_IsDevice(Handle:Longint):boolean;
  394. {
  395. Interface to Unix ioctl call.
  396. Performs various operations on the filedescriptor Handle.
  397. Ndx describes the operation to perform.
  398. Data points to data needed for the Ndx function. The structure of this
  399. data is function-dependent.
  400. }
  401. var
  402. sr: SysCallRegs;
  403. Data : array[0..255] of byte; {Large enough for termios info}
  404. begin
  405. sr.reg2:=Handle;
  406. sr.reg3:=$5401; {=TCGETS}
  407. sr.reg4:=Longint(@Data);
  408. Do_IsDevice:=(SysCall(Syscall_nr_ioctl,sr)=0);
  409. end;
  410. {*****************************************************************************
  411. UnTyped File Handling
  412. *****************************************************************************}
  413. {$i file.inc}
  414. {*****************************************************************************
  415. Typed File Handling
  416. *****************************************************************************}
  417. {$i typefile.inc}
  418. {*****************************************************************************
  419. Text File Handling
  420. *****************************************************************************}
  421. {$DEFINE SHORT_LINEBREAK}
  422. {$DEFINE EXTENDED_EOF}
  423. {$i text.inc}
  424. {*****************************************************************************
  425. Directory Handling
  426. *****************************************************************************}
  427. Procedure MkDir(Const s: String);[IOCheck];
  428. Var
  429. Buffer: Array[0..255] of Char;
  430. Begin
  431. If InOutRes <> 0 then exit;
  432. Move(s[1], Buffer, Length(s));
  433. Buffer[Length(s)] := #0;
  434. {$ifdef crtlib}
  435. _rtl_mkdir(@buffer);
  436. {$else}
  437. sys_mkdir(@buffer, 511);
  438. Errno2Inoutres;
  439. {$endif}
  440. End;
  441. Procedure RmDir(Const s: String);[IOCheck];
  442. Var
  443. Buffer: Array[0..255] of Char;
  444. Begin
  445. If InOutRes <> 0 then exit;
  446. Move(s[1], Buffer, Length(s));
  447. Buffer[Length(s)] := #0;
  448. {$ifdef crtlib}
  449. _rtl_rmdir(@buffer);
  450. {$else}
  451. sys_rmdir(@buffer);
  452. Errno2Inoutres;
  453. {$endif}
  454. End;
  455. Procedure ChDir(Const s: String);[IOCheck];
  456. Var
  457. Buffer: Array[0..255] of Char;
  458. Begin
  459. If InOutRes <> 0 then exit;
  460. Move(s[1], Buffer, Length(s));
  461. Buffer[Length(s)] := #0;
  462. {$ifdef crtlib}
  463. _rtl_chdir(@buffer);
  464. {$else}
  465. sys_chdir(@buffer);
  466. Errno2Inoutres;
  467. {$endif}
  468. End;
  469. procedure getdir(drivenr : byte;var dir : shortstring);
  470. {$ifndef crtlib}
  471. var
  472. thisdir : stat;
  473. rootino,
  474. thisino,
  475. dotdotino : longint;
  476. rootdev,
  477. thisdev,
  478. dotdotdev : word;
  479. thedir,dummy : string[255];
  480. dirstream : pdir;
  481. d : pdirent;
  482. mountpoint : boolean;
  483. predot : string[255];
  484. {$endif}
  485. begin
  486. drivenr:=0;
  487. dir:='';
  488. {$ifndef crtlib}
  489. thedir:='/'#0;
  490. if sys_stat(@thedir[1],thisdir)<0 then
  491. exit;
  492. rootino:=thisdir.ino;
  493. rootdev:=thisdir.dev;
  494. thedir:='.'#0;
  495. if sys_stat(@thedir[1],thisdir)<0 then
  496. exit;
  497. thisino:=thisdir.ino;
  498. thisdev:=thisdir.dev;
  499. { Now we can uniquely identify the current and root dir }
  500. thedir:='';
  501. predot:='';
  502. while not ((thisino=rootino) and (thisdev=rootdev)) do
  503. begin
  504. { Are we on a mount point ? }
  505. dummy:=predot+'..'#0;
  506. if sys_stat(@dummy[1],thisdir)<0 then
  507. exit;
  508. dotdotino:=thisdir.ino;
  509. dotdotdev:=thisdir.dev;
  510. mountpoint:=(thisdev<>dotdotdev);
  511. { Now, Try to find the name of this dir in the previous one }
  512. dirstream:=opendir (@dummy[1]);
  513. if dirstream=nil then
  514. exit;
  515. repeat
  516. d:=sys_readdir (dirstream);
  517. if (d<>nil) and
  518. (not ((d^.name[0]='.') and ((d^.name[1]=#0) or ((d^.name[1]='.') and (d^.name[2]=#0))))) and
  519. (mountpoint or (d^.ino=thisino)) then
  520. begin
  521. dummy:=predot+'../'+strpas(@(d^.name[0]))+#0;
  522. if sys_stat (@(dummy[1]),thisdir)<0 then
  523. d:=nil;
  524. end;
  525. until (d=nil) or ((thisdir.dev=thisdev) and (thisdir.ino=thisino) );
  526. if (closedir(dirstream)<0) or (d=nil) then
  527. exit;
  528. { At this point, d.name contains the name of the current dir}
  529. thedir:='/'+strpas(@(d^.name[0]))+thedir;
  530. thisdev:=dotdotdev;
  531. thisino:=dotdotino;
  532. predot:=predot+'../';
  533. end;
  534. { Now rootino=thisino and rootdev=thisdev so we've reached / }
  535. dir:=thedir
  536. {$endif}
  537. end;
  538. {*****************************************************************************
  539. SystemUnit Initialization
  540. *****************************************************************************}
  541. Procedure SignalToRunError(Sig:longint);
  542. begin
  543. case sig of
  544. 8 : HandleError(200);
  545. 11 : HandleError(216);
  546. end;
  547. end;
  548. Procedure InstallSignals;
  549. var
  550. sr : syscallregs;
  551. begin
  552. sr.reg3:=longint(@SignalToRunError);
  553. { sigsegv }
  554. sr.reg2:=11;
  555. syscall(syscall_nr_signal,sr);
  556. { sigfpe }
  557. sr.reg2:=8;
  558. syscall(syscall_nr_signal,sr);
  559. end;
  560. procedure SetupCmdLine;
  561. var
  562. bufsize,
  563. len,j,
  564. size,i : longint;
  565. found : boolean;
  566. buf : array[0..1026] of char;
  567. procedure AddBuf;
  568. begin
  569. reallocmem(cmdline,size+bufsize);
  570. move(buf,cmdline[size],bufsize);
  571. inc(size,bufsize);
  572. bufsize:=0;
  573. end;
  574. begin
  575. size:=0;
  576. bufsize:=0;
  577. i:=0;
  578. while (i<argc) do
  579. begin
  580. len:=strlen(argv[i]);
  581. if len>sizeof(buf)-2 then
  582. len:=sizeof(buf)-2;
  583. found:=false;
  584. for j:=1 to len do
  585. if argv[i][j]=' ' then
  586. begin
  587. found:=true;
  588. break;
  589. end;
  590. if bufsize+len>=sizeof(buf)-2 then
  591. AddBuf;
  592. if found then
  593. begin
  594. buf[bufsize]:='"';
  595. inc(bufsize);
  596. end;
  597. move(argv[i]^,buf[bufsize],len);
  598. inc(bufsize,len);
  599. if found then
  600. begin
  601. buf[bufsize]:='"';
  602. inc(bufsize);
  603. end;
  604. if i<argc then
  605. buf[bufsize]:=' '
  606. else
  607. buf[bufsize]:=#0;
  608. inc(bufsize);
  609. inc(i);
  610. end;
  611. AddBuf;
  612. end;
  613. Begin
  614. { Set up signals handlers }
  615. InstallSignals;
  616. { Setup heap }
  617. InitHeap;
  618. InitExceptions;
  619. { Arguments }
  620. SetupCmdLine;
  621. { Setup stdin, stdout and stderr }
  622. OpenStdIO(Input,fmInput,StdInputHandle);
  623. OpenStdIO(Output,fmOutput,StdOutputHandle);
  624. OpenStdIO(StdOut,fmOutput,StdOutputHandle);
  625. OpenStdIO(StdErr,fmOutput,StdErrorHandle);
  626. { Reset IO Error }
  627. InOutRes:=0;
  628. End.
  629. {
  630. $Log$
  631. Revision 1.38 2000-03-23 15:24:18 peter
  632. * remove handle check for do_close
  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. }