|
Android-cuttlefish cvd tool
|
#include <f2fs_fs.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include <unistd.h>#include <fcntl.h>#include <libgen.h>#include <time.h>#include <sys/stat.h>
Classes | |
| struct | enc_flags |
Macros | |
| #define | MODELINQUIRY 0x12,0x00,0x00,0x00,0x4A,0x00 |
| #define | O_BINARY 0 |
| #define | BITMAP_FIRST_BYTE_MASK(start) (0xff << ((start) & (BITS_PER_BYTE - 1))) |
| #define | DELTA 0x9E3779B9 |
| #define | CRCPOLY_LE 0xedb88320 |
| #define | ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) |
Functions | |
| static const char * | utf8_to_wchar (const char *input, wchar_t *wc, size_t insize) |
| static uint16_t * | wchar_to_utf16 (uint16_t *output, wchar_t wc, size_t outsize) |
| int | utf8_to_utf16 (char *output, const char *input, size_t outsize, size_t insize) |
| static uint16_t * | utf16_to_wchar (uint16_t *input, wchar_t *wc, size_t insize) |
| static char * | wchar_to_utf8 (char *output, wchar_t wc, size_t outsize) |
| int | utf16_to_utf8 (char *output, const char *input, size_t outsize, size_t insize) |
| int | log_base_2 (uint32_t num) |
| int | get_bits_in_byte (unsigned char n) |
| int | test_and_set_bit_le (u32 nr, u8 *addr) |
| int | test_and_clear_bit_le (u32 nr, u8 *addr) |
| int | test_bit_le (u32 nr, const u8 *addr) |
| int | f2fs_test_bit (unsigned int nr, const char *p) |
| int | f2fs_set_bit (unsigned int nr, char *addr) |
| int | f2fs_clear_bit (unsigned int nr, char *addr) |
| static u64 | __ffs (u8 word) |
| static u64 | _find_next_bit_le (const u8 *addr, u64 nbits, u64 start, char invert) |
| u64 | find_next_bit_le (const u8 *addr, u64 size, u64 offset) |
| u64 | find_next_zero_bit_le (const u8 *addr, u64 size, u64 offset) |
| static void | TEA_transform (unsigned int buf[4], unsigned int const in[]) |
| static void | str2hashbuf (const unsigned char *msg, int len, unsigned int *buf, int num) |
| static f2fs_hash_t | __f2fs_dentry_hash (const unsigned char *name, int len) |
| f2fs_hash_t | f2fs_dentry_hash (int encoding, int casefolded, const unsigned char *name, int len) |
| unsigned int | addrs_per_page (struct f2fs_inode *i, bool is_inode) |
| u64 | f2fs_max_file_offset (struct f2fs_inode *i) |
| uint32_t | f2fs_cal_crc32 (uint32_t crc, void *buf, int len) |
| int | f2fs_crc_valid (uint32_t blk_crc, void *buf, int len) |
| __u32 | f2fs_inode_chksum (struct f2fs_node *node) |
| __u32 | f2fs_checkpoint_chksum (struct f2fs_checkpoint *cp) |
| int | write_inode (struct f2fs_node *inode, u64 blkaddr, enum rw_hint whint) |
| char * | get_rootdev () |
| void | f2fs_init_configuration (void) |
| int | f2fs_dev_is_writable (void) |
| int | f2fs_dev_is_umounted (char *path) |
| int | f2fs_devs_are_umounted (void) |
| void | get_kernel_version (__u8 *version) |
| void | get_kernel_uname_version (__u8 *version) |
| static int | open_check_fs (char *path, int flag) |
| int | get_device_info (int i) |
| int | f2fs_get_device_info (void) |
| int | f2fs_get_f2fs_info (void) |
| unsigned int | calc_extra_isize (void) |
| int | f2fs_str2encoding (const char *string) |
| char * | f2fs_encoding2str (const int encoding) |
| int | f2fs_get_encoding_flags (int encoding) |
| int | f2fs_str2encoding_flags (char **param, __u16 *flags) |
Variables | |
| static const int | bits_in_byte [256] |
| struct { | |
| char * name | |
| __u16 encoding_magic | |
| __u16 default_flags | |
| } | f2fs_encoding_map [] |
| static const struct enc_flags | encoding_flags [] |
| #define ARRAY_SIZE | ( | array | ) | (sizeof(array) / sizeof(array[0])) |
| #define BITMAP_FIRST_BYTE_MASK | ( | start | ) | (0xff << ((start) & (BITS_PER_BYTE - 1))) |
| #define CRCPOLY_LE 0xedb88320 |
| #define DELTA 0x9E3779B9 |
| #define MODELINQUIRY 0x12,0x00,0x00,0x00,0x4A,0x00 |
libf2fs.c
Copyright (c) 2013 Samsung Electronics Co., Ltd. http://www.samsung.com/
Dual licensed under the GPL or LGPL version 2 licenses.
| #define O_BINARY 0 |
|
static |
Return hash value of directory entry
| name | dentry name |
| len | name lenth |
| unsigned int addrs_per_page | ( | struct f2fs_inode * | i, |
| bool | is_inode | ||
| ) |
| unsigned int calc_extra_isize | ( | void | ) |
| uint32_t f2fs_cal_crc32 | ( | uint32_t | crc, |
| void * | buf, | ||
| int | len | ||
| ) |
| __u32 f2fs_checkpoint_chksum | ( | struct f2fs_checkpoint * | cp | ) |
| int f2fs_clear_bit | ( | unsigned int | nr, |
| char * | addr | ||
| ) |
| int f2fs_crc_valid | ( | uint32_t | blk_crc, |
| void * | buf, | ||
| int | len | ||
| ) |
| f2fs_hash_t f2fs_dentry_hash | ( | int | encoding, |
| int | casefolded, | ||
| const unsigned char * | name, | ||
| int | len | ||
| ) |
| int f2fs_dev_is_umounted | ( | char * | path | ) |
| int f2fs_dev_is_writable | ( | void | ) |
| int f2fs_devs_are_umounted | ( | void | ) |
| char * f2fs_encoding2str | ( | const int | encoding | ) |
| int f2fs_get_device_info | ( | void | ) |
| int f2fs_get_encoding_flags | ( | int | encoding | ) |
| int f2fs_get_f2fs_info | ( | void | ) |
| void f2fs_init_configuration | ( | void | ) |
| u64 f2fs_max_file_offset | ( | struct f2fs_inode * | i | ) |
| int f2fs_set_bit | ( | unsigned int | nr, |
| char * | addr | ||
| ) |
| int f2fs_str2encoding | ( | const char * | string | ) |
| int f2fs_str2encoding_flags | ( | char ** | param, |
| __u16 * | flags | ||
| ) |
| int f2fs_test_bit | ( | unsigned int | nr, |
| const char * | p | ||
| ) |
| int get_bits_in_byte | ( | unsigned char | n | ) |
| int get_device_info | ( | int | i | ) |
| void get_kernel_uname_version | ( | __u8 * | version | ) |
| void get_kernel_version | ( | __u8 * | version | ) |
| char * get_rootdev | ( | ) |
| int log_base_2 | ( | uint32_t | num | ) |
|
static |
|
static |
|
static |
| int utf16_to_utf8 | ( | char * | output, |
| const char * | input, | ||
| size_t | outsize, | ||
| size_t | insize | ||
| ) |
|
static |
| int utf8_to_utf16 | ( | char * | output, |
| const char * | input, | ||
| size_t | outsize, | ||
| size_t | insize | ||
| ) |
|
static |
|
static |
|
static |
|
static |
| __u16 default_flags |
|
static |
| __u16 encoding_magic |
| const struct { ... } f2fs_encoding_map[] |
| char* name |