summaryrefslogtreecommitdiff
path: root/usr.sbin/ldomctl/mdesc.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2012-10-21 12:56:46 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2012-10-21 12:56:46 +0000
commit036204675e038878c1b3a43a17ff283b77e9d7ee (patch)
treeef69d4356322d4f3d1da67c5272013bdd8fde8bf /usr.sbin/ldomctl/mdesc.c
parent0c31dce3a49b370f17a80f85dd5ad45812ddbe5c (diff)
Split out some general-purpose functions and macros into their own file.
Diffstat (limited to 'usr.sbin/ldomctl/mdesc.c')
-rw-r--r--usr.sbin/ldomctl/mdesc.c37
1 files changed, 2 insertions, 35 deletions
diff --git a/usr.sbin/ldomctl/mdesc.c b/usr.sbin/ldomctl/mdesc.c
index 30ef02a653e..07dfd60ba25 100644
--- a/usr.sbin/ldomctl/mdesc.c
+++ b/usr.sbin/ldomctl/mdesc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdesc.c,v 1.1 2012/10/15 20:28:50 kettenis Exp $ */
+/* $OpenBSD: mdesc.c,v 1.2 2012/10/21 12:56:45 kettenis Exp $ */
/*
* Copyright (c) 2012 Mark Kettenis
@@ -26,40 +26,7 @@
#include <string.h>
#include "mdesc.h"
-
-#define roundup(n, m) (((n) + ((m) - 1)) & ~((m) - 1))
-
-void *
-xmalloc(size_t size)
-{
- void *p;
-
- p = malloc(size);
- if (p == NULL)
- err(1, NULL);
- return p;
-}
-
-void *
-xzalloc(size_t size)
-{
- void *p;
-
- p = xmalloc(size);
- memset(p, 0, size);
- return p;
-}
-
-char *
-xstrdup(const char *s)
-{
- char *p;
-
- p = strdup(s);
- if (p == NULL)
- err(1, NULL);
- return p;
-}
+#include "util.h"
struct md_name *
md_find_name(struct md *md, const char *str)