# fs_inode.c File Reference

## Detailed Description

Contains functions to allocate, free, and process the generic inode structures.

`#include "fs_tools_i.h"`

## Functions

TSK_FS_INODE * | tsk_fs_inode_alloc (int direct_count, int indir_count)
| Allocates a generic inode / metadata structure.
TSK_FS_INODE * | tsk_fs_inode_realloc (TSK_FS_INODE *fs_inode, int direct_count, int indir_count)
| Resize an existing FS_INODE structure -- changes the number of block pointers.
void | tsk_fs_inode_free (TSK_FS_INODE *fs_inode)
| Free the memory allocated to the FS_INODE structure.

## Variables

char | tsk_fs_inode_mode_str [TSK_FS_INODE_MODE_TYPE_STR_MAX][2]
| Contains the short (1 character) name of the file type.

## Function Documentation

TSK_FS_INODE* tsk_fs_inode_alloc | ( | int | direct_count,
|  | int | indir_count
| ) |

Allocates a generic inode / metadata structure.

Parameters:

  | direct_count | Number of direct block address pointers to include in structure
  | indir_count | Number of indirect block address pointers to include in structure

Returns:
  NULL on error

void tsk_fs_inode_free | ( | TSK_FS_INODE * | fs_inode | ) |

Free the memory allocated to the FS_INODE structure.

Parameters:

  | fs_inode | Structure to free

TSK_FS_INODE* tsk_fs_inode_realloc | ( | TSK_FS_INODE * | fs_inode,
|  | int | direct_count,
|  | int | indir_count
| ) |

Resize an existing FS_INODE structure -- changes the number of block pointers.

Parameters:

  | fs_inode | Structure to resize
  | direct_count | Number of direct block address pointers to include in structure
  | indir_count | Number of indirect block address pointers to include in structure

Returns:
  NULL on error

## Variable Documentation

char tsk_fs_inode_mode_str[TSK_FS_INODE_MODE_TYPE_STR_MAX][2]

Initial value:

        { "-", "p", "c", "", "d", "", "b", "", "-", "",
        "l", "", "s", "h", "w"
    }

Contains the short (1 character) name of the file type.