Debugging, tar, and other miscellaneous functions.
More...
Debugging, tar, and other miscellaneous functions.
void hexdump |
( |
void * |
buffer, |
|
|
ulong |
length, |
|
|
bool |
canon |
|
) |
| |
Dump a buffer of given length to stdout.
- Parameters
-
*buffer | buffer to print out data in |
length | length of buffer to print |
canon | canonical representation (hex+ASCII) |
int tarFilesize |
( |
char * |
octalsize | ) |
|
Decode the filesize of a tar file. Filesize is stored as an octal string.
- Parameters
-
octalsize | string 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
-
file | pointer to tar header of file |
buffer | buffer to store data in |
size | size 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
-
archive | tar file to process |
filename | name 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
-
file | pointer 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
-
archive | pointer to archive data |
filelist | pointer to string array for list of files |
nentries | number of entries in filelist array |
- Returns
- number of file entries found
Print system completion message as last thread exits.