Skip to content

Commit b8ce6b8

Browse files
committed
WL#15051 Add command line options for encryption key.
Post push fix. Add missing error message when ndbxfrm fail. Change-Id: I8793b17339b8a604e05ef14a7c63b6a773a507f2
1 parent c526289 commit b8ce6b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

storage/ndb/tools/ndbxfrm.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ int main(int argc, char* argv[])
242242

243243
if (argc != 2)
244244
{
245-
fprintf(stderr, "Error: Need one source file and one destination file.");
245+
fprintf(stderr, "Error: Need one source file and one destination file.\n");
246246
return 1;
247247
}
248248

@@ -353,6 +353,7 @@ int copy_file(const char src[], const char dst[])
353353
r = src_xfrm.open(src_file, src_pwd_key, src_pwd_key_len);
354354
if (r == -1)
355355
{
356+
fprintf(stderr, "Error: Can not read file %s, bad password or key?\n", src);
356357
src_file.close();
357358
dst_file.close();
358359
dst_file.remove(dst);
@@ -385,6 +386,7 @@ int copy_file(const char src[], const char dst[])
385386
true);
386387
if (r != 0)
387388
{
389+
fprintf(stderr, "Error: Can not initialize file %s.\n", dst);
388390
src_xfrm.close(false);
389391
src_file.close();
390392
dst_file.close();
@@ -418,7 +420,7 @@ int copy_file(const char src[], const char dst[])
418420
{
419421
if (src_xfrm.is_encrypted())
420422
{
421-
fprintf(stderr, "Error: Can not read file %s, bad password?\n", src);
423+
fprintf(stderr, "Error: Can not read file %s, bad password or key?\n", src);
422424
}
423425
else
424426
{

0 commit comments

Comments
 (0)