git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rebase to OpenSolaris b103, in the process we are removing any code which did not...
[zfs.git]
/
zfs
/
lib
/
libuutil
/
uu_alloc.c
diff --git
a/zfs/lib/libuutil/uu_alloc.c
b/zfs/lib/libuutil/uu_alloc.c
index
53f3496
..
05d8622
100644
(file)
--- a/
zfs/lib/libuutil/uu_alloc.c
+++ b/
zfs/lib/libuutil/uu_alloc.c
@@
-2,9
+2,8
@@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@
-20,12
+19,10
@@
* CDDL HEADER END
*/
/*
* CDDL HEADER END
*/
/*
- * Copyright 200
4
Sun Microsystems, Inc. All rights reserved.
+ * Copyright 200
8
Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
* Use is subject to license terms.
*/
-
-
#include "libuutil_common.h"
#include <stdarg.h>
#include "libuutil_common.h"
#include <stdarg.h>
@@
-55,6
+52,22
@@
uu_free(void *p)
}
char *
}
char *
+uu_strdup(const char *str)
+{
+ char *buf = NULL;
+
+ if (str != NULL) {
+ size_t sz;
+
+ sz = strlen(str) + 1;
+ buf = uu_zalloc(sz);
+ if (buf != NULL)
+ (void) memcpy(buf, str, sz);
+ }
+ return (buf);
+}
+
+char *
uu_msprintf(const char *format, ...)
{
va_list args;
uu_msprintf(const char *format, ...)
{
va_list args;