static void sort_strings (char **strings, int len);
static int get_xdigit (char c);
static int dispatch (char *cmd, char *args);
static void sort_strings (char **strings, int len);
static int get_xdigit (char c);
static int dispatch (char *cmd, char *args);
static int cmd_cd (char *path);
static int cmd_close (char *path);
static int cmd_commit (char *path);
static int cmd_cd (char *path);
static int cmd_close (char *path);
static int cmd_commit (char *path);
- 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);
"setval", "nrvals", "xstrtol", xerr);
return -1;
}
"setval", "nrvals", "xstrtol", xerr);
return -1;
}
/* Read nrvals * 2 lines of input, nrvals * (key, value) pairs, as
* explained in the man page.
*/
/* Read nrvals * 2 lines of input, nrvals * (key, value) pairs, as
* explained in the man page.
*/
int nr_chars = strlen (buf);
values[i].len = 2 * (nr_chars + 1);
values[i].value = malloc (values[i].len);
int nr_chars = strlen (buf);
values[i].len = 2 * (nr_chars + 1);
values[i].value = malloc (values[i].len);
hive_node_h new_cwd = hivex_node_parent (h, cwd);
if (hivex_node_delete_child (h, cwd) == -1) {
hive_node_h new_cwd = hivex_node_parent (h, cwd);
if (hivex_node_delete_child (h, cwd) == -1) {