Subversion Repositories freemyipod

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
48 farthen 1
/***************************************************************************
2
 *             __________               __   ___.
3
 *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
4
 *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
5
 *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
6
 *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
7
 *                     \/            \/     \/    \/            \/
8
 * $Id: disk.h 26629 2010-06-06 13:28:13Z gevaerts $
9
 *
10
 * Copyright (C) 2002 by Björn Stenberg
11
 *
12
 * This program is free software; you can redistribute it and/or
13
 * modify it under the terms of the GNU General Public License
14
 * as published by the Free Software Foundation; either version 2
15
 * of the License, or (at your option) any later version.
16
 *
17
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18
 * KIND, either express or implied.
19
 *
20
 ****************************************************************************/
21
#ifndef _DISK_H_
22
#define _DISK_H_
23
 
24
#include "mv.h" /* for volume definitions */
25
 
26
struct partinfo {
27
    unsigned long start; /* first sector (LBA) */
28
    unsigned long size;  /* number of sectors */
29
    unsigned char type;
30
};
31
 
32
/* FIXME: This sets the drive count to 1. This should belong to the device itself */
33
#define NUM_DRIVES 1
34
#define NUM_VOLUMES 1
35
#define NUM_VOLUMES_PER_DRIVE 1
36
 
37
#define PARTITION_TYPE_FAT32                0x0b
38
#define PARTITION_TYPE_FAT32_LBA            0x0c
39
#define PARTITION_TYPE_FAT16                0x06
40
#define PARTITION_TYPE_OS2_HIDDEN_C_DRIVE   0x84
41
 
42
/* returns a pointer to an array of 8 partinfo structs */
43
struct partinfo* disk_init(IF_MD_NONVOID(int drive));
44
struct partinfo* disk_partinfo(int partition);
45
 
46
void disk_init_subsystem(void); /* Initialises mutexes */
47
int disk_mount_all(void); /* returns the # of successful mounts */
48
int disk_mount(int drive);
49
int disk_unmount(int drive);
50
 
51
/* The number of 512-byte sectors in a "logical" sector. Needed for ipod 5.5G */
52
#ifdef MAX_LOG_SECTOR_SIZE
53
extern int disk_sector_multiplier;
54
#endif
55
 
56
#endif