home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / os2 / programm / 6989 < prev    next >
Encoding:
Internet Message Format  |  1992-12-13  |  4.3 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rphroy!caen!spool.mu.edu!sol.ctr.columbia.edu!eff!ssd.intel.com!ichips!hfglobe!imutm1.de.intel.com!gold.sub.org!jonas.gold.sub.org!rommel
  2. From: rommel@jonas.gold.sub.org (Kai Uwe Rommel)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: Some OS Q's.
  5. Message-ID: <724243433rommel.root@jonas.gold.sub.org>
  6. Date: 13 Dec 92 10:43:53 GMT
  7. References: <Qf_3j1q00UhWM7ykZk@andrew.cmu.edu>
  8. Sender: root@jonas.gold.sub.org
  9. Organization: Private
  10. Lines: 83
  11.  
  12. In article <Qf_3j1q00UhWM7ykZk@andrew.cmu.edu> Matthew Edward Patton <mp52+@andrew.cmu.edu> writes:
  13. >1. Where,how are the Extended attributes stored?  Is it tacked onto the
  14. >end of the file? Are they kept in a special hidden file in the directory?
  15.  
  16. In case you have a description of the HPFS layout around, I would
  17. suggest reading it thoroughly - too long to repeat that here entirely.
  18.  
  19. Each file is represented on a HPFS by a directory entry, a structure
  20. called FNODE and one or more sector runs.
  21.  
  22. The FNODE occupies one sector. If the EA's are small enough, they are
  23. stored in the HPFS completely. Otherwise, they are stored "into a B+
  24. tree of allocation sectors" to which a pointer is stored in the FNODE.
  25.  
  26. In other words, forget the the FAT way of dealing with extra data by
  27. using hidden files etc., the EA data is stored in the HPFS
  28. "seamlessly" with the file, but separated from the file data. Although
  29. a file looks like a simple stream of bytes to the application,
  30. internally it isn't any more.
  31.  
  32. >2. The popular OS2 compression Utilities Info's Zip and UnZip, do they
  33. >keep track of extended attributes and successfully store them?
  34.  
  35. Yes, they do. The EA's are saved in extra fields in the zip files, for
  36. files and for directories too. And since EA's can (currently) grow to
  37. as much as 64k per file, they are compressed in the zip archive as
  38. well.  However, if you packed files with EA's with Info-ZIP's Zip, you
  39. need to unpack them with Info-ZIP's UnZip, because PKUNZIP versions
  40. for OS/2 don't yet know about this (future OS/2 PK[UN]ZIP versions may
  41. be EA-aware).
  42.  
  43. >3. Are sources for OS2's backup.exe and restore.exe available?
  44.  
  45. Not to my knowledge.
  46.  
  47. >5. can a DOS program access the extended attributes or is there a way to
  48. >"dump/extract" the attributes and then "paste" them on again?
  49.  
  50. The is no documented way. However, you may have noticed, that even in
  51. a DOS session a "DIR /N" command shows EA sizes. As long as a program
  52. only manipulates an existing file, the EA's remain intact. If a DOS
  53. program copies a file to another, the EA's are lost. The same is true
  54. for OS/2 programs also, unless they are really EA-aware, but at least
  55. to OS/2 programs there is a documented API available to deal with
  56. EA's. There seems to be one available to DOS programs too (you will
  57. notice that EAUTIL works in a DOS session too) but I don't know any
  58. documentation. If anyone writes a new DOS program which he intends to
  59. make EA-aware, he can also simply write it as an OS/2 program.
  60.  
  61. To dump/extract and paste EA's, use the EAUTIL program included with
  62. OS/2.
  63.  
  64. >6. Is there a Programmers' guide to the OS2 kernel or os2/mdos kernel
  65. >available? (something like the Norton Programmer's guide to DOS:
  66. >funcalls, interupts, the works)
  67.  
  68. The "Technical Library" is available from IBM, in printed form or on
  69. CD-ROM, which is available to DAP members (Developer Assistance
  70. Program) for a nominal fee.
  71.  
  72. >7. Where is the source code for InfoZip's stuff?
  73.  
  74. The "home" FTP site is quest.jpl.nasa.gov although you can find it on
  75. many more popular sites, such as wuarchive.wustl.edu.
  76.  
  77. >Explaination:  I want to write a HD backup program for os2 which will
  78. >operate under either FAT or HPFS and use the TurboVision IDE style
  79. >interface. (if you know how I might implement the interface under gcc or
  80. >something else let me know)  Anyway, I plan to develope under BCC and
  81. >run it as a DOS app under OS2.  Is this possible? Feasible?
  82.  
  83. Better make it an OS/2 application. A DOS app cannot (*no* way) access
  84. files on HPFS with names that exceed the 8.3 DOS restrictions.
  85.  
  86. Kai Uwe Rommel
  87.  
  88. --
  89. /* Kai Uwe Rommel                                      Muenchen, Germany *
  90.  * rommel@jonas.gold.sub.org                       Phone +49 89 723 4101 *
  91.  * rommel@informatik.tu-muenchen.de                  Fax +49 89 723 7889 */
  92.  
  93. DOS ... is still a real mode only non-reentrant interrupt
  94. handler, and always will be.                -Russell Williams
  95.