delorie.com/archives/browse.cgi   search  
Mail Archives: opendos/1997/04/14/13:07:25

From: "Matthias Paul" <MPAUL AT ibh DOT rwth-aachen DOT de>
Organization: IBH, RWTH-Aachen
To: opendos-developer AT delorie DOT com
Date: Mon, 14 Apr 1997 19:01:51 GMT+0100
Subject: Usage of directory entries
Reply-to: Matthias DOT Paul AT post DOT rwth-aachen DOT de
Message-ID: <F6FCDC0C07@ibh.rwth-aachen.de>

Hi!

To introduce better compatibility with FAT partitions also used 
by Windows95 with it's LFN-support, we'd need to improve some of 
the OpenDOS' utilities in this respect.  For a start, I have 
merged an overview of the usage of directory entries by the 
various 'DOS' systems.  Using some more 'intelligent' algorithms 
also decoding the context of an entry, it should be possible to 
decide LFN-entries from normal directory entries, while still 
maintaining compatibility with "DR DOS"-features, which use the 
same entries, but in a different context.  However, for full 
LFN-support we should better slightly modify the usage of these 
structures...

FYI:

    "FAT12 & FAT16 & VFAT16 directory entries"

    as used by DR DOS, Multiuser DOS, DR PalmDOS, Novell DOS,
    Caldera OpenDOS, MS-DOS/PC-DOS, OS/2, Chicago/Windows95/MS-DOS 7:


    +---------------------------------------------------------------+
    |                               |           |   |   |Del|       |
    |                               |           |   |   |Chr|Passwrd|
    |             Name              | Extension |Att|Typ| / |   /   |
    |          (8 Chars)            | (3 Chars) |   |   |Mil|Create-|
    |                               |           |   |   |Sec| Time  |
    |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
    +---------------------------------------------------------------+
    +00h 01h 02h 03h 04h 05h 06h 07h 08h 09h 0Ah 0Bh 0Ch 0Dh 0Eh 0Fh

      |                                           |   |   |     |
      |    Files in the DELWATCH delete tracking--|   |   |     |
      |    queue have an additional 'volume'      |   |   |     |
      |    attribute set, which collidates        |   |   |     |
      |    somewhat with Windows95 LFN-entries.   |   |   |     |
      |                                           |   |   |     |
      |    Password-protected files/dirs have   --|   |   |     |
      |    a 'hidden' attribute set, but          |   |   |     |
      |    COMMAND.COM handles them as if they    |   |   |     |
      |    wouldn't have this attribute set. Of   |   |   |     |
      |    course, password protection does not   |   |   |     |
      |    depend on the attribute set/cleared.   |   |   |     |
      |                                           |   |   |     |
      |    !!! MS Chicago/Windows95: The        --+   |   |     |
      |    attribute combination 0Fh (Read-Only +     |   |     |
      |    Hidden + System + Volume) is used to       |   |     |
      |    indicate a LFN entry.                      |   |     |
      |                                               |   |     |
      |    MS Chicago/MS Windows95: Reserved for     -|   |     |
      |    type declaration of LFN entries. Chicago   |   |     |
      |    used two types: LONG_NAME_COMP (00h) and   |   |     |
      |    LONG_CLASS (??h). I don't know, if         |   |     |
      |    Windows95 also used the LONG_CLASS value.  |   |     |
      |                                               |   |     |
      |    !!! Could be used by OpenDOS for type     -+   |     |
      |    declaration of the directory entries           |     |
      |    introducing new types to end up the            |     |
      |    current confusion.                             |     |
      |                                                   |     |
      |    Default is 00h. Since Novell DOS 7 (DR DOS   --|     |
      |    6.0 "business update 1993" and DR PalmDOS      |     |
      |    unknown) this field contains the 1st letter of |     |
      |    a filename after deletion, allows for an       |     |
      |    UNDELETE of a file/dir without asking for the  |     |
      |    1st letter. After a file has been purged       |     |
      |    from the delete tracking queue by DELPURGE,    |     |
      |    this field contains E5h, disabling UNDELETE    |     |
      |    to undelete the purged file. After setting     |     |
      |    this back to 00h manually, UNDELETE can        |     |
      |    undelete the file using the conventional       |     |
      |    method.                                        |     |
      |                                                   |     |
      |    !!! MS Windows95: Milliseconds of the file   --+     |
      |    creation time (10 ms raster). If this was a          |
      |    LFN entry, this byte would contain a CRC             |
      |    checksum of the short filename.                      |
      |                                                         |
      |    Under DR DOS, Multiuser DOS, DR PalmDOS,           --|
      |    Novell DOS, and Caldera OpenDOS this word is 0000h   |
      |    for normal entries, but contains a unidirectionally  |
      |    encrypted password for password protected files/dirs.|
      |                                                         |
      |    !!! MS Windows95: File creation time               --+
      |
      |--- 1st letter of a deleted file, normally is E5h.
      |    Using DR DOS 6.0, Novell DOS 7, or Caldera OpenDOS DELWATCH
      |    it is 05h as long as the file is in the delete tracking
      |    queue, and E5h afterwards.
      |
      +--- !!! MS Windows95:
           Bits 0-4: Contains the sequence number of a LFN entry 
                     01d..31d
           Bit  6  : set if last LFN-entry for a short entry.
           Unfortunately, 01h..1Fh, and 41h..5Fh cannot properly
           be distinguished from the formerly used values.


    +---------------------------------------------------------------+
    |Org-Del|OwnerID|Passwrd| Std-  | Std-  |       |               |
    | Time  |Org-Del|Rights | Time  | Date  |Start- |   Filelength  |
    |   /   | Date /|   /   |  or   |   or  |Cluster|   in Bytes    |
    |Create-|Access-|  EA-  | Del-  | Del-  |       |               |
    | Date  | Date  |Handle | Time  | Date  |       |               |
    |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
    +---------------------------------------------------------------+
    +10h 11h 12h 13h 14h 15h 16h 17h 18h 19h 1Ah 1Bh 1Ch 1Dh 1Eh 1Fh

        |       |       |       |       |       |
        |       |       |       |-------+       +-- MS Windows95:
        |       |       |       |          0000h with LFN entries.
        |       |       |       |
        |       |       |       +-- While a file is in the delete 
        |       |       |  tracking queue of Novell DOS'/OpenDOS' 
        |       |       |  DELWATCH (not DR DOS 6.0 DELWATCH), these 
        |       |       |  entries contain the time and date of 
        |       |       |  deletion, not the normal time and date of 
        |       |       |  last modification.
        |       |       |
        |       |       |-- DR DOS, Multiuser DOS, DR PalmDOS, 
        |       |       |   Novell DOS, Caldera OpenDOS: Accessrights 
        |       |       |   for password-protected files/dirs. There 
        |       |       |   are maintained three  classes
        |       |       |   'World', 'Group', and 'Owner', each with
        |       |       |   access rights 'Write', 'Read', 'Execute',
        |       |       |   and 'Delete'. Currently 'Execute' is used 
        |       |       |   by FlexOS only, and is treated similar to 
        |       |       |   'Read' by the other OS'es. Singleuser 
        |       |       |   variants use all three classes  
        |       |       |   simultanously (i.e. 0000h, 0111h, 0555h, 
        |       |       |   and 0DDDh) while Multiuser variants decide 
        |       |       |   between them.
        |       |       |
        |       |       |-- !!! (MS)/IBM OS/2: Extended-Attribute 
        |       |       |                      Handle
        |       |       +-- ??? MS Windows95b FAT32 partitions: 
        |       |           High-Word of Start-Cluster???       
        |       |
        |       |-- DR DOS 6.0 (and Multiuser DOS???): Owner-IDs     
        |       |
        |       |-- Novell DOS 7, Caldera OpenDOS 7.01 DELWATCH: 
        |       |   Temporary scratchpad for the date of last 
        |       |   modification, 
        |       |   if a deleted file is still in the delete tracking 
        |       |   queue. (not with DR DOS 6.0; DR PalmDOS unknown)
        |       |
        |       +-- MS Windows95: With ACCDATE= : Last access date
        |
        |-- Novell DOS 7, Caldera OpenDOS 7.01 DELWATCH:  Temporary
        |   scratchpad for the time of the last modification, if a
        |   deleted file is still in the delete tracking queue.
        |   (not with DR DOS 6.0; DR PalmDOS unknown)
        |
        +-- !!! MS Windows95: File-Creation-Date



   MS Chicago/Windows95 LFN entries containing long Filenames in
   Unicode (type LONG_NAME_COMP=00h)

    +---------------------------------------------------------------+
    |   |                                       |   |   |   |       |
    |   |                                       |   |   |   | Long  |
    |LFN|    Long Filename (1/3)                |Att|Typ|CRC| File- |
    |SNo|                                       |0Fh|00h|   | name  |
    |   |       |       |       |       |       |   |   |   | (2/3) |
    |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
    +---------------------------------------------------------------+
    +00h 01h 02h 03h 04h 05h 06h 07h 08h 09h 0Ah 0Bh 0Ch 0Dh 0Eh 0Fh

    +---------------------------------------------------------------+
    |                                       |       |               |
    |                                       |       | Long          |
    |  Long Filename (cont. 2/3)            | 0000h | Filename      |
    |                                       |       | (3/3)         |
    |       |       |       |       |       |       |       |       |
    |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
    +---------------------------------------------------------------+
    +10h 11h 12h 13h 14h 15h 16h 17h 18h 19h 1Ah 1Bh 1Ch 1Dh 1Eh 1Fh



   MS Chicago LFN entries containing class informationen
   (type LONG_CLASS=??h)  (I don't know, if this is used by
   MS Windows95, too.)

    +---------------------------------------------------------------+
    |   |                                       |   |   |   |       |
    |   |                                       |   |   |   | Class-|
    |LFN|       Class-Information (1/2)         |Att|Typ|CRC| info  |
    |SNo|                                       |0Fh|??h|   | (2/2) |
    |   |                                       |   |   |   |       |
    |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
    +---------------------------------------------------------------+
    +00h 01h 02h 03h 04h 05h 06h 07h 08h 09h 0Ah 0Bh 0Ch 0Dh 0Eh 0Fh

    +---------------------------------------------------------------+
    |               |                       |       |               |
    |  Classinfo    |                       |       |               |
    | (cont. 2/2)   |       Reserved        | 0000h |    Reserved   |
    |               |                       |       |               |
    |               |                       |       |               |
    |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
    +---------------------------------------------------------------+
    +10h 11h 12h 13h 14h 15h 16h 17h 18h 19h 1Ah 1Bh 1Ch 1Dh 1Eh 1Fh

   
   Some beta versions of MS-DOS 4 used an (unknown) word within the
   directory entries to store the codepage desired for each file.
   (see INT21h/3303h and INT21h/3304h).  Although this was never 
   released to the public, it was quite interestingly, which bytes 
   were used for this...

   The areas used for password protection are probably also be used
   by Multiuser DOS, including CCI Multiuser DOS 7.22, IMS Multiuser 
   DOS, and IMS REAL/32 for the same purpose. However, I have not 
   proved this...

   The info of DR PalmDOS is guesswork.

   Since the cluster number entry is to small for FAT32 partitions,
   MS Windows95b's new FAT32 has to use a different format for 
   directory entries, currently not investigated...  It was reported 
   that another word is used for the high-word of the cluster (and 
   I expect this could be the word at offset +14h than...). Not 
   proved.

   More detailed info on the usage of these structures can be found in
   NWDOSTIP.TXT (from my MPDOSTIP.ZIP) and in Ralf Brown's interrupt
   list INTER53+.

Bye,

 Matthias

------------------------------------------------------------------
 Matthias Paul     ! My eMail address has changed. For some time !
 Ubierstrasse 28   ! mails to former <MPaul AT ibh DOT rwth-aachen DOT de>  !
 D-50321 BRUEHL    ! will be forwarded to the new address.       !
 eMail: <Matthias DOT Paul AT post DOT rwth-aachen DOT de>                       
 WWW  : URL: http://www.rhrz.uni-bonn.de/~uzs180/mpdokeng.html    
------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019