udftools

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros | Typedefs | Enumerations | Functions | Variables
wrudf.h File Reference
`#include <sys/time.h>`
`#include <time.h>`
`#include <stdint.h>`
`#include <string.h>`
`#include "ecma_167.h"`
`#include "osta_udf.h"`
`#include "libudffs.h"`
Include dependency graph for wrudf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | generic_desc
struct | _dir_

## Macros
#define | DISK_IMAGE 0xAA
#define | OPT_DUMMY 0x01
#define | OPT_FORCE 0x02
#define | OPT_RECURSIVE 0x04
#define | ABSOLUTE 0xFFFF /* ignore partition, process physical blocknumber */
#define | INVALID 0xFFFFFFFF

## Typedefs
typedef struct _dir_ | Directory

## Enumerations
enum | MEDIUM { CDR = 1, CDRW }
enum | RV { CMND_OK, CMND_FAILED, WRONG_NO_ARGS, CMND_ARG_INVALID, NOT_IN_RW_PARTITION, DIR_INVALID, EXISTING_DIR, EXISTING_FILE, DELETED_DIR, DELETED_FILE, DOES_NOT_EXIST, DIR_NOT_EMPTY, PERMISSION_DENIED, IS_DIRECTORY }
enum | CMND { CMND_CP = 50, CMND_RM, CMND_MKDIR, CMND_RMDIR, CMND_LSC, CMND_LSH, CMND_CDC, CMND_CDH, CMND_QUIT }
enum | markAction { FREE, ALLOC }

## Functions
char * | readLine (char *prompt)
int | updateDirectory (Directory *dir)
Directory * | readDirectory (Directory *parentDir, long_ad *icb, char *name)
int | cpCommand (void)
int | rmCommand (void)
int | mkdirCommand (void)
int | rmdirCommand (void)
int | cdcCommand (void)
int | cdhCommand (void)
int | lscCommand (void)
int | lshCommand (void)
struct fileIdentDesc * | makeFileIdentDesc (char *name)
struct fileIdentDesc * | findFileIdentDesc (Directory *dir, char *name)
int | deleteFID (Directory *dir, struct fileIdentDesc *fid)
int | removeFID (Directory *dir, struct fileIdentDesc *fid)
int | insertFileIdentDesc (Directory *dir, struct fileIdentDesc *fid)
struct fileEntry * | makeFileEntry ()
void | markBlock (enum markAction action, uint32_t blkno)
int | getExtents (uint32_t requestedLength, short_ad *extents)
int | freeShortExtents (short_ad *extent)
int | freeLongExtents (long_ad *extent)
void | getUnallocSpaceExtent (uint32_t requestLength, uint32_t requestAfter, extent_ad *alloc)
void | setChecksum (void *descriptor)
void | updateTimestamp (time_t t, uint32_t ut)
void | setStrictRead (int yes)
uint32_t | getPhysical (uint32_t lbn, uint16_t part)
void | updateSparingTable ()
void * | readBlock (uint32_t lbn, uint16_t part)
void | freeBlock (uint32_t lbn, uint16_t part)
void | dirtyBlock (uint32_t lbn, uint16_t part)
void | writeBlock (uint32_t lbn, uint16_t part, void *src)
void * | readSingleBlock (uint32_t pbn)
void * | readTaggedBlock (uint32_t lbn, uint16_t part)
int | readExtents (char *dest, int usesShort, void *extents)
int | writeExtents (char *src, int usesShort, void *extents)
int | initIO (char *filename)
int | closeIO ()
uint32_t | newVATentry ()
uint32_t | getNWA ()
uint32_t | getMaxVarPktSize ()
uint32_t | writeCDR (void *src)
void | syncCDR ()
void | writeHDlink ()
unsigned char * | readCDR (uint32_t lbn, uint16_t partition)
int | verifyCDR (struct fileEntry *fe)
void | readVATtable ()
void | writeVATtable ()
void | fail (char *fmt,...)

## Variables
char * | hdWorkingDir
int | ignoreReadError
int | device
int | devicetype
enum MEDIUM | medium
uint32_t | trackSize
char | line [256]
regid | entityWRUDF
timestamp | timeStamp
int | cmndc
char ** | cmndv
uint32_t | options
int | spaceMapDirty
int | usdDirty
int | sparingTableDirty
struct logicalVolDesc * | lvd
struct partitionDesc * | pd
uint16_t | virtualPartitionNum
uint32_t * | vat
struct unallocSpaceDesc * | usd
struct spaceBitmapDesc * | spaceMap
struct logicalVolIntegrityDesc * | lvid
struct fileSetDesc * | fsd
unsigned int | usedSparingEntries
struct sparingTable * | st
Directory * | rootDir
Directory * | curDir
int | lastTrack
int | sectortype
struct cdrom_trackinfo | ti

## Macro Definition Documentation

#define ABSOLUTE 0xFFFF /* ignore partition, process physical blocknumber */

Definition at line 146 of file wrudf.h.

#define DISK_IMAGE 0xAA

