Article View: comp.os.os2.programmer
Article #2820Re: Some OS Q's.
From: Kai Uwe Rommel
Date: Sun, 13 Dec 1992 10:43
Date: Sun, 13 Dec 1992 10:43
83 lines
4497 bytes
4497 bytes
In article <Qf_3j1q00UhWM7ykZk@andrew.cmu.edu> Matthew Edward Patton <mp52+@andrew.cmu.edu> writes: >1. Where,how are the Extended attributes stored? Is it tacked onto the >end of the file? Are they kept in a special hidden file in the directory? In case you have a description of the HPFS layout around, I would suggest reading it thoroughly - too long to repeat that here entirely. Each file is represented on a HPFS by a directory entry, a structure called FNODE and one or more sector runs. The FNODE occupies one sector. If the EA's are small enough, they are stored in the HPFS completely. Otherwise, they are stored "into a B+ tree of allocation sectors" to which a pointer is stored in the FNODE. In other words, forget the the FAT way of dealing with extra data by using hidden files etc., the EA data is stored in the HPFS "seamlessly" with the file, but separated from the file data. Although a file looks like a simple stream of bytes to the application, internally it isn't any more. >2. The popular OS2 compression Utilities Info's Zip and UnZip, do they >keep track of extended attributes and successfully store them? Yes, they do. The EA's are saved in extra fields in the zip files, for files and for directories too. And since EA's can (currently) grow to as much as 64k per file, they are compressed in the zip archive as well. However, if you packed files with EA's with Info-ZIP's Zip, you need to unpack them with Info-ZIP's UnZip, because PKUNZIP versions for OS/2 don't yet know about this (future OS/2 PK[UN]ZIP versions may be EA-aware). >3. Are sources for OS2's backup.exe and restore.exe available? Not to my knowledge. >5. can a DOS program access the extended attributes or is there a way to >"dump/extract" the attributes and then "paste" them on again? The is no documented way. However, you may have noticed, that even in a DOS session a "DIR /N" command shows EA sizes. As long as a program only manipulates an existing file, the EA's remain intact. If a DOS program copies a file to another, the EA's are lost. The same is true for OS/2 programs also, unless they are really EA-aware, but at least to OS/2 programs there is a documented API available to deal with EA's. There seems to be one available to DOS programs too (you will notice that EAUTIL works in a DOS session too) but I don't know any documentation. If anyone writes a new DOS program which he intends to make EA-aware, he can also simply write it as an OS/2 program. To dump/extract and paste EA's, use the EAUTIL program included with OS/2. >6. Is there a Programmers' guide to the OS2 kernel or os2/mdos kernel >available? (something like the Norton Programmer's guide to DOS: >funcalls, interupts, the works) The "Technical Library" is available from IBM, in printed form or on CD-ROM, which is available to DAP members (Developer Assistance Program) for a nominal fee. >7. Where is the source code for InfoZip's stuff? The "home" FTP site is quest.jpl.nasa.gov although you can find it on many more popular sites, such as wuarchive.wustl.edu. >Explaination: I want to write a HD backup program for os2 which will >operate under either FAT or HPFS and use the TurboVision IDE style >interface. (if you know how I might implement the interface under gcc or >something else let me know) Anyway, I plan to develope under BCC and >run it as a DOS app under OS2. Is this possible? Feasible? Better make it an OS/2 application. A DOS app cannot (*no* way) access files on HPFS with names that exceed the 8.3 DOS restrictions. Kai Uwe Rommel -- /* Kai Uwe Rommel Muenchen, Germany * * rommel@jonas.gold.sub.org Phone +49 89 723 4101 * * rommel@informatik.tu-muenchen.de Fax +49 89 723 7889 */ DOS ... is still a real mode only non-reentrant interrupt handler, and always will be. -Russell Williams
Technical Details
Message-ID:
<724243433rommel.root@jonas.gold.sub.org>Path:
arc1-ca.pugleaf.net!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!rommelReferences:
<Qf_3j1q00UhWM7ykZk@andrew.cmu.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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 From: rommel@jonas.gold.sub.org (Kai Uwe Rommel) Newsgroups: comp.os.os2.programmer Subject: Re: Some OS Q's. Message-ID: <724243433rommel.root@jonas.gold.sub.org> Date: 13 Dec 92 10:43:53 GMT References: <Qf_3j1q00UhWM7ykZk@andrew.cmu.edu> Sender: root@jonas.gold.sub.org Organization: Private Lines: 83