hivex_root: Return errno == HIVEX_NO_KEY when root key is missing.
[hivex.git] / lib / hivex.c
index 7715520..d042f4f 100644 (file)
@@ -559,7 +559,7 @@ hivex_root (hive_h *h)
 {
   hive_node_h ret = h->rootoffs;
   if (!IS_VALID_BLOCK (h, ret)) {
-    errno = ENOKEY;
+    errno = HIVEX_NO_KEY;
     return 0;
   }
   return ret;