From 7c5aae39e65e93b031e85ce3e778c845b9147785 Mon Sep 17 00:00:00 2001 From: Pablo Curiel Date: Tue, 3 Aug 2021 00:22:33 -0400 Subject: [PATCH] config: add append_authoringtool_data boolean. --- romfs/default_config.json | 1 + source/core/config.c | 5 +++-- source/core/nxdt_utils.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/romfs/default_config.json b/romfs/default_config.json index a8d8c88..0100a5c 100644 --- a/romfs/default_config.json +++ b/romfs/default_config.json @@ -18,6 +18,7 @@ "enable_screenshots": false, "enable_video_capture": false, "disable_hdcp": false, + "append_authoringtool_data": true, "lookup_checksum": true }, "ticket": { diff --git a/source/core/config.c b/source/core/config.c index d4e1c58..9f630ca 100644 --- a/source/core/config.c +++ b/source/core/config.c @@ -281,7 +281,7 @@ end: static bool configValidateJsonNspObject(const struct json_object *obj) { bool ret = false, set_download_distribution_found = false, remove_console_data_found = false, remove_titlekey_crypto_found = false, replace_acid_key_sig_found = false; - bool disable_linked_account_requirement_found = false, enable_screenshots_found = false, enable_video_capture_found = false, disable_hdcp_found = false, lookup_checksum_found = false; + bool disable_linked_account_requirement_found = false, enable_screenshots_found = false, enable_video_capture_found = false, disable_hdcp_found = false, append_authoringtool_data_found = false, lookup_checksum_found = false; if (!configValidateJsonObject(obj)) goto end; @@ -296,11 +296,12 @@ static bool configValidateJsonNspObject(const struct json_object *obj) JSON_VALIDATE_FIELD(Boolean, enable_video_capture); JSON_VALIDATE_FIELD(Boolean, disable_hdcp); JSON_VALIDATE_FIELD(Boolean, lookup_checksum); + JSON_VALIDATE_FIELD(Boolean, append_authoringtool_data); goto end; } ret = (set_download_distribution_found && remove_console_data_found && remove_titlekey_crypto_found && replace_acid_key_sig_found && disable_linked_account_requirement_found && \ - enable_screenshots_found && enable_video_capture_found && disable_hdcp_found && lookup_checksum_found); + enable_screenshots_found && enable_video_capture_found && disable_hdcp_found && append_authoringtool_data_found && lookup_checksum_found); end: return ret; diff --git a/source/core/nxdt_utils.c b/source/core/nxdt_utils.c index 54c7be4..11ffcb7 100644 --- a/source/core/nxdt_utils.c +++ b/source/core/nxdt_utils.c @@ -599,7 +599,7 @@ bool utilsGetFileSystemStatsByPath(const char *path, u64 *out_total, u64 *out_fr if ((ret = statvfs(stat_path, &info)) != 0) { - LOG_MSG("statvfs failed! (%d) (errno: %d).", ret, errno); + LOG_MSG("statvfs failed for \"%s\"! (%d) (errno: %d).", stat_path, ret, errno); return false; }