|
Flash Translation Layer
1.0
|
implementation of the ramdisk which is inherited by the device More...
#include <fcntl.h>#include <pthread.h>#include <stdlib.h>#include <stdint.h>#include <errno.h>#include <string.h>#include <unistd.h>#include "include/flash.h"#include "include/ramdisk.h"#include "include/device.h"#include "include/log.h"#include "include/bits.h"
Functions | |
| int | ramdisk_open (struct device *dev, const char *name, int flags) |
| open the ramdisk (allocate the device resources) More... | |
| ssize_t | ramdisk_write (struct device *dev, struct device_request *request) |
| write to the ramdisk More... | |
| ssize_t | ramdisk_read (struct device *dev, struct device_request *request) |
| read from the ramdisk More... | |
| int | ramdisk_erase (struct device *dev, struct device_request *request) |
| erase a segment More... | |
| int | ramdisk_close (struct device *dev) |
| close the ramdisk More... | |
| int | ramdisk_device_init (struct device *dev, uint64_t flags) |
| initialize the device and ramdisk module More... | |
| int | ramdisk_device_exit (struct device *dev) |
| deallocate the device module More... | |
Variables | |
| const struct device_operations | __ramdisk_dops |
| ramdisk operations More... | |
implementation of the ramdisk which is inherited by the device
| int ramdisk_close | ( | struct device * | dev | ) |
close the ramdisk
| dev | pointer of the device structure |
| int ramdisk_device_exit | ( | struct device * | dev | ) |
deallocate the device module
| dev | pointer of the device structure |

| int ramdisk_device_init | ( | struct device * | dev, |
| uint64_t | flags | ||
| ) |
initialize the device and ramdisk module
| dev | pointer of the device structure |
| flags | flags for ramdisk and device |

| int ramdisk_erase | ( | struct device * | dev, |
| struct device_request * | request | ||
| ) |
erase a segment
| dev | pointer of the device structure |
| request | pointer of the device request structure |

| int ramdisk_open | ( | struct device * | dev, |
| const char * | name, | ||
| int | flags | ||
| ) |
open the ramdisk (allocate the device resources)
| dev | pointer of the device structure |
| name | this does not use in this module |
| flags | open flags for ramdisk |
< This for make 4GiB disk

| ssize_t ramdisk_read | ( | struct device * | dev, |
| struct device_request * | request | ||
| ) |
read from the ramdisk
| dev | pointer of the device structure |
| request | pointer of the device request structure |

| ssize_t ramdisk_write | ( | struct device * | dev, |
| struct device_request * | request | ||
| ) |
write to the ramdisk
| dev | pointer of the device structure |
| request | pointer of the device request structure |

| const struct device_operations __ramdisk_dops |
ramdisk operations
1.8.13