Embedded Xinu Operating System
An ongoing research project and educational operating system.
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Groups Pages
Functions
Miscellaneous

Debugging, tar, and other miscellaneous functions. More...

Functions

void hexdump (void *buffer, ulong length, bool canon)
 
int tarListFiles (struct tar *archive, char *filelist, int nentries)
 
struct tar * tarGetFile (struct tar *archive, char *filename)
 
int tarGetFilesize (struct tar *file)
 
int tarGetData (struct tar *file, char *buffer, uint size)
 
int tarFilesize (char *octalsize)
 
void xdone (void)
 

Detailed Description

Debugging, tar, and other miscellaneous functions.

Function Documentation

void hexdump ( void *  buffer,
ulong  length,
bool  canon 
)

Dump a buffer of given length to stdout.

Parameters
*bufferbuffer to print out data in
lengthlength of buffer to print
canoncanonical representation (hex+ASCII)
int tarFilesize ( char *  octalsize)

Decode the filesize of a tar file. Filesize is stored as an octal string.

Parameters
octalsizestring holding size stored in octal
Returns
size of file
int tarGetData ( struct tar *  file,
char *  buffer,
uint  size 
)

Given a pointer to the tar header of a file, fill buffer with data stored in the file.

Parameters
filepointer to tar header of file
bufferbuffer to store data in
sizesize of buffer
Returns
number of bytes copied into buffer
struct tar* tarGetFile ( struct tar *  archive,
char *  filename 
)

Get a pointer to a specific file in a tar format file.

Parameters
archivetar file to process
filenamename of file
Returns
pointer to tar header of filename
int tarGetFilesize ( struct tar *  file)

Given a pointer to the tar header of a file, get the size of the file.

Parameters
filepointer to tar header of file
Returns
size of file
int tarListFiles ( struct tar *  archive,
char *  filelist,
int  nentries 
)

Get a listing of filenames stored in a tar file.

Parameters
archivepointer to archive data
filelistpointer to string array for list of files
nentriesnumber of entries in filelist array
Returns
number of file entries found
void xdone ( void  )

Print system completion message as last thread exits.