Subversion Repositories freemyipod

Rev

Rev 57 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 57 Rev 58
Line 21... Line 21...
21
 
21
 
22
#ifndef FAT_H
22
#ifndef FAT_H
23
#define FAT_H
23
#define FAT_H
24
 
24
 
25
#include "global.h"
25
#include "global.h"
-
 
26
#include "util.h"
26
#include "mv.h" /* for volume definitions */
27
#include "mv.h" /* for volume definitions */
27
 
28
 
28
/* Number of bytes reserved for a file name (including the trailing \0).
29
/* Number of bytes reserved for a file name (including the trailing \0).
29
   Since names are stored in the entry as UTF-8, we won't be able to
30
   Since names are stored in the entry as UTF-8, we won't be able to
30
   store all names allowed by FAT. In FAT, a name can have max 255
31
   store all names allowed by FAT. In FAT, a name can have max 255
Line 76... Line 77...
76
{
77
{
77
    unsigned int entry;
78
    unsigned int entry;
78
    unsigned int entrycount;
79
    unsigned int entrycount;
79
    long sector;
80
    long sector;
80
    struct fat_file file;
81
    struct fat_file file;
81
    unsigned char sectorcache[SECTOR_SIZE];
82
    unsigned char sectorcache[SECTOR_SIZE] CACHEALIGN_ATTR;
82
    /* There are 2-bytes per characters. We don't want to bother too much, as LFN entries are
83
    /* There are 2-bytes per characters. We don't want to bother too much, as LFN entries are
83
     * at much 255 characters longs, that's at most 20 LFN entries. Each entry hold at most
84
     * at much 255 characters longs, that's at most 20 LFN entries. Each entry hold at most
84
     * 13 characters, that a total of 260 characters. So we keep a buffer of that size.
85
     * 13 characters, that a total of 260 characters. So we keep a buffer of that size.
85
     * Keep coherent with fat.c code. */
86
     * Keep coherent with fat.c code. */
86
    unsigned char longname[260 * 2];
87
    unsigned char longname[260 * 2];
87
};
88
} CACHEALIGN_ATTR;
88
 
89
 
89
#ifdef HAVE_HOTSWAP
90
#ifdef HAVE_HOTSWAP
90
extern void fat_lock(void);
91
extern void fat_lock(void);
91
extern void fat_unlock(void);
92
extern void fat_unlock(void);
92
#endif
93
#endif