mirror of
https://github.com/DarkMatterCore/nxdumptool.git
synced 2024-11-09 20:21:45 +00:00
gc_dumper: change info TXT layout.
This commit is contained in:
parent
3999e48c43
commit
f6d133d793
3 changed files with 10 additions and 12 deletions
4
Makefile
4
Makefile
|
@ -59,6 +59,8 @@ ifneq ($(origin BUILD_TYPE),undefined)
|
||||||
APP_TITLE := ${BUILD_TYPE}
|
APP_TITLE := ${BUILD_TYPE}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
BUILD_TIMESTAMP := $(strip $(shell date --utc '+%Y-%m-%d %T UTC'))
|
||||||
|
|
||||||
TARGET := ${APP_TITLE}
|
TARGET := ${APP_TITLE}
|
||||||
BUILD := build
|
BUILD := build
|
||||||
SOURCES := source source/core source/fatfs
|
SOURCES := source source/core source/fatfs
|
||||||
|
@ -81,7 +83,7 @@ CFLAGS := -g -gdwarf-4 -Wall -Werror -O2 -ffunction-sections $(ARCH) $(DEFINES)
|
||||||
CFLAGS += -DVERSION_MAJOR=${VERSION_MAJOR} -DVERSION_MINOR=${VERSION_MINOR} -DVERSION_MICRO=${VERSION_MICRO}
|
CFLAGS += -DVERSION_MAJOR=${VERSION_MAJOR} -DVERSION_MINOR=${VERSION_MINOR} -DVERSION_MICRO=${VERSION_MICRO}
|
||||||
CFLAGS += -DAPP_TITLE=\"${APP_TITLE}\" -DAPP_AUTHOR=\"${APP_AUTHOR}\" -DAPP_VERSION=\"${APP_VERSION}\"
|
CFLAGS += -DAPP_TITLE=\"${APP_TITLE}\" -DAPP_AUTHOR=\"${APP_AUTHOR}\" -DAPP_VERSION=\"${APP_VERSION}\"
|
||||||
CFLAGS += -DGIT_BRANCH=\"${GIT_BRANCH}\" -DGIT_COMMIT=\"${GIT_COMMIT}\" -DGIT_REV=\"${GIT_REV}\"
|
CFLAGS += -DGIT_BRANCH=\"${GIT_BRANCH}\" -DGIT_COMMIT=\"${GIT_COMMIT}\" -DGIT_REV=\"${GIT_REV}\"
|
||||||
CFLAGS += -DBOREALIS_RESOURCES="\"${BOREALIS_RESOURCES}\"" -D_GNU_SOURCE
|
CFLAGS += -DBUILD_TIMESTAMP="\"${BUILD_TIMESTAMP}\"" -DBOREALIS_RESOURCES="\"${BOREALIS_RESOURCES}\"" -D_GNU_SOURCE
|
||||||
|
|
||||||
CXXFLAGS := $(CFLAGS) -std=c++20 -Wno-volatile -Wno-unused-parameter
|
CXXFLAGS := $(CFLAGS) -std=c++20 -Wno-volatile -Wno-unused-parameter
|
||||||
|
|
||||||
|
|
|
@ -470,25 +470,21 @@ static void generateDumpTxt(void)
|
||||||
*txt_info = '\0';
|
*txt_info = '\0';
|
||||||
|
|
||||||
struct tm ts = {0};
|
struct tm ts = {0};
|
||||||
struct timespec now = {0};
|
time_t now = time(NULL);
|
||||||
|
|
||||||
/* Get current time with nanosecond precision. */
|
|
||||||
clock_gettime(CLOCK_REALTIME, &now);
|
|
||||||
|
|
||||||
/* Get UTC time. */
|
/* Get UTC time. */
|
||||||
gmtime_r(&(now.tv_sec), &ts);
|
gmtime_r(&now, &ts);
|
||||||
ts.tm_year += 1900;
|
ts.tm_year += 1900;
|
||||||
ts.tm_mon++;
|
ts.tm_mon++;
|
||||||
|
|
||||||
/* Generate dump text. */
|
/* Generate dump text. */
|
||||||
snprintf(txt_info, MAX_ELEMENTS(txt_info), "dump info:\r\n" \
|
snprintf(txt_info, MAX_ELEMENTS(txt_info), "tool: nxdumptool\r\n" \
|
||||||
"tool: nxdumptool\r\n" \
|
|
||||||
"version: " APP_VERSION "\r\n" \
|
"version: " APP_VERSION "\r\n" \
|
||||||
"branch: " GIT_BRANCH "\r\n" \
|
"branch: " GIT_BRANCH "\r\n" \
|
||||||
"commit: " GIT_COMMIT "\r\n" \
|
"commit: " GIT_COMMIT "\r\n" \
|
||||||
"build date: " __DATE__ " - " __TIME__ "\r\n" \
|
"build date: " BUILD_TIMESTAMP "\r\n" \
|
||||||
"dump date: %d-%02d-%02d %02d:%02d:%02d.%03lu UTC+0\r\n",
|
"dump date: %d-%02d-%02d %02d:%02d:%02d UTC\r\n", \
|
||||||
ts.tm_year, ts.tm_mon, ts.tm_mday, ts.tm_hour, ts.tm_min, ts.tm_sec, now.tv_nsec);
|
ts.tm_year, ts.tm_mon, ts.tm_mday, ts.tm_hour, ts.tm_min, ts.tm_sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool saveFileData(const char *path, void *data, size_t data_size)
|
static bool saveFileData(const char *path, void *data, size_t data_size)
|
||||||
|
|
|
@ -136,7 +136,7 @@ bool utilsInitializeResources(const int program_argc, const char **program_argv)
|
||||||
|
|
||||||
/* Create logfile. */
|
/* Create logfile. */
|
||||||
logWriteStringToLogFile("________________________________________________________________\r\n");
|
logWriteStringToLogFile("________________________________________________________________\r\n");
|
||||||
LOG_MSG(APP_TITLE " v" APP_VERSION " starting (" GIT_REV "). Built on " __DATE__ " - " __TIME__ ".");
|
LOG_MSG(APP_TITLE " v" APP_VERSION " starting (" GIT_REV "). Built on " BUILD_TIMESTAMP ".");
|
||||||
|
|
||||||
/* Log Horizon OS version. */
|
/* Log Horizon OS version. */
|
||||||
u32 hos_version = hosversionGet();
|
u32 hos_version = hosversionGet();
|
||||||
|
|
Loading…
Reference in a new issue