- node = hivex_node_get_child (h, root, "Select");
- if (node == 0) {
- if (errno != 0)
- perror ("hivex_node_get_child");
- else
- fprintf (stderr, "virt-dhcp-address: HKLM\\System\\Select key not found.");
- exit (EXIT_FAILURE);
- }
- value = hivex_node_get_value (h, node, "Current");
- if (value == 0) {
- if (errno != 0)
- perror ("hivex_node_get_value");
- else
- fprintf (stderr, "virt-dhcp-address: HKLM\\System\\Select Default entry not found.");
- exit (EXIT_FAILURE);
- }
- /* XXX Should check the type. */
- dword = hivex_value_dword (h, value);
- snprintf (controlset, sizeof controlset, "ControlSet%03d", dword);