Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet Commit last to fixes which make zfs vers...
details: https://anonhg.NetBSD.org/src/rev/c2ff50192a27
branches: trunk
changeset: 752589:c2ff50192a27
user: haad <haad%NetBSD.org@localhost>
date: Mon Mar 01 21:13:09 2010 +0000
description:
Commit last to fixes which make zfs version 22 compiling again.
diffstat:
external/cddl/osnet/include/statcommon.h | 8 ++++++++
external/cddl/osnet/lib/libzpool/kernel.c | 28 ++++++++++++++++++++++++++--
2 files changed, 34 insertions(+), 2 deletions(-)
diffs (58 lines):
diff -r cab47e147195 -r c2ff50192a27 external/cddl/osnet/include/statcommon.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/cddl/osnet/include/statcommon.h Mon Mar 01 21:13:09 2010 +0000
@@ -0,0 +1,8 @@
+#ifndef _STATCOMMON_H_
+#define _STATCOMMON_H_
+
+#define NODATE 0 /* Default: No time stamp */
+#define DDATE 1 /* Standard date format */
+#define UDATE 2 /* Internal representation of Unix time */
+
+#endif
diff -r cab47e147195 -r c2ff50192a27 external/cddl/osnet/lib/libzpool/kernel.c
--- a/external/cddl/osnet/lib/libzpool/kernel.c Mon Mar 01 21:10:26 2010 +0000
+++ b/external/cddl/osnet/lib/libzpool/kernel.c Mon Mar 01 21:13:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kernel.c,v 1.2 2010/02/28 17:36:51 haad Exp $ */
+/* $NetBSD: kernel.c,v 1.3 2010/03/01 21:13:10 haad Exp $ */
/*
* CDDL HEADER START
@@ -29,7 +29,7 @@
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/cdefs.h>
-__RCSID("$NetBSD: kernel.c,v 1.2 2010/02/28 17:36:51 haad Exp $");
+__RCSID("$NetBSD: kernel.c,v 1.3 2010/03/01 21:13:10 haad Exp $");
#include <sys/zfs_context.h>
#include <sys/sysctl.h>
@@ -703,3 +703,27 @@
return;
}
+
+/*
+ * Do not change the length of the returned string; it must be freed
+ * with strfree().
+ */
+char *
+kmem_asprintf(const char *fmt, ...)
+{
+ int size;
+ va_list adx;
+ char *buf;
+
+ va_start(adx, fmt);
+ size = vsnprintf(NULL, 0, fmt, adx) + 1;
+ va_end(adx);
+
+ buf = kmem_alloc(size, KM_SLEEP);
+
+ va_start(adx, fmt);
+ size = vsnprintf(buf, size, fmt, adx);
+ va_end(adx);
+
+ return (buf);
+}
Home |
Main Index |
Thread Index |
Old Index