The Sleuth Kit  4.12.1
Macros | Typedefs | Functions
hfs.c File Reference

Contains the general internal TSK HFS metadata and data unit code. More...

#include "tsk_fs_i.h"
#include "tsk_hfs.h"
#include "decmpfs.h"
#include <stdarg.h>
#include <strings.h>
#include "lzvn.h"

Macros

#define HFS_PRINT_WIDTH   8
 
#define XSWAP(a, b)   { a ^= b; b ^= a; a ^= b; }
 

Typedefs

typedef struct RES_DESCRIPTOR RES_DESCRIPTOR
 

Functions

void error_detected (uint32_t errnum, const char *errstr,...)
 Call this when an error is first detected. More...
 
void error_returned (const char *errstr,...)
 Call this when a called TSK function returns an error. More...
 
void free_res_descriptor (RES_DESCRIPTOR *rd)
 
TSK_FS_BLOCK_FLAG_ENUM hfs_block_getflags (TSK_FS_INFO *a_fs, TSK_DADDR_T a_addr)
 
int hfs_cat_compare_keys (HFS_INFO *hfs, const hfs_btree_key_cat *key1, int keylen1, const hfs_btree_key_cat *key2)
 
uint8_t hfs_cat_file_lookup (HFS_INFO *hfs, TSK_INUM_T inum, HFS_ENTRY *entry, unsigned char follow_hard_link)
 
uint8_t hfs_cat_read_file_folder_record (HFS_INFO *hfs, TSK_OFF_T off, hfs_file_folder *record)
 
uint8_t hfs_cat_read_thread_record (HFS_INFO *hfs, TSK_OFF_T off, hfs_thread *thread)
 
uint8_t hfs_cat_traverse (HFS_INFO *hfs, TSK_HFS_BTREE_CB a_cb, void *ptr)
 
uint8_t hfs_checked_read_random (TSK_FS_INFO *fs, char *buf, size_t len, TSK_OFF_T offs)
 
uint32_t hfs_convert_2_unix_time (uint32_t hfsdate)
 
TSK_INUM_T hfs_follow_hard_link (HFS_INFO *hfs, hfs_file *cat, unsigned char *is_error)
 
uint16_t hfs_get_idxkeylen (HFS_INFO *hfs, uint16_t keylen, const hfs_btree_header_record *header)
 
char * hfs_get_inode_name (TSK_FS_INFO *fs, TSK_INUM_T inum)
 
uint8_t hfs_inode_walk (TSK_FS_INFO *fs, TSK_INUM_T start_inum, TSK_INUM_T end_inum, TSK_FS_META_FLAG_ENUM flags, TSK_FS_META_WALK_CB action, void *ptr)
 
TSK_FS_INFOhfs_open (TSK_IMG_INFO *img_info, TSK_OFF_T offset, TSK_FS_TYPE_ENUM ftype, uint8_t test)
 

Detailed Description

Contains the general internal TSK HFS metadata and data unit code.

Function Documentation

void error_detected ( uint32_t  errnum,
const char *  errstr,
  ... 
)

Call this when an error is first detected.

It sets the error code and it also sets the primary error string, describing the lowest level of error. (Actually, it appends to the error string.)

If the error code is already set, then this appends to the primary error string an hex representation of the new error code, plus the new error message.

Parameters
errnumThe desired error code
errstrThe format string for the error message
void error_returned ( const char *  errstr,
  ... 
)

Call this when a called TSK function returns an error.

Presumably, that function will have set the error code and the primary error string. This appends to the secondary error string. It should be called to describe the context of the call. If no error code has been set, then this sets a default code so that it is not zero.

Parameters
errstrThe format string for the error message

Copyright © 2007-2020 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.