Subversion Repositories HelenOS

Rev

Rev 2793 | Rev 2856 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2793 Rev 2831
Line 56... Line 56...
56
    uint8_t     mdesc;      /**< Media descriptor. */
56
    uint8_t     mdesc;      /**< Media descriptor. */
57
    uint16_t    sec_per_fat;    /**< Sectors per FAT12/FAT16. */
57
    uint16_t    sec_per_fat;    /**< Sectors per FAT12/FAT16. */
58
    uint16_t    sec_per_track;  /**< Sectors per track. */
58
    uint16_t    sec_per_track;  /**< Sectors per track. */
59
    uint16_t    headcnt;    /**< Number of heads. */
59
    uint16_t    headcnt;    /**< Number of heads. */
60
    uint32_t    hidden_sec; /**< Hidden sectors. */
60
    uint32_t    hidden_sec; /**< Hidden sectors. */
61
    uint32_t    totseci32;  /**< Total sectors. 32-bit version. */
61
    uint32_t    totsec32;   /**< Total sectors. 32-bit version. */
62
 
62
 
63
    union {
63
    union {
64
        struct {
64
        struct {
65
            /* FAT12/FAT16 only: Extended BIOS Parameter Block */
65
            /* FAT12/FAT16 only: Extended BIOS Parameter Block */
66
            /** Physical drive number. */
66
            /** Physical drive number. */
Line 138... Line 138...
138
    };
138
    };
139
    uint32_t    size;
139
    uint32_t    size;
140
} __attribute__ ((packed)) fat_dentry_t;
140
} __attribute__ ((packed)) fat_dentry_t;
141
 
141
 
142
typedef enum {
142
typedef enum {
-
 
143
    FAT_INVALID,
143
    FAT_DIRECTORY,
144
    FAT_DIRECTORY,
144
    FAT_FILE
145
    FAT_FILE
145
} fat_node_type_t;
146
} fat_node_type_t;
146
 
147
 
147
/** FAT in-core node. */
148
/** FAT in-core node. */
148
typedef struct {
149
typedef struct {
149
    fat_node_type_t     type;
150
    fat_node_type_t     type;
150
    /** VFS index is the node's first allocated cluster. */
151
    /** VFS index is the node's first allocated cluster. */
151
    fs_index_t      index;
152
    fs_index_t      index;
-
 
153
    /** VFS index of the parent node. */
-
 
154
    fs_index_t      pindex;
152
    dev_handle_t        dev_handle;
155
    dev_handle_t        dev_handle;
153
    /** FAT in-core node hash table link. */
156
    /** FAT in-core node hash table link. */
154
    link_t          fin_link;
157
    link_t          fin_link;
-
 
158
    /** FAT in-core node free list link. */
-
 
159
    link_t          ffn_link;
155
    size_t          size;
160
    size_t          size;
156
    unsigned        lnkcnt;
161
    unsigned        lnkcnt;
-
 
162
    unsigned        refcnt;
-
 
163
    bool            dirty;
157
} fat_node_t;
164
} fat_node_t;
158
 
165
 
159
extern fs_reg_t fat_reg;
166
extern fs_reg_t fat_reg;
160
 
167
 
161
extern void fat_lookup(ipc_callid_t, ipc_call_t *);
168
extern void fat_lookup(ipc_callid_t, ipc_call_t *);