diff options
author | Patrick Mooney <pmooney@pfmooney.com> | 2016-03-24 16:21:52 +0000 |
---|---|---|
committer | Patrick Mooney <pmooney@pfmooney.com> | 2016-03-24 19:30:00 +0000 |
commit | d25dfce94363dff4474ff7a733c846d713d0a769 (patch) | |
tree | b813bd8c92d64498aa6221e6e73164a5a2063aa9 | |
parent | f6f36c00d6eec767d313ad396a83db1cb338328a (diff) | |
download | illumos-joyent-d25dfce94363dff4474ff7a733c846d713d0a769.tar.gz |
OS-5116 lxbrand clean up lx_native tool
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
-rw-r--r-- | manifest | 3 | ||||
-rw-r--r-- | usr/src/lib/brand/lx/Makefile | 4 | ||||
-rw-r--r-- | usr/src/lib/brand/lx/cmd/Makefile | 48 | ||||
-rw-r--r-- | usr/src/lib/brand/lx/cmd/lx_native.sh | 29 | ||||
-rw-r--r-- | usr/src/lib/brand/lx/lx_brand/common/misc.c | 23 |
5 files changed, 3 insertions, 104 deletions
@@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2015, Joyent, Inc. All rights reserved. +# Copyright 2016 Joyent, Inc. # # This lists all the files that illumos-joyent delivers as part of a build. # Keep this sorted as by LC_ALL=C sort -u -k2. @@ -5070,7 +5070,6 @@ f usr/lib/brand/lx/lx_boot_zone_busybox 0755 root root f usr/lib/brand/lx/lx_boot_zone_ubuntu 0755 root root f usr/lib/brand/lx/lxinit 0755 root root f usr/lib/brand/lx/lx_librtld_db.so.1 0755 root root -f usr/lib/brand/lx/lx_native 0755 root root f usr/lib/brand/lx/lx_support 0755 root root f usr/lib/brand/lx/platform.xml 0444 root root d usr/lib/brand/shared 0755 root sys diff --git a/usr/src/lib/brand/lx/Makefile b/usr/src/lib/brand/lx/Makefile index 67f2926305..91f9c83633 100644 --- a/usr/src/lib/brand/lx/Makefile +++ b/usr/src/lib/brand/lx/Makefile @@ -22,7 +22,7 @@ # # Copyright 2006 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. -# Copyright 2015 Joyent, Inc. +# Copyright 2016 Joyent, Inc. # default: all @@ -32,7 +32,7 @@ include Makefile.lx # Build everything in parallel; use .WAIT for dependencies .PARALLEL: -SUBDIRS= cmd librtld_db lx_support lx_init lx_brand netfiles \ +SUBDIRS= librtld_db lx_support lx_init lx_brand netfiles \ zone lx_vdso cgrpmgr testing .WAIT MSGSUBDIRS= lx_brand lx_support zone diff --git a/usr/src/lib/brand/lx/cmd/Makefile b/usr/src/lib/brand/lx/cmd/Makefile deleted file mode 100644 index 3d9c4009b3..0000000000 --- a/usr/src/lib/brand/lx/cmd/Makefile +++ /dev/null @@ -1,48 +0,0 @@ -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# 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/OPENSOLARIS.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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# Copyright 2015 Joyent, Inc. -# - -PROGS = lx_native - -include ../Makefile.lx - -# override the install directory -ROOTBIN = $(ROOTBRANDDIR) -CLOBBERFILES = $(ROOTPROGS) - -.KEEP_STATE: - -lint: - -all: $(PROGS) - -install: all $(ROOTPROGS) - -clean: - $(RM) $(PROGS) - -clobber: clean - $(RM) $(ROOTPROGS) diff --git a/usr/src/lib/brand/lx/cmd/lx_native.sh b/usr/src/lib/brand/lx/cmd/lx_native.sh deleted file mode 100644 index 8e8344a375..0000000000 --- a/usr/src/lib/brand/lx/cmd/lx_native.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# 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. -# 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/OPENSOLARIS.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 2006 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# ident "%Z%%M% %I% %E% SMI" -# -exit 0 diff --git a/usr/src/lib/brand/lx/lx_brand/common/misc.c b/usr/src/lib/brand/lx/lx_brand/common/misc.c index 5fd637babe..378e766666 100644 --- a/usr/src/lib/brand/lx/lx_brand/common/misc.c +++ b/usr/src/lib/brand/lx/lx_brand/common/misc.c @@ -444,29 +444,6 @@ lx_execve(uintptr_t p1, uintptr_t p2, uintptr_t p3) char **argv = (char **)p2; char **envp = (char **)p3; char *nullist[] = { NULL }; - char path[64]; - - /* Get a copy of the executable we're trying to run */ - path[0] = '\0'; - (void) uucopystr(filename, path, sizeof (path)); - - /* Check if we're trying to run a native binary */ - if (strncmp(path, "/native/usr/lib/brand/lx/lx_native", - sizeof (path)) == 0) { - /* Skip the first element in the argv array */ - argv++; - - /* - * The name of the new program to execute was the first - * parameter passed to lx_native. - */ - if (uucopy(argv, &filename, sizeof (char *)) != 0) - return (-errno); - - (void) syscall(SYS_brand, B_EXEC_NATIVE, filename, argv, envp, - NULL, NULL, NULL); - return (-errno); - } if (argv == NULL) argv = nullist; |