#include <stdio.h>#include <stdint.h>#include <getopt.h>#include <string.h>#include <stdlib.h>#include "types.h"
Data Structures | |
| struct | SfoHeader |
| struct | SfoEntry |
| struct | EntryContainer |
Defines | |
| #define | PSF_MAGIC 0x46535000 |
| #define | PSF_VERSION 0x00000101 |
| #define | PSF_TYPE_BIN 0 |
| #define | PSF_TYPE_STR 2 |
| #define | PSF_TYPE_VAL 4 |
| #define | MAX_OPTIONS (256) |
Functions | |
| struct SfoHeader | __attribute__ ((packed)) |
| struct EntryContainer * | find_free () |
| struct EntryContainer * | find_name (const char *name) |
| int | add_string (char *str) |
| int | add_dword (char *str) |
| int | process_args (int argc, char **argv) |
| int | main (int argc, char **argv) |
Variables | |
| uint32_t | magic |
| uint32_t | version |
| uint32_t | keyofs |
| uint32_t | valofs |
| uint32_t | count |
| uint16_t | nameofs |
| uint8_t | alignment |
| uint8_t | type |
| uint32_t | valsize |
| uint32_t | totalsize |
| uint32_t | dataofs |
| struct EntryContainer | __attribute__ |
| struct EntryContainer | g_defaults [] |
| #define MAX_OPTIONS (256) |
| #define PSF_MAGIC 0x46535000 |
Referenced by main().
| #define PSF_TYPE_BIN 0 |
| #define PSF_TYPE_STR 2 |
| #define PSF_TYPE_VAL 4 |
Referenced by main().
| #define PSF_VERSION 0x00000101 |
Referenced by main().
| struct SfoHeader __attribute__ | ( | (packed) | ) |
| int add_dword | ( | char * | str | ) |
References find_free(), fprintf(), memset(), EntryContainer::name, NULL, stderr, strchr(), strtoul(), EntryContainer::type, and EntryContainer::value.
Referenced by process_args().
| int add_string | ( | char * | str | ) |
References EntryContainer::data, find_free(), fprintf(), memset(), EntryContainer::name, NULL, stderr, strchr(), and EntryContainer::type.
Referenced by process_args().
| struct EntryContainer* find_free | ( | ) | [read] |
Referenced by add_dword(), add_string(), and main().
| struct EntryContainer* find_name | ( | const char * | name | ) | [read] |
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
References SfoEntry::alignment, SfoHeader::count, count, EntryContainer::data, SfoEntry::dataofs, fclose(), find_free(), find_name(), fopen(), fprintf(), fwrite(), i, SfoHeader::keyofs, keyofs, SfoHeader::magic, memcpy(), memset(), EntryContainer::name, name, SfoEntry::nameofs, NULL, process_args(), PSF_MAGIC, PSF_TYPE_VAL, PSF_VERSION, stderr, strcpy(), strlen(), SW, totalsize, SfoEntry::totalsize, SfoEntry::type, EntryContainer::type, uint32_t, SfoHeader::valofs, valsize, SfoEntry::valsize, EntryContainer::value, and SfoHeader::version.
| int process_args | ( | int | argc, | |
| char ** | argv | |||
| ) |
References add_dword(), add_string(), getopt_long(), NULL, optarg, and optind.
Referenced by main().
| struct EntryContainer __attribute__ |
| uint8_t alignment |
| uint32_t count |
Referenced by dump_exports(), fixup_imports(), fixup_nidmap(), getDebugChar(), main(), output_relocs(), pspDebugGetStackTrace2(), and sceGuClear().
| uint32_t dataofs |
| struct EntryContainer g_defaults[] |
{
{ "BOOTABLE", PSF_TYPE_VAL, 1, NULL },
{ "CATEGORY", PSF_TYPE_STR, 0, "MG" },
{ "DISC_ID", PSF_TYPE_STR, 0, "UCJS10041" },
{ "DISC_VERSION", PSF_TYPE_STR, 0, "1.00" },
{ "PARENTAL_LEVEL", PSF_TYPE_VAL, 1, NULL },
{ "PSP_SYSTEM_VER", PSF_TYPE_STR, 0, "1.00" },
{ "REGION", PSF_TYPE_VAL, 0x8000, NULL },
}
| uint32_t magic |
| uint16_t nameofs |
| uint8_t type |
| uint32_t valofs |
| uint32_t version |
1.7.1