X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=hivex%2Fhivexsh.c;h=1bd3b8be8d68d53d9fd2fbd618ade45622aaa77b;hb=3932b383869a1029457fac172827ef2b538d77de;hp=ceb115362d5ce90676b98476dc4a5a2d7365a9c6;hpb=aef0d618b08dc9fb27fb3a729dd8926cff26ae0b;p=libguestfs.git diff --git a/hivex/hivexsh.c b/hivex/hivexsh.c index ceb1153..1bd3b8b 100644 --- a/hivex/hivexsh.c +++ b/hivex/hivexsh.c @@ -559,10 +559,14 @@ cmd_cd (char *path) continue; } + errno = 0; new_cwd = hivex_node_get_child (h, new_cwd, elem); if (new_cwd == 0) { - fprintf (stderr, _("hivexsh: cd: subkey '%s' not found\n"), - elem); + if (errno) + perror ("hivexsh: cd"); + else + fprintf (stderr, _("hivexsh: cd: subkey '%s' not found\n"), + elem); return -1; } } @@ -780,7 +784,7 @@ cmd_lsval (char *key) case hive_t_dword: case hive_t_dword_be: { int32_t j = hivex_value_dword (h, values[i]); - printf ("dword:%08" PRIx32 "\"", j); + printf ("dword:%08" PRIx32, j); break; }