ArvernOS
Loading...
Searching...
No Matches
tar.h File Reference
#include <fs/vfs.h>
Include dependency graph for tar.h:

Data Structures

struct  tar_header_t

Functions

int tar_fs_init ()
inode_t tar_fs_create (uintptr_t address)

Detailed Description

Tar works by concatenating all files together in one big file where each file gets a header that is padded up to 512 bytes. The headers are each aligned on a 512 byte boundry and the content follows directly afterwards.

Function Documentation

◆ tar_fs_create()

inode_t tar_fs_create ( uintptr_t address)

Creates a TAR-based read-only file system root node.

This function creates a TAR-based read-only file system by reading an archive stored in memory at the address specified as first argument. This file system can have directories and files. The archive used is also called a (init) "ram disk" because the GRUB will load the entire archive in memory.

Parameters
addressthe memory address where the TAR archive is located
Returns
the root inode of the tar file system

◆ tar_fs_init()

int tar_fs_init ( )

Mounts the initial ram disk as the root ("/") file system.

The location of the archive is read from the boot information. When there is no initial ram disk, the function does nothing and succeeds.

Returns
0 on success