Changeset c125425 in rtems for cpukit/libfs/src/dosfs/msdos.h


Ignore:
Timestamp:
Jul 2, 2003, 2:09:15 PM (18 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
1f5d2ba
Parents:
3b44f153
Message:

Patch from Victor V. Vengerov <vvv@…> to remove Linux code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libfs/src/dosfs/msdos.h

    r3b44f153 rc125425  
    8282/*
    8383 * Macros for fetching fields from 32 bytes long FAT Directory Entry
    84  * Structure (see M$ White Paper)
     84 * Structure
    8585 */
    8686#define MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE    32 /* 32 bytes */
     
    105105/*
    106106 * Fields offset in 32 bytes long FAT Directory Entry
    107  * Structure (see M$ White Paper)
     107 * Structure
    108108 */
    109109#define MSDOS_FILE_SIZE_OFFSET            28
     
    116116/*
    117117 * Possible values of DIR_Attr field of 32 bytes long FAT Directory Entry
    118  * Structure (see M$ White Paper)
     118 * Structure
    119119 */
    120120#define MSDOS_ATTR_READ_ONLY    0x01
     
    125125#define MSDOS_ATTR_ARCHIVE      0x20
    126126
     127#define MSDOS_DT_2SECONDS_MASK        0x1F    /* seconds divided by 2 */
     128#define MSDOS_DT_2SECONDS_SHIFT       0
     129#define MSDOS_DT_MINUTES_MASK         0x7E0   /* minutes */
     130#define MSDOS_DT_MINUTES_SHIFT        5
     131#define MSDOS_DT_HOURS_MASK           0xF800  /* hours */
     132#define MSDOS_DT_HOURS_SHIFT          11
     133
     134#define MSDOS_DD_DAY_MASK             0x1F    /* day of month */
     135#define MSDOS_DD_DAY_SHIFT            0
     136#define MSDOS_DD_MONTH_MASK           0x1E0   /* month */
     137#define MSDOS_DD_MONTH_SHIFT          5
     138#define MSDOS_DD_YEAR_MASK            0xFE00  /* year - 1980 */
     139#define MSDOS_DD_YEAR_SHIFT           9
     140
     141
    127142/*
    128143 * Possible values of DIR_Name[0] field of 32 bytes long FAT Directory Entry
    129  * Structure (see M$ White Paper)
     144 * Structure
    130145 */
    131146#define MSDOS_THIS_DIR_ENTRY_EMPTY             0xE5
     
    172187#define DOTDOT_NODE_P(p)  ((char *)((p) + MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE))
    173188
    174 /* Size limits for files and directories (see M$ White Paper) */
     189/* Size limits for files and directories */
    175190#define MSDOS_MAX_DIR_LENGHT               0x200000   /* 2,097,152 bytes */
    176191#define MSDOS_MAX_FILE_SIZE                0xFFFFFFFF /* 4 Gb */
     
    346361msdos_dir_info_remove(rtems_filesystem_location_info_t *pathloc);
    347362
    348 void
    349 msdos_date_unix2dos(int             unix_date,
    350                     unsigned short *time_val,
    351                     unsigned short *date);
    352 
    353 unsigned int 
    354 msdos_date_dos2unix(unsigned short time_val, unsigned short date);
     363int
     364msdos_filename_unix2dos(char *un, int unlen, char *dn);
     365
     366void
     367msdos_date_unix2dos(unsigned int tsp, unsigned short *ddp,
     368                    unsigned short *dtp);
     369
     370unsigned int
     371msdos_date_dos2unix(unsigned int dd, unsigned int dt);
    355372
    356373int
Note: See TracChangeset for help on using the changeset viewer.