SMREmulator 1.0
ShingledMagneticRecordingEmulator

ediversion.c File Reference

Implements the Emulator Versioning subsystem. More...

#include <stdlib.h>
#include <string.h>
#include <ediversion.h>

Go to the source code of this file.

Functions

edi_vops_t * ediv0_init ()
 Initializes the EDIv0 code base.
int ediv_init ()
 Initializes the Emulator Versioning Module.
int ediv_is_valid (uint32_t version)
 Returns if the specified version is valid.

Detailed Description

Implements the Emulator Versioning subsystem.

TODO Come up with a better design for registering new versions.

Author:
Anand Suresh <anandsuresh@cmu.edu>

Definition in file ediversion.c.


Function Documentation

edi_vops_t* ediv0_init ( )

Initializes the EDIv0 code base.

Returns:
Pointer to the EDIv0 Call-back Function Set

Definition at line 505 of file ediv0.c.

Referenced by ediv_init().

int ediv_init ( )

Initializes the Emulator Versioning Module.

This function initializes the data structures required by the Emulator Versioning Module and then calls the initialization functions for each of the registered versions.

Returns:
0 on success; -1 on failure registering any version

Definition at line 34 of file ediversion.c.

References ediv0_init(), and MAX_EDI_VERSION.

Referenced by edi_init().

int ediv_is_valid ( uint32_t  version)

Returns if the specified version is valid.

Parameters:
versionThe version number to be verified
Returns:
1 on success; 0 on failure

Definition at line 68 of file ediversion.c.

References MAX_EDI_VERSION.

Referenced by edi_create(), and edi_open().