hivexsh: lsval: Remove stray quotation mark.
[libguestfs.git] / hivex / hivexsh.c
index ceb1153..1bd3b8b 100644 (file)
@@ -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;
       }