Definition at line 38 of file wrudf.h.

#define INVALID 0xFFFFFFFF

Definition at line 152 of file wrudf.h.

#define OPT_DUMMY 0x01

Definition at line 70 of file wrudf.h.

#define OPT_FORCE 0x02

Definition at line 71 of file wrudf.h.

#define OPT_RECURSIVE 0x04

Definition at line 72 of file wrudf.h.

## Typedef Documentation

typedef struct _dir_ Directory

## Enumeration Type Documentation

enum CMND

Enumerator
CMND_CP |
CMND_RM |
CMND_MKDIR |
CMND_RMDIR |
CMND_LSC |
CMND_LSH |
CMND_CDC |
CMND_CDH |
CMND_QUIT |

Definition at line 64 of file wrudf.h.

enum markAction

Enumerator
FREE |
ALLOC |

Definition at line 127 of file wrudf.h.

enum MEDIUM

Enumerator
CDR |
CDRW |

Definition at line 40 of file wrudf.h.

enum RV

Enumerator
CMND_OK |
CMND_FAILED |
WRONG_NO_ARGS |
CMND_ARG_INVALID |
NOT_IN_RW_PARTITION |
DIR_INVALID |
EXISTING_DIR |
EXISTING_FILE |
DELETED_DIR |
DELETED_FILE |
DOES_NOT_EXIST |
DIR_NOT_EMPTY |
PERMISSION_DENIED |
IS_DIRECTORY |

Definition at line 60 of file wrudf.h.

## Function Documentation

int cdcCommand | ( | void |  | ) |

Definition at line 948 of file wrudf-cmnd.c.

int cdhCommand | ( | void |  | ) |

Definition at line 1022 of file wrudf-cmnd.c.

int closeIO | ( |  | ) |

Definition at line 927 of file wrudf-cdrw.c.

int cpCommand | ( | void |  | ) |

Definition at line 763 of file wrudf-cmnd.c.

int deleteFID | ( | Directory * | dir,
|  | struct fileIdentDesc * | fid
| ) |  |

Definition at line 49 of file wrudf-desc.c.

void dirtyBlock | ( | uint32_t | lbn,
|  | uint16_t | part
| ) |  |

Definition at line 610 of file wrudf-cdrw.c.

void fail | ( | char * | fmt,
|  |  | ...
| ) |  |

Definition at line 43 of file ide-pc.c.

struct fileIdentDesc* findFileIdentDesc | ( | Directory * | dir,
|  | char * | name
| ) |  |

Definition at line 113 of file wrudf-desc.c.

void freeBlock | ( | uint32_t | lbn,
|  | uint16_t | part
| ) |  |

Definition at line 592 of file wrudf-cdrw.c.

int freeLongExtents | ( | long_ad * | extent | ) |

Definition at line 176 of file wrudf-cdrw.c.

int freeShortExtents | ( | short_ad * | extent | ) |

Definition at line 159 of file wrudf-cdrw.c.

int getExtents | ( | uint32_t | requestedLength,
|  | short_ad * | extents
| ) |  |

Definition at line 98 of file wrudf-cdrw.c.

uint32_t getMaxVarPktSize | ( |  | ) |

Definition at line 48 of file wrudf-cdr.c.

uint32_t getNWA | ( |  | ) |

Definition at line 35 of file wrudf-cdr.c.

uint32_t getPhysical | ( | uint32_t | lbn,
|  | uint16_t | part
| ) |  |

Definition at line 290 of file wrudf-cdrw.c.

void getUnallocSpaceExtent | ( | uint32_t | requestLength,
|  | uint32_t | requestAfter,
|  | extent_ad * | alloc
| ) |  |

Definition at line 198 of file wrudf-cdrw.c.

int initIO | ( | char * | filename | ) |

Definition at line 779 of file wrudf-cdrw.c.

int insertFileIdentDesc | ( | Directory * | dir,
|  | struct fileIdentDesc * | fid
| ) |  |

Definition at line 211 of file wrudf-desc.c.

int lscCommand | ( | void |  | ) |

Definition at line 964 of file wrudf-cmnd.c.

int lshCommand | ( | void |  | ) |

Definition at line 1039 of file wrudf-cmnd.c.

struct fileEntry* makeFileEntry | ( |  | ) |

Definition at line 158 of file wrudf-desc.c.

struct fileIdentDesc* makeFileIdentDesc | ( | char * | name | ) |

Definition at line 187 of file wrudf-desc.c.

void markBlock | ( | enum markAction | action,
|  | uint32_t | blkno
| ) |  |

Definition at line 74 of file wrudf-cdrw.c.

int mkdirCommand | ( | void |  | ) |

Definition at line 891 of file wrudf-cmnd.c.

uint32_t newVATentry | ( |  | ) |

Definition at line 22 of file wrudf-cdr.c.

void* readBlock | ( | uint32_t | lbn,
|  | uint16_t | part
| ) |  |

Definition at line 543 of file wrudf-cdrw.c.

unsigned char* readCDR | ( | uint32_t | lbn,
|  | uint16_t | partition
| ) |  |

Definition at line 59 of file wrudf-cdr.c.

Directory* readDirectory | ( | Directory * | parentDir,
|  | long_ad * | icb,
|  | char * | name
| ) |  |

Definition at line 383 of file wrudf-cmnd.c.

int readExtents | ( | char * | dest,
|  | int | usesShort,
|  | void * | extents
| ) |  |

Definition at line 684 of file wrudf-cdrw.c.

char* readLine | ( | char * | prompt | ) |

Definition at line 79 of file wrudf.c.

void* readSingleBlock | ( | uint32_t | pbn | ) |

Definition at line 564 of file wrudf-cdrw.c.

void* readTaggedBlock | ( | uint32_t | lbn,
|  | uint16_t | part
| ) |  |

Definition at line 639 of file wrudf-cdrw.c.

void readVATtable | ( |  | ) |

Definition at line 283 of file wrudf-cdr.c.

int removeFID | ( | Directory * | dir,
|  | struct fileIdentDesc * | fid
| ) |  |

Definition at line 31 of file wrudf-desc.c.

int rmCommand | ( | void |  | ) |

Definition at line 859 of file wrudf-cmnd.c.

int rmdirCommand | ( | void |  | ) |

Definition at line 924 of file wrudf-cmnd.c.

void setChecksum | ( | void * | descriptor | ) |

Definition at line 229 of file wrudf-cdrw.c.

void setStrictRead | ( | int | yes | ) |

Definition at line 270 of file wrudf-cdrw.c.

void syncCDR | ( |  | ) |

Definition at line 96 of file wrudf-cdr.c.

int updateDirectory | ( | Directory * | dir | ) |

Definition at line 453 of file wrudf-cmnd.c.

void updateSparingTable | ( |  | ) |

Definition at line 371 of file wrudf-cdrw.c.

void updateTimestamp | ( | time_t | t,
|  | uint32_t | ut
| ) |  |

Definition at line 243 of file wrudf-cdrw.c.

int verifyCDR | ( | struct fileEntry * | fe | ) |

Definition at line 200 of file wrudf-cdr.c.

void writeBlock | ( | uint32_t | lbn,
|  | uint16_t | part,
|  | void * | src
| ) |  |

Definition at line 625 of file wrudf-cdrw.c.

uint32_t writeCDR | ( | void * | src | ) |

Definition at line 121 of file wrudf-cdr.c.

int writeExtents | ( | char * | src,
|  | int | usesShort,
|  | void * | extents
| ) |  |

Definition at line 733 of file wrudf-cdrw.c.

void writeHDlink | ( |  | ) |

Definition at line 107 of file wrudf-cdr.c.

void writeVATtable | ( |  | ) |

Definition at line 309 of file wrudf-cdr.c.

## Variable Documentation

int cmndc

Definition at line 32 of file wrudf.c.

char** cmndv

Definition at line 34 of file wrudf.c.

Directory * curDir

Definition at line 48 of file wrudf.c.

int device

Definition at line 18 of file wrudf.c.

int devicetype

Definition at line 19 of file wrudf.c.

regid entityWRUDF

Definition at line 50 of file wrudf.c.

struct fileSetDesc* fsd

Definition at line 72 of file wrudf.c.

char* hdWorkingDir

Definition at line 37 of file wrudf-cmnd.c.

int ignoreReadError

Definition at line 21 of file wrudf.c.

int lastTrack

Definition at line 49 of file wrudf-cdrw.c.

char line[256]

Definition at line 27 of file wrudf.c.

struct logicalVolDesc* lvd

Definition at line 68 of file wrudf.c.

struct logicalVolIntegrityDesc* lvid

Definition at line 71 of file wrudf.c.

enum MEDIUM medium

Definition at line 20 of file wrudf.c.

uint32_t options

Definition at line 45 of file wrudf.c.

struct partitionDesc* pd

Definition at line 62 of file wrudf.c.

Directory* rootDir

Definition at line 48 of file wrudf.c.

int sectortype

Definition at line 63 of file wrudf-cdrw.c.

struct spaceBitmapDesc* spaceMap

Definition at line 70 of file wrudf.c.

int spaceMapDirty

Definition at line 76 of file wrudf.c.

int sparingTableDirty

Definition at line 76 of file wrudf.c.

struct sparingTable* st

Definition at line 74 of file wrudf.c.

struct cdrom_trackinfo ti

Definition at line 50 of file wrudf-cdrw.c.

timestamp timeStamp

Definition at line 49 of file wrudf.c.

uint32_t trackSize

Definition at line 62 of file wrudf-cdrw.c.

struct unallocSpaceDesc* usd

Definition at line 69 of file wrudf.c.

int usdDirty

Definition at line 76 of file wrudf.c.

unsigned int usedSparingEntries

Definition at line 73 of file wrudf.c.

uint32_t* vat

Definition at line 64 of file wrudf.c.

uint16_t virtualPartitionNum

Definition at line 63 of file wrudf.c.