KallistiOS  ##version##
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Data Structures | Typedefs
blockdev.h File Reference

Definitions for a simple block device interface. More...

#include <sys/cdefs.h>
#include <stdint.h>
#include <sys/types.h>

Go to the source code of this file.

Data Structures

struct  kos_blockdev
 A simple block device. More...
 

Typedefs

typedef struct kos_blockdev kos_blockdev_t
 A simple block device. More...
 

Detailed Description

Definitions for a simple block device interface.

This file contains the definition of a very simple block device that is to be used with filesystems in the kernel. This device interface is designed to abstract away direct hardware access and make it easier to interface the various filesystems that we may add support for to multiple potential devices.

The most common of these devices that people are probably interested in directly would be the Dreamcast SD card reader, and that was indeed the primary impetus to this device structure. However, it could also be used to support a file-based disk image or any number of other devices.

Author
Lawrence Sebald

Typedef Documentation

typedef struct kos_blockdev kos_blockdev_t

A simple block device.

This structure represents a single block device. Each block device should be associated with exactly one filesystem and is used to actually read the data from the disk (or other device) where it is stored.

By using a block device with any new filesystems, we can abstract away a few things so that filesystems can be used with a variety of different "devices", such as the SD card reader for the Dreamcast or a disk image file of some sort.