#include "devices/partition.h"#include <packed.h>#include <stdlib.h>#include <string.h>#include <stdio.h>#include "devices/block.h"#include "threads/malloc.h"Go to the source code of this file.
Data Structures | |
| struct | partition |
Functions | |
| static void | read_partition_table (struct block *, block_sector_t sector, block_sector_t primary_extended_sector, int *part_nr) |
| static void | found_partition (struct block *, uint8_t type, block_sector_t start, block_sector_t size, int part_nr) |
| static const char * | partition_type_name (uint8_t) |
| void | partition_scan (struct block *block) |
| static void | partition_read (void *p_, block_sector_t sector, void *buffer) |
| static void | partition_write (void *p_, block_sector_t sector, const void *buffer) |
Variables | |
| static struct block_operations | partition_operations |
| static void found_partition | ( | struct block * | block, | |
| uint8_t | type, | |||
| block_sector_t | start, | |||
| block_sector_t | size, | |||
| int | part_nr | |||
| ) | [static] |
Definition at line 155 of file partition.c.
References partition::block, BLOCK_FILESYS, BLOCK_FOREIGN, BLOCK_KERNEL, block_name(), block_register(), BLOCK_SCRATCH, block_size(), BLOCK_SWAP, malloc(), name, NULL, PANIC, partition_operations, partition_type_name(), PRDSNu, printf(), snprintf(), and partition::start.
Referenced by read_partition_table().
| static void partition_read | ( | void * | p_, | |
| block_sector_t | sector, | |||
| void * | buffer | |||
| ) | [static] |
Definition at line 305 of file partition.c.
References partition::block, block_read(), and partition::start.
| void partition_scan | ( | struct block * | block | ) |
Definition at line 29 of file partition.c.
References block_name(), printf(), and read_partition_table().
Referenced by identify_ata_device(), and msc_attached().
| static const char * partition_type_name | ( | uint8_t | type | ) | [static] |
| static void partition_write | ( | void * | p_, | |
| block_sector_t | sector, | |||
| const void * | buffer | |||
| ) | [static] |
Definition at line 315 of file partition.c.
References partition::block, block_write(), and partition::start.
| static void read_partition_table | ( | struct block * | block, | |
| block_sector_t | sector, | |||
| block_sector_t | primary_extended_sector, | |||
| int * | part_nr | |||
| ) | [static] |
Definition at line 51 of file partition.c.
References ASSERT, block_name(), block_read(), BLOCK_SECTOR_SIZE, block_size(), found_partition(), free(), malloc(), NULL, PACKED, PANIC, PRDSNu, and printf().
Referenced by partition_scan().
static struct block_operations partition_operations [static, read] |
1.5.6