summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ldomctl/mdesc.c6
-rw-r--r--usr.sbin/ldomctl/mdesc.h10
2 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/ldomctl/mdesc.c b/usr.sbin/ldomctl/mdesc.c
index 75da7ed5ccb..d976b6c4296 100644
--- a/usr.sbin/ldomctl/mdesc.c
+++ b/usr.sbin/ldomctl/mdesc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdesc.c,v 1.4 2012/10/27 18:19:58 kettenis Exp $ */
+/* $OpenBSD: mdesc.c,v 1.5 2012/11/24 11:40:51 kettenis Exp $ */
/*
* Copyright (c) 2012 Mark Kettenis
@@ -237,8 +237,10 @@ md_get_prop_val(struct md *md, struct md_node *node, const char *name,
struct md_prop *prop;
prop = md_find_prop(md, node, name);
- if (prop == NULL || prop->tag != MD_PROP_VAL)
+ if (prop == NULL || prop->tag != MD_PROP_VAL) {
+ *val = -1;
return false;
+ }
*val = prop->d.val;
return true;
diff --git a/usr.sbin/ldomctl/mdesc.h b/usr.sbin/ldomctl/mdesc.h
index 61676e8d6a0..bbf207c133b 100644
--- a/usr.sbin/ldomctl/mdesc.h
+++ b/usr.sbin/ldomctl/mdesc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdesc.h,v 1.3 2012/10/25 20:58:04 kettenis Exp $ */
+/* $OpenBSD: mdesc.h,v 1.4 2012/11/24 11:40:51 kettenis Exp $ */
/*
* Copyright (c) 2012 Mark Kettenis
@@ -120,9 +120,17 @@ bool md_get_prop_val(struct md *, struct md_node *, const char *, uint64_t *);
bool md_set_prop_val(struct md *, struct md_node *, const char *, uint64_t);
bool md_get_prop_str(struct md *, struct md_node *, const char *,
const char **);
+bool md_get_prop_data(struct md *, struct md_node *, const char *,
+ const void **, size_t *);
+
+void md_delete_node(struct md *, struct md_node *);
+void md_find_delete_node(struct md *, const char *);
+
+void md_collect_garbage(struct md *);
struct md *md_ingest(void *, size_t);
size_t md_exhume(struct md *md, void **);
+struct md *md_copy(struct md *);
struct md *md_read(const char *);
void md_write(struct md *, const char *);