Gitweb:
http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=00f299b93265ea...
Commit: 00f299b93265ea2a9a930f26c68d887b8708da5a
Parent: 238a79aac41fcba65e7ac9c75f05275ab5915de6
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Fri Feb 17 13:36:57 2017 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Fri Feb 17 13:36:57 2017 +0100
commands: some more dm wrappers
As man-generator is not liked with libdm as of now - some more wrappers.
---
tools/command.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/tools/command.c b/tools/command.c
index a4139f0..1abac20 100644
--- a/tools/command.c
+++ b/tools/command.c
@@ -48,6 +48,18 @@ do { \
#define dm_malloc malloc
#define dm_free free
#define dm_strdup strdup
+#define dm_snprintf snprintf
+
+static int dm_strncpy(char *dest, const char *src, size_t n)
+{
+ if (memccpy(dest, src, 0, n))
+ return 1;
+
+ if (n > 0)
+ dest[n - 1] = '\0';
+
+ return 0;
+}
/* needed to include args.h */
#define ARG_COUNTABLE 0x00000001