summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2012-11-24 11:40:52 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2012-11-24 11:40:52 +0000
commit4ce70fe10f04a7aaac206c0618c723b46b2e30e9 (patch)
tree390155255b9bfb698355cad3e6db835399cdd304 /usr.sbin
parentb494fe5bc50d178450a8be20b21bde40386e8b83 (diff)
Export a few more prototypes. Make md_get_prop_val set the returned value
to -1 if the requested property isn't present.
Diffstat (limited to 'usr.sbin')
-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 *);