[PATCH 4/6] reg: Add a new message to indicate when a registry key fails to import

Hugh McMaster hugh.mcmaster at outlook.com
Thu Apr 1 07:20:50 CDT 2021


Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 programs/reg/import.c   | 4 ++--
 programs/reg/reg.rc     | 1 +
 programs/reg/resource.h | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/programs/reg/import.c b/programs/reg/import.c
index 3ce8fce7394..223e7db0e48 100644
--- a/programs/reg/import.c
+++ b/programs/reg/import.c
@@ -523,7 +523,7 @@ static WCHAR *parse_win31_line_state(struct parser *parser, WCHAR *pos)
 
     if (open_key(parser, line) != ERROR_SUCCESS)
     {
-        output_message(STRING_OPEN_KEY_FAILED, line);
+        output_message(STRING_KEY_IMPORT_FAILED, line);
         return line;
     }
 
@@ -584,7 +584,7 @@ static WCHAR *key_name_state(struct parser *parser, WCHAR *pos)
         return p + 1;
     }
     else if (open_key(parser, p) != ERROR_SUCCESS)
-        output_message(STRING_OPEN_KEY_FAILED, p);
+        output_message(STRING_KEY_IMPORT_FAILED, p);
 
 done:
     set_state(parser, LINE_START);
diff --git a/programs/reg/reg.rc b/programs/reg/reg.rc
index 10ad38942c3..b0a27b33606 100644
--- a/programs/reg/reg.rc
+++ b/programs/reg/reg.rc
@@ -171,4 +171,5 @@ STRINGTABLE
     STRING_INVALID_SYSTEM_KEY, "reg: Invalid system key [%1]\n"
     STRING_OVERWRITE_FILE, "The file '%1' already exists. Do you want to overwrite it?"
     STRING_KEY_NONEXIST, "reg: Unable to find the specified registry key\n"
+    STRING_KEY_IMPORT_FAILED, "reg: Unable to import the registry key '%1'\n"
 }
diff --git a/programs/reg/resource.h b/programs/reg/resource.h
index f1a8016b57f..188b2d13cf4 100644
--- a/programs/reg/resource.h
+++ b/programs/reg/resource.h
@@ -60,3 +60,4 @@
 #define STRING_INVALID_SYSTEM_KEY     137
 #define STRING_OVERWRITE_FILE         138
 #define STRING_KEY_NONEXIST           139
+#define STRING_KEY_IMPORT_FAILED      140
-- 
2.31.0




More information about the wine-devel mailing list