diff options
author | Brian Behlendorf <[email protected]> | 2014-10-01 15:02:12 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-10-17 14:58:57 -0700 |
commit | f0e324f25d5ada5da5f8930fc1789af6896c72b4 (patch) | |
tree | 33c81bcfd6c68a7844952f4ea356ed2bfe88d480 /lib/libspl | |
parent | 050d22b06834876c3b0554647108f06a05b3ba96 (diff) |
Update utsname support
Modify the code to use the utsname() kernel function rather than
a global variable. This results is cleaner more portable code
because utsname() is already provided by the kernel and can be
easily emulated in user space via uname(2). This means that it
will behave consistently in both contexts.
This is also has the benefit that it allows the removal of a few
_KERNEL pre-processor conditions. And it also is a pre-requisite
for a proper FUSE port because we need to provide a valid utsname.
Finally, it allows us to remove this functionality from the SPL
and all the related compatibility code.
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #2757
Diffstat (limited to 'lib/libspl')
-rw-r--r-- | lib/libspl/include/sys/Makefile.am | 1 | ||||
-rw-r--r-- | lib/libspl/include/sys/utsname.h | 34 |
2 files changed, 0 insertions, 35 deletions
diff --git a/lib/libspl/include/sys/Makefile.am b/lib/libspl/include/sys/Makefile.am index f55abc8fa..d86cc6a56 100644 --- a/lib/libspl/include/sys/Makefile.am +++ b/lib/libspl/include/sys/Makefile.am @@ -47,7 +47,6 @@ libspl_HEADERS = \ $(top_srcdir)/lib/libspl/include/sys/types.h \ $(top_srcdir)/lib/libspl/include/sys/tzfile.h \ $(top_srcdir)/lib/libspl/include/sys/uio.h \ - $(top_srcdir)/lib/libspl/include/sys/utsname.h \ $(top_srcdir)/lib/libspl/include/sys/va_list.h \ $(top_srcdir)/lib/libspl/include/sys/varargs.h \ $(top_srcdir)/lib/libspl/include/sys/vnode.h \ diff --git a/lib/libspl/include/sys/utsname.h b/lib/libspl/include/sys/utsname.h deleted file mode 100644 index e16e22dbd..000000000 --- a/lib/libspl/include/sys/utsname.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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. - * - * You can obtain a copy of the license at usr/src/OPENLIBSPLARIS.LICENSE - * or http://www.opensolaris.org/os/licensing. - * See the License for the specific language governing permissions - * and limitations under the License. - * - * When distributing Covered Code, include this CDDL HEADER in each - * file and include the License file at usr/src/OPENLIBSPLARIS.LICENSE. - * If applicable, add the following below this CDDL HEADER, with the - * fields enclosed by brackets "[]" replaced with your own identifying - * information: Portions Copyright [yyyy] [name of copyright owner] - * - * CDDL HEADER END - */ -/* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _LIBSPL_UTSNAME_H -#define _LIBSPL_UTSNAME_H - -#include_next <sys/utsname.h> - -struct utsname utsname; - -#endif /* _LIBSPL_UTSNAME_H */ |