OpenCore
1.0.4
OpenCore Bootloader
|
#include "fsw_base.h"
Go to the source code of this file.
Data Structures | |
struct | fsw_string |
struct | fsw_blockcache |
struct | fsw_volume |
struct | fsw_dnode |
struct | fsw_extent |
struct | fsw_shandle |
struct | fsw_volume_stat |
struct | fsw_dnode_stat |
struct | fsw_host_table |
struct | fsw_fstype_table |
Macros | |
#define | FSW_PATH_MAX (4096) |
#define | FSW_CONCAT3(a, b, c) |
#define | FSW_FSTYPE_TABLE_NAME(t) |
#define | FSW_INVALID_BNO (~0U) |
Posix Mode Macros | |
These macros can be used globally to test fields and bits in Posix-style modes. Taken from FreeBSD sys/stat.h. | |
#define | S_ISUID 0004000 /* set user id on execution */ |
#define | S_ISGID 0002000 /* set group id on execution */ |
#define | S_ISTXT 0001000 /* sticky bit */ |
#define | S_IRWXU 0000700 /* RWX mask for owner */ |
#define | S_IRUSR 0000400 /* R for owner */ |
#define | S_IWUSR 0000200 /* W for owner */ |
#define | S_IXUSR 0000100 /* X for owner */ |
#define | S_IRWXG 0000070 /* RWX mask for group */ |
#define | S_IRGRP 0000040 /* R for group */ |
#define | S_IWGRP 0000020 /* W for group */ |
#define | S_IXGRP 0000010 /* X for group */ |
#define | S_IRWXO 0000007 /* RWX mask for other */ |
#define | S_IROTH 0000004 /* R for other */ |
#define | S_IWOTH 0000002 /* W for other */ |
#define | S_IXOTH 0000001 /* X for other */ |
#define | S_IFMT 0170000 /* type of file mask */ |
#define | S_IFIFO 0010000 /* named pipe (fifo) */ |
#define | S_IFCHR 0020000 /* character special */ |
#define | S_IFDIR 0040000 /* directory */ |
#define | S_IFBLK 0060000 /* block special */ |
#define | S_IFREG 0100000 /* regular */ |
#define | S_IFLNK 0120000 /* symbolic link */ |
#define | S_IFSOCK 0140000 /* socket */ |
#define | S_ISVTX 0001000 /* save swapped text even after use */ |
#define | S_IFWHT 0160000 /* whiteout */ |
#define | S_ISDIR(m) |
#define | S_ISCHR(m) |
#define | S_ISBLK(m) |
#define | S_ISREG(m) |
#define | S_ISFIFO(m) |
#define | S_ISLNK(m) |
#define | S_ISSOCK(m) |
#define | S_ISWHT(m) |
#define | S_BLKSIZE 512 /* block size used in the stat struct */ |
Functions | |
Volume Functions | |
fsw_status_t | fsw_mount (void *host_data, struct fsw_host_table *host_table, struct fsw_fstype_table *fstype_table, struct fsw_volume **vol_out) |
void | fsw_unmount (struct fsw_volume *vol) |
fsw_status_t | fsw_volume_stat (struct fsw_volume *vol, struct fsw_volume_stat *sb) |
void | fsw_set_blocksize (struct VOLSTRUCTNAME *vol, fsw_u32 phys_blocksize, fsw_u32 log_blocksize) |
fsw_status_t | fsw_block_get (struct VOLSTRUCTNAME *vol, fsw_u32 phys_bno, fsw_u32 cache_level, void **buffer_out) |
void | fsw_block_release (struct VOLSTRUCTNAME *vol, fsw_u32 phys_bno, void *buffer) |
dnode Functions | |
fsw_status_t | fsw_dnode_create_root (struct VOLSTRUCTNAME *vol, fsw_u32 dnode_id, struct DNODESTRUCTNAME **dno_out) |
fsw_status_t | fsw_dnode_create (struct VOLSTRUCTNAME *vol, struct DNODESTRUCTNAME *parent_dno, fsw_u32 dnode_id, int type, struct fsw_string *name, struct DNODESTRUCTNAME **dno_out) |
void | fsw_dnode_mkcomplete (struct DNODESTRUCTNAME *dno) |
int | fsw_dnode_is_root (struct fsw_dnode *dno) |
void | fsw_dnode_retain (struct fsw_dnode *dno) |
void | fsw_dnode_release (struct fsw_dnode *dno) |
fsw_status_t | fsw_dnode_fill (struct fsw_dnode *dno) |
fsw_status_t | fsw_dnode_stat (struct fsw_dnode *dno, struct fsw_dnode_stat *sb) |
fsw_status_t | fsw_dnode_lookup (struct fsw_dnode *dno, struct fsw_string *lookup_name, struct fsw_dnode **child_dno_out) |
fsw_status_t | fsw_dnode_lookup_path (struct fsw_dnode *dno, struct fsw_string *lookup_path, char separator, struct fsw_dnode **child_dno_out) |
fsw_status_t | fsw_dnode_dir_read (struct fsw_shandle *shand, struct fsw_dnode **child_dno_out) |
fsw_status_t | fsw_dnode_readlink (struct fsw_dnode *dno, struct fsw_string *link_target) |
fsw_status_t | fsw_dnode_readlink_data (struct DNODESTRUCTNAME *dno, struct fsw_string *link_target) |
fsw_status_t | fsw_dnode_resolve (struct fsw_dnode *dno, struct fsw_dnode **target_dno_out) |
fsw_status_t | fsw_dnode_get_path (struct VOLSTRUCTNAME *vol, struct DNODESTRUCTNAME *dno, struct fsw_string *out_path) |
fsw_status_t | fsw_get_bless_info (struct VOLSTRUCTNAME *vol, int type, struct fsw_string *out_path) |
shandle Functions | |
fsw_status_t | fsw_shandle_open (struct DNODESTRUCTNAME *dno, struct fsw_shandle *shand) |
void | fsw_shandle_close (struct fsw_shandle *shand) |
fsw_status_t | fsw_shandle_read (struct fsw_shandle *shand, fsw_u32 *buffer_size_inout, void *buffer) |
Memory Functions | |
fsw_status_t | fsw_alloc_zero (int len, void **ptr_out) |
fsw_status_t | fsw_memdup (void **dest_out, void *src, int len) |
String Functions | |
int | fsw_strlen (struct fsw_string *s) |
int | fsw_strsize (struct fsw_string *s) |
void * | fsw_strdata (struct fsw_string *s) |
int | fsw_streq (struct fsw_string *s1, struct fsw_string *s2) |
int | fsw_streq_cstr (struct fsw_string *s1, const char *s2) |
fsw_status_t | fsw_strdup_coerce (struct fsw_string *dest, int type, struct fsw_string *src) |
void | fsw_strsplit (struct fsw_string *lookup_name, struct fsw_string *buffer, char separator) |
void | fsw_strfree (struct fsw_string *s) |
Core file system wrapper abstraction layer header.
Definition in file fsw_core.h.
#define DNODESTRUCTNAME fsw_dnode |
Definition at line 144 of file fsw_core.h.
#define FSW_CONCAT3 | ( | a, | |
b, | |||
c ) |
#define FSW_FSTYPE_TABLE_NAME | ( | t | ) |
Expands to the name of a fstype dispatch table (fsw_fstype_table) for a named file system type.
Definition at line 53 of file fsw_core.h.
#define FSW_INVALID_BNO (~0U) |
Indicates that the block cache entry is empty.
Definition at line 56 of file fsw_core.h.
#define FSW_PATH_MAX (4096) |
Maximum size for a path, specifically symlink target paths.
Definition at line 48 of file fsw_core.h.
#define FSW_STRING_INIT { FSW_STRING_TYPE_EMPTY, 0, 0, NULL } |
Static initializer for an empty string.
Definition at line 201 of file fsw_core.h.
#define FSW_STRING_TYPE_UTF16_BE FSW_STRING_TYPE_UTF16 |
Definition at line 197 of file fsw_core.h.
#define FSW_STRING_TYPE_UTF16_LE FSW_STRING_TYPE_UTF16_SWAPPED |
Definition at line 196 of file fsw_core.h.
#define FSW_SWAPVALUE_U16 | ( | v | ) |
Definition at line 77 of file fsw_core.h.
#define FSW_SWAPVALUE_U32 | ( | v | ) |
#define FSW_SWAPVALUE_U64 | ( | v | ) |
Definition at line 83 of file fsw_core.h.
#define S_BLKSIZE 512 /* block size used in the stat struct */ |
Definition at line 527 of file fsw_core.h.
#define S_IFBLK 0060000 /* block special */ |
Definition at line 511 of file fsw_core.h.
#define S_IFCHR 0020000 /* character special */ |
Definition at line 509 of file fsw_core.h.
#define S_IFDIR 0040000 /* directory */ |
Definition at line 510 of file fsw_core.h.
#define S_IFIFO 0010000 /* named pipe (fifo) */ |
Definition at line 508 of file fsw_core.h.
#define S_IFLNK 0120000 /* symbolic link */ |
Definition at line 513 of file fsw_core.h.
#define S_IFMT 0170000 /* type of file mask */ |
Definition at line 507 of file fsw_core.h.
#define S_IFREG 0100000 /* regular */ |
Definition at line 512 of file fsw_core.h.
#define S_IFSOCK 0140000 /* socket */ |
Definition at line 514 of file fsw_core.h.
#define S_IFWHT 0160000 /* whiteout */ |
Definition at line 516 of file fsw_core.h.
#define S_IRGRP 0000040 /* R for group */ |
Definition at line 498 of file fsw_core.h.
#define S_IROTH 0000004 /* R for other */ |
Definition at line 503 of file fsw_core.h.
#define S_IRUSR 0000400 /* R for owner */ |
Definition at line 493 of file fsw_core.h.
#define S_IRWXG 0000070 /* RWX mask for group */ |
Definition at line 497 of file fsw_core.h.
#define S_IRWXO 0000007 /* RWX mask for other */ |
Definition at line 502 of file fsw_core.h.
#define S_IRWXU 0000700 /* RWX mask for owner */ |
Definition at line 492 of file fsw_core.h.
#define S_ISBLK | ( | m | ) |
Definition at line 520 of file fsw_core.h.
#define S_ISCHR | ( | m | ) |
Definition at line 519 of file fsw_core.h.
#define S_ISDIR | ( | m | ) |
Definition at line 518 of file fsw_core.h.
#define S_ISFIFO | ( | m | ) |
Definition at line 522 of file fsw_core.h.
#define S_ISGID 0002000 /* set group id on execution */ |
Definition at line 489 of file fsw_core.h.
#define S_ISLNK | ( | m | ) |
Definition at line 523 of file fsw_core.h.
#define S_ISREG | ( | m | ) |
Definition at line 521 of file fsw_core.h.
#define S_ISSOCK | ( | m | ) |
Definition at line 524 of file fsw_core.h.
#define S_ISTXT 0001000 /* sticky bit */ |
Definition at line 490 of file fsw_core.h.
#define S_ISUID 0004000 /* set user id on execution */ |
Definition at line 488 of file fsw_core.h.
#define S_ISVTX 0001000 /* save swapped text even after use */ |
Definition at line 515 of file fsw_core.h.
#define S_ISWHT | ( | m | ) |
Definition at line 525 of file fsw_core.h.
#define S_IWGRP 0000020 /* W for group */ |
Definition at line 499 of file fsw_core.h.
#define S_IWOTH 0000002 /* W for other */ |
Definition at line 504 of file fsw_core.h.
#define S_IWUSR 0000200 /* W for owner */ |
Definition at line 494 of file fsw_core.h.
#define S_IXGRP 0000010 /* X for group */ |
Definition at line 500 of file fsw_core.h.
#define S_IXOTH 0000001 /* X for other */ |
Definition at line 505 of file fsw_core.h.
#define S_IXUSR 0000100 /* X for owner */ |
Definition at line 495 of file fsw_core.h.
#define VOLSTRUCTNAME fsw_volume |
Definition at line 139 of file fsw_core.h.
typedef int fsw_status_t |
Status code type, returned from all functions that can fail.
Definition at line 153 of file fsw_core.h.
typedef fsw_u16 fsw_u16_be |
Definition at line 71 of file fsw_core.h.
typedef fsw_u16 fsw_u16_le |
Definition at line 70 of file fsw_core.h.
typedef fsw_u32 fsw_u32_be |
Definition at line 73 of file fsw_core.h.
typedef fsw_u32 fsw_u32_le |
Definition at line 72 of file fsw_core.h.
typedef fsw_u64 fsw_u64_be |
Definition at line 75 of file fsw_core.h.
typedef fsw_u64 fsw_u64_le |
Definition at line 74 of file fsw_core.h.
anonymous enum |
Possible status codes.
Enumerator | |
---|---|
FSW_SUCCESS | |
FSW_OUT_OF_MEMORY | |
FSW_IO_ERROR | |
FSW_UNSUPPORTED | |
FSW_NOT_FOUND | |
FSW_VOLUME_CORRUPTED | |
FSW_UNKNOWN_ERROR |
Definition at line 158 of file fsw_core.h.
anonymous enum |
Possible string types / encodings. In the case of FSW_STRING_TYPE_EMPTY, all other members of the fsw_string structure may be invalid.
Enumerator | |
---|---|
FSW_STRING_TYPE_EMPTY | |
FSW_STRING_TYPE_ISO88591 | |
FSW_STRING_TYPE_UTF8 | |
FSW_STRING_TYPE_UTF16 | |
FSW_STRING_TYPE_UTF16_SWAPPED |
Definition at line 184 of file fsw_core.h.
anonymous enum |
Possible dnode types. FSW_DNODE_TYPE_UNKNOWN may only be used before fsw_dnode_fill has been called on the dnode.
Enumerator | |
---|---|
FSW_DNODE_TYPE_UNKNOWN | |
FSW_DNODE_TYPE_FILE | |
FSW_DNODE_TYPE_DIR | |
FSW_DNODE_TYPE_SYMLINK | |
FSW_DNODE_TYPE_SPECIAL |
Definition at line 263 of file fsw_core.h.
anonymous enum |
Enumerator | |
---|---|
BLESSED_TYPE_SYSTEM_FILE | |
BLESSED_TYPE_SYSTEM_FOLDER | |
BLESSED_TYPE_OSX_FOLDER |
Definition at line 271 of file fsw_core.h.
anonymous enum |
Possible extent representation types. FSW_EXTENT_TYPE_INVALID is for shandle's internal use only, it must not be returned from a get_extent function.
Enumerator | |
---|---|
FSW_EXTENT_TYPE_INVALID | |
FSW_EXTENT_TYPE_SPARSE | |
FSW_EXTENT_TYPE_PHYSBLOCK | |
FSW_EXTENT_TYPE_BUFFER |
Definition at line 293 of file fsw_core.h.
anonymous enum |
Type of the timestamp passed into store_time_posix.
Enumerator | |
---|---|
FSW_DNODE_STAT_CTIME | |
FSW_DNODE_STAT_MTIME | |
FSW_DNODE_STAT_ATIME |
Definition at line 335 of file fsw_core.h.
fsw_status_t fsw_alloc_zero | ( | int | len, |
void ** | ptr_out ) |
fsw_status_t fsw_block_get | ( | struct VOLSTRUCTNAME * | vol, |
fsw_u32 | phys_bno, | ||
fsw_u32 | cache_level, | ||
void ** | buffer_out ) |
Get a block of data from the disk. This function is called by the file system driver or by core functions. It calls through to the host driver's device access routine. Given a physical block number, it reads the block into memory (or fetches it from the block cache) and returns the address of the memory buffer. The caller should provide an indication of how important the block is in the cache_level parameter. Blocks with a low level are purged first. Some suggestions for cache levels:
If this function returns successfully, the returned data pointer is valid until the caller calls fsw_block_release.
Definition at line 179 of file fsw_core.c.
void fsw_block_release | ( | struct VOLSTRUCTNAME * | vol, |
fsw_u32 | phys_bno, | ||
void * | buffer ) |
Releases a disk block. This function must be called to release disk blocks returned from fsw_block_get.
Definition at line 267 of file fsw_core.c.
fsw_status_t fsw_dnode_create | ( | struct VOLSTRUCTNAME * | vol, |
struct DNODESTRUCTNAME * | parent_dno, | ||
fsw_u32 | dnode_id, | ||
int | type, | ||
struct fsw_string * | name, | ||
struct DNODESTRUCTNAME ** | dno_out ) |
fsw_status_t fsw_dnode_create_root | ( | struct VOLSTRUCTNAME * | vol, |
fsw_u32 | dnode_id, | ||
struct DNODESTRUCTNAME ** | dno_out ) |
fsw_status_t fsw_dnode_dir_read | ( | struct fsw_shandle * | shand, |
struct fsw_dnode ** | child_dno_out ) |
Get the next directory item in sequential order. This function is called by the host driver to read the complete contents of a directory in sequential (file system defined) order. Calling this function returns the next entry. Iteration state is kept by a shandle on the directory's dnode. The caller must set up the shandle when starting the iteration.
When the end of the directory is reached, this function returns FSW_NOT_FOUND. If the function returns FSW_SUCCESS, *child_dno_out points to the next directory entry. The caller must call fsw_dnode_release on it.
Definition at line 669 of file fsw_core.c.
fsw_status_t fsw_dnode_fill | ( | struct fsw_dnode * | dno | ) |
Get full information about a dnode from disk. This function is called by the host driver as well as by the core functions. Some file systems defer reading full information on a dnode until it is actually needed (i.e. separation between directory and inode information). This function makes sure that all information is available in the dnode structure. The following fields may not have a correct value until fsw_dnode_fill has been called:
type, size
Definition at line 483 of file fsw_core.c.
fsw_status_t fsw_dnode_get_path | ( | struct VOLSTRUCTNAME * | vol, |
struct DNODESTRUCTNAME * | dno, | ||
struct fsw_string * | out_path ) |
int fsw_dnode_is_root | ( | struct fsw_dnode * | dno | ) |
Definition at line 350 of file fsw_core.c.
fsw_status_t fsw_dnode_lookup | ( | struct fsw_dnode * | dno, |
struct fsw_string * | lookup_name, | ||
struct fsw_dnode ** | child_dno_out ) |
Lookup a directory entry by name. This function is called by the host driver. Given a directory dnode and a file name, it looks up the named entry in the directory.
If the dnode is not a directory, the call will fail. The caller is responsible for resolving symbolic links before calling this function.
If the function returns FSW_SUCCESS, *child_dno_out points to the requested directory entry. The caller must call fsw_dnode_release on it.
Definition at line 529 of file fsw_core.c.
fsw_status_t fsw_dnode_lookup_path | ( | struct fsw_dnode * | dno, |
struct fsw_string * | lookup_path, | ||
char | separator, | ||
struct fsw_dnode ** | child_dno_out ) |
Find a file system object by path. This function is called by the host driver. Given a directory dnode and a relative or absolute path, it walks the directory tree until it finds the target dnode. If an intermediate node turns out to be a symlink, it is resolved automatically. If the target node is a symlink, it is not resolved.
If the function returns FSW_SUCCESS, *child_dno_out points to the requested directory entry. The caller must call fsw_dnode_release on it.
Definition at line 554 of file fsw_core.c.
void fsw_dnode_mkcomplete | ( | struct DNODESTRUCTNAME * | dno | ) |
fsw_status_t fsw_dnode_readlink | ( | struct fsw_dnode * | dno, |
struct fsw_string * | target_name ) |
Read the target path of a symbolic link. This function is called by the host driver to read the "content" of a symbolic link, that is the relative or absolute path it points to.
If the function returns FSW_SUCCESS, the string handle provided by the caller is filled with a string in the host's preferred encoding. The caller is responsible for calling fsw_strfree on the string.
Definition at line 695 of file fsw_core.c.
fsw_status_t fsw_dnode_readlink_data | ( | struct DNODESTRUCTNAME * | dno, |
struct fsw_string * | link_target ) |
void fsw_dnode_release | ( | struct fsw_dnode * | dno | ) |
Release a dnode pointer, deallocating it if this was the last reference. This function decrements the reference counter of the dnode. If the counter reaches zero, the dnode is freed. Since the parent dnode is released during that process, this function may cause it to be freed, too.
Definition at line 442 of file fsw_core.c.
fsw_status_t fsw_dnode_resolve | ( | struct fsw_dnode * | dno, |
struct fsw_dnode ** | target_dno_out ) |
Resolve a symbolic link. This function can be called by the host driver to make sure the a dnode is fully resolved instead of pointing at a symlink. If the dnode passed in is not a symlink, it is returned unmodified.
Note that absolute paths will be resolved relative to the root directory of the volume. If the host is an operating system with its own VFS layer, it should resolve symlinks on its own.
If the function returns FSW_SUCCESS, *target_dno_out points at a dnode that is not a symlink. The caller is responsible for calling fsw_dnode_release on it.
Definition at line 764 of file fsw_core.c.
void fsw_dnode_retain | ( | struct fsw_dnode * | dno | ) |
Increases the reference count of a dnode. This must be balanced with fsw_dnode_release calls. Note that some dnode functions return a retained dnode pointer to their caller.
Definition at line 430 of file fsw_core.c.
fsw_status_t fsw_dnode_stat | ( | struct fsw_dnode * | dno, |
struct fsw_dnode_stat * | sb ) |
Get extended information about a dnode. This function can be called by the host driver to get a full compliment of information about a dnode in addition to the fields of the fsw_dnode structure itself.
Some data requires host-specific conversion to be useful (i.e. timestamps) and will be passed to callback functions instead of being written into the structure. These callbacks must be filled in by the caller.
Definition at line 502 of file fsw_core.c.
fsw_status_t fsw_get_bless_info | ( | struct VOLSTRUCTNAME * | vol, |
int | type, | ||
struct fsw_string * | out_path ) |
fsw_status_t fsw_memdup | ( | void ** | dest_out, |
void * | src, | ||
int | len ) |
fsw_status_t fsw_mount | ( | void * | host_data, |
struct fsw_host_table * | host_table, | ||
struct fsw_fstype_table * | fstype_table, | ||
struct fsw_volume ** | vol_out ) |
Mount a volume with a given file system driver. This function is called by the host driver to make a volume accessible. The file system driver to use is specified by a pointer to its dispatch table. The file system driver will look at the data on the volume to determine if it can read the format. If the volume is found unsuitable, FSW_UNSUPPORTED is returned.
If this function returns FSW_SUCCESS, *vol_out points at a valid volume data structure. The caller must release it later by calling fsw_unmount.
If this function returns an error status, the caller only needs to clean up its own buffers that may have been allocated through the read_block interface.
Definition at line 62 of file fsw_core.c.
void fsw_set_blocksize | ( | struct VOLSTRUCTNAME * | vol, |
fsw_u32 | phys_blocksize, | ||
fsw_u32 | log_blocksize ) |
void fsw_shandle_close | ( | struct fsw_shandle * | shand | ) |
Close a shandle after accessing the dnode's data. This function is called by the host driver or core functions when they are finished with accessing a file's data. It releases the dnode reference and frees any buffers associated with the shandle itself. The dnode is only released if this was the last reference using it.
Definition at line 848 of file fsw_core.c.
fsw_status_t fsw_shandle_open | ( | struct DNODESTRUCTNAME * | dno, |
struct fsw_shandle * | shand ) |
fsw_status_t fsw_shandle_read | ( | struct fsw_shandle * | shand, |
fsw_u32 * | buffer_size_inout, | ||
void * | buffer_in ) |
Read data from a shandle (storage handle for a dnode). This function is called by the host driver or internally when data is read from a file. TODO: more
Definition at line 860 of file fsw_core.c.
void * fsw_strdata | ( | struct fsw_string * | s | ) |
fsw_status_t fsw_strdup_coerce | ( | struct fsw_string * | dest, |
int | type, | ||
struct fsw_string * | src ) |
int fsw_streq | ( | struct fsw_string * | s1, |
struct fsw_string * | s2 ) |
int fsw_streq_cstr | ( | struct fsw_string * | s1, |
const char * | s2 ) |
Compare a string with a C string constant. This sets up a string descriptor for the string constant (second argument) and runs fsw_streq on the two strings. Currently the C string is interpreted as ISO 8859-1. Returns boolean true if the strings are considered equal, boolean false otherwise.
void fsw_strfree | ( | struct fsw_string * | s | ) |
int fsw_strlen | ( | struct fsw_string * | s | ) |
int fsw_strsize | ( | struct fsw_string * | s | ) |
void fsw_strsplit | ( | struct fsw_string * | element, |
struct fsw_string * | buffer, | ||
char | separator ) |
Splits a string at the first occurence of the separator character. The buffer string is searched for the separator character. If it is found, the element string descriptor is filled to point at the part of the buffer string before the separator. The buffer string itself is adjusted to point at the remaining part of the string (without the separator).
If the separator is not found in the buffer string, then element is changed to point at the whole buffer string, and the buffer string itself is changed into an empty string.
This function only manipulates the pointers and lengths in the two string descriptors, it does not change the actual string. If the buffer string is dynamically allocated, you must make a copy of it so that you can release it later.
void fsw_unmount | ( | struct fsw_volume * | vol | ) |
Unmount a volume by releasing all memory associated with it. This function is called by the host driver when a volume is no longer needed. It is also called by the core after a failed mount to clean up any allocated memory.
Note that all dnodes must have been released before calling this function.
Definition at line 107 of file fsw_core.c.
fsw_status_t fsw_volume_stat | ( | struct fsw_volume * | vol, |
struct fsw_volume_stat * | sb ) |
Get in-depth information on the volume. This function can be called by the host driver to get additional information on the volume.
Definition at line 125 of file fsw_core.c.