SMREmulator 1.0
ShingledMagneticRecordingEmulator
|
Defines the Macros, data types and function prototypes pertaining to the Emulated Disk Image file. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | edi_ident_t |
Defines the structure of the header file for a disk image. More... | |
Defines | |
#define | OFF_HEADER sizeof(edi_ident_t) |
Defines the file offset at which the EDI Header should start. | |
Functions | |
int | edi_create (const char *, uint32_t,...) |
Creates a new EDI file based on the parameters specified. | |
int | edi_dump (int) |
Dumps the metadata for the specified EDI file. |
Defines the Macros, data types and function prototypes pertaining to the Emulated Disk Image file.
Definition in file emudiskimg.h.
int edi_create | ( | const char * | filename, |
uint32_t | version, | ||
... | |||
) |
Creates a new EDI file based on the parameters specified.
filename | The name of the new EDI file |
version | The EDI format version to use for creating the new EDI file |
... | Version specific parameters |
Error Codes:
Other than the above, the function also returns the error codes returned by open(), pwrite() and the create() function for the specific EDI version.
Definition at line 82 of file emudiskimg.c.
References EDI_MAGIC_NUMBER, and ediv_is_valid().
int edi_dump | ( | int | fd | ) |
Dumps the metadata for the specified EDI file.
Calling this function sends output to stdout. All metadata for the specified EDI file is printed, including the version, block size, band count, and the write pointers for each band.
fd | The file descriptor index returned by edi_open() |
Error Codes:
Definition at line 164 of file emudiskimg.c.