Start work on partition support.
[pintos-anon] / src / devices / partition.h
1 #ifndef DEVICES_PARTITION_H
2 #define DEVICES_PARTITION_H
3
4 #include "devices/disk.h"
5
6 /* A particular partition. */
7 enum partition_type
8   {
9     PARTITION_BOOT,     /* The Pintos boot image. */
10     PARTITION_FILESYS,  /* File system partition. */
11     PARTITION_SCRATCH,  /* Scratch partition. */
12     PARTITION_SWAP,     /* Swap partition. */
13
14     PARTITION_CNT       /* Number of partitions. */
15   };
16
17 void partition_init (void);
18 struct partition *partition_get (enum partition_type);
19 disk_sector_t partition_size (struct partition *);
20 void partition_read (struct partition *, disk_sector_t, void *);
21 void partition_write (struct partition *, disk_sector_t, const void *);
22
23 #endif /* devices/partition.h */