summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-01-05 20:11:47 +0100
committerLennart Poettering <lennart@poettering.net>2012-01-05 20:11:47 +0100
commit55d7bfc19b72eca09d2bb7c9c73a62c886d8b9b4 (patch)
treea6c53b097199d4b59df0e18d4b64cfd9c8451765 /src/util.c
parent0df4f9d669bec2d34777735f8cdd40797b1fd753 (diff)
journalctl: rework short output mode to rebuild full syslog message
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index d3d521b928..2b735e8413 100644
--- a/src/util.c
+++ b/src/util.c
@@ -6050,3 +6050,16 @@ finish:
return buf;
}
+
+void* memdup(const void *p, size_t l) {
+ void *r;
+
+ assert(p);
+
+ r = malloc(l);
+ if (!r)
+ return NULL;
+
+ memcpy(r, p, l);
+ return r;
+}