diff options
author | Gordon Ross <gordon.w.ross@gmail.com> | 2016-11-28 13:01:12 -0500 |
---|---|---|
committer | Gordon Ross <gordon.w.ross@gmail.com> | 2016-11-28 13:26:59 -0500 |
commit | 349c94e7ad697613dd7950717e2b3b8c4ba5e404 (patch) | |
tree | 3ef4155adddc07b56bcf58e0bbb2304f912e04ab | |
parent | 403f47673a6d208cb84132be7f90542637657914 (diff) | |
download | illumos-gfx-drm-349c94e7ad697613dd7950717e2b3b8c4ba5e404.tar.gz |
7631 Clean out remnants of the foo example
46 files changed, 8 insertions, 2244 deletions
diff --git a/usr/src/cmd/foo/Makefile b/usr/src/cmd/foo/Makefile deleted file mode 100644 index 8b59e1e..0000000 --- a/usr/src/cmd/foo/Makefile +++ /dev/null @@ -1,65 +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/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 (c) 1997 by Sun Microsystems, Inc. -# All rights reserved. -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# -# cmd/foo/Makefile -# - -PROG= foo -DCFILE= $(PROG).dc - -include ../Makefile.cmd - -SUBDIRS= $(MACH) -$(BUILD64)SUBDIRS += $(MACH64) - -all := TARGET = all -install := TARGET = install -clean := TARGET = clean -clobber := TARGET = clobber -lint := TARGET = lint - -.KEEP_STATE: - -all: $(SUBDIRS) - -clean clobber lint: $(SUBDIRS) - -install: $(SUBDIRS) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -$(DCFILE): $(PROG).c - $(RM) $(DCFILE) - $(COMPILE.cpp) $(PROG).c | \ - $(XGETTEXT) $(XGETFLAGS) -t - - $(SED) -e '/^domain/d' messages.po > $@ - $(RM) messages.po - -FRC: - -include ../Makefile.targ diff --git a/usr/src/cmd/foo/Makefile.com b/usr/src/cmd/foo/Makefile.com deleted file mode 100644 index a5ac9b8..0000000 --- a/usr/src/cmd/foo/Makefile.com +++ /dev/null @@ -1,57 +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 2007 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# -# cmd/ls/Makefile.com -# - -PROG= foo -OBJS= $(PROG).o -SRCS= $(OBJS:%.o=../%.c) - -include ../../Makefile.cmd - -LDLIBS += -lfoo -CFLAGS += $(CCVERBOSE) - -CFLAGS64 += $(CCVERBOSE) -CPPFLAGS += -D_FILE_OFFSET_BITS=64 - -CLOBBERFILES += $(PROG) - -all: $(PROG) - -lint: lint_SRCS - -clean: - $(RM) *.o - -include ../../Makefile.targ - -%: ../%.c - $(LINK.c) -o $@ $< $(LDLIBS) - $(POST_PROCESS) - -.KEEP_STATE: diff --git a/usr/src/cmd/foo/amd64/Makefile b/usr/src/cmd/foo/amd64/Makefile deleted file mode 100644 index c5fdf07..0000000 --- a/usr/src/cmd/foo/amd64/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# - -include ../Makefile.com -include ../../Makefile.cmd.64 - -install: all $(ROOTPROG64) diff --git a/usr/src/cmd/foo/foo.c b/usr/src/cmd/foo/foo.c deleted file mode 100644 index f85af88..0000000 --- a/usr/src/cmd/foo/foo.c +++ /dev/null @@ -1,34 +0,0 @@ -/* - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - */ - -/* - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - */ - -#include <stdio.h> -#include <libfoo/foo.h> -#include <libintl.h> - -int -main(int argc, char **argv) -{ - uint32_t cnt; - int rc; - - rc = foo_getcnt(&cnt); - if (rc != 0) { - fprintf(stderr, "%s: err = %d\n", argv[0], rc); - return (1); - } - - printf(gettext("cnt = %u\n"), cnt); - return (0); -} diff --git a/usr/src/cmd/foo/i386/Makefile b/usr/src/cmd/foo/i386/Makefile deleted file mode 100644 index c7097bc..0000000 --- a/usr/src/cmd/foo/i386/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# - -include ../Makefile.com - -install: all $(ROOTPROG) diff --git a/usr/src/cmd/foo/sparc/Makefile b/usr/src/cmd/foo/sparc/Makefile deleted file mode 100644 index c7097bc..0000000 --- a/usr/src/cmd/foo/sparc/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# - -include ../Makefile.com - -install: all $(ROOTPROG) diff --git a/usr/src/cmd/foo/sparcv9/Makefile b/usr/src/cmd/foo/sparcv9/Makefile deleted file mode 100644 index c5fdf07..0000000 --- a/usr/src/cmd/foo/sparcv9/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# - -include ../Makefile.com -include ../../Makefile.cmd.64 - -install: all $(ROOTPROG64) diff --git a/usr/src/cmd/fs.d/Makefile b/usr/src/cmd/fs.d/Makefile deleted file mode 100644 index ed47d82..0000000 --- a/usr/src/cmd/fs.d/Makefile +++ /dev/null @@ -1,75 +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 (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved. -# - - -include ../Makefile.cmd - -SUBDIR1= -SUBDIR2= -SUBDIRS= $(SUBDIR1) $(SUBDIR2) -I18NDIRS= $(SUBDIR2) - -all:= TARGET= all -install:= TARGET= install -clean:= TARGET= clean -clobber:= TARGET= clobber -lint:= TARGET= lint -_msg:= TARGET= catalog - -FSLIB= fslib.o -CLOBBERFILES += $(FSLIB) - -# for messaging catalog -# -POFILE= fs.d.po - -POFILES2= $(I18NDIRS:%=%/%.po) - -POFILES= $(POFILES1) $(POFILES2) - -.KEEP_STATE: - -# This is too intense when building the whole world. -# .PARALLEL: $(SUBDIRS) - -all: $(FSLIB) .WAIT $(SUBDIRS) - -_msg: $(I18NDIRS) $(POFILES1) $(POFILES_XPG4) - $(RM) $(POFILE) - cat $(POFILES) > $(POFILE) - $(RM) $(MSGDOMAIN)/$(POFILE) - cp $(POFILE) $(MSGDOMAIN) - -install: $(FSLIB) .WAIT $(SUBDIRS) - -clean: $(SUBDIRS) - -clobber: $(SUBDIRS) - $(RM) $(CLOBBERFILES) - -lint: - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET) - -FRC: diff --git a/usr/src/cmd/fs.d/Makefile.fstype b/usr/src/cmd/fs.d/Makefile.fstype deleted file mode 100644 index 2233045..0000000 --- a/usr/src/cmd/fs.d/Makefile.fstype +++ /dev/null @@ -1,97 +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 2009 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# cmd/fs.d/Makefile.fstype -# Definitions and targets common to "simple" file system types. -# - -# FSTYPE is name of filesystem type subdirectory to build -# PROG is a list of filesystem type programs to be installed BOTH in -# ../etc/fs/$(FSTYPE) and ../usr/lib/fs/$(FSTYPE) -# Those installed under etc/fs must be statically linked, while -# those installed under usr/lib/fs must be dynamically linked. -# ETCPROG is a list of filesystem type programs to be installed ONLY in -# ../etc/fs/$(FSTYPE) -# LIBPROG is a list of filesystem type programs to be installed ONLY in -# ../usr/lib/fs/$(FSTYPE) -# TYPEPROG is a list of filesystem type programs to be installed ONLY in -# ../usr/lib/$(FSTYPE) [as with nfs daemons] - -# include global command definitions; SRC should be defined in the shell. -# SRC is needed until RFE 1026993 is implemented. -include $(SRC)/cmd/Makefile.cmd - -FSCOMMONDIR= $(SRC)/cmd/fs.d -FSLIB= $(FSCOMMONDIR)/fslib.o -FSLIBSRC= $(FSLIB:%.o=%.c) - -ROOTETCFS= $(ROOTETC)/fs -ROOTLIBFS= $(ROOTLIB)/fs -FSDIRS= $(ROOTETCFS) $(ROOTLIBFS) -ROOTETCFSTYPE= $(ROOTETCFS)/$(FSTYPE) -ROOTLIBFSTYPE= $(ROOTLIBFS)/$(FSTYPE) -ROOTETCTYPE= $(ROOTETC)/$(FSTYPE) -ROOTLIBTYPE= $(ROOTLIB)/$(FSTYPE) -ROOTETCFSPROG= $(PROG:%=$(ROOTETCFSTYPE)/%) $(ETCPROG:%=$(ROOTETCFSTYPE)/%) -ROOTLIBFSPROG= $(PROG:%=$(ROOTLIBFSTYPE)/%) $(LIBPROG:%=$(ROOTLIBFSTYPE)/%) -ROOTTYPEPROG= $(TYPEPROG:%=$(ROOTLIBTYPE)/%) -FSTYPEDIRS= $(FSDIRS:%=%/$(FSTYPE)) $(ROOTETCTYPE) $(ROOTLIBTYPE) -FSTYPEPROG= $(ROOTETCFSPROG) $(ROOTLIBFSPROG) $(ROOTTYPEPROG) - -CLOBBERFILES += $(ETCPROG) $(LIBPROG) $(TYPEPROG) - -.KEEP_STATE: - -all: $(PROG) $(ETCPROG) $(LIBPROG) $(TYPEPROG) - -# FSDIRS are made by $(SRC)/Targetdirs via rootdirs in $(SRC)/Makefile -# Some FSTYPE directories are made there also and should not be made here, -# but it is easier to handle them as a class. "install" will not remake -# a directory that already exists. - -$(FSTYPEDIRS): - $(INS.dir) - -$(ROOTETCFSTYPE)/%: $(ROOTETCFSTYPE) % - $(INS.file) - -$(ROOTLIBFSTYPE)/%: $(ROOTLIBFSTYPE) % - $(INS.file) - -$(ROOTLIBTYPE)/%: $(ROOTLIBTYPE) % - $(INS.file) - -$(ROOTETCTYPE)/%: $(ROOTETCTYPE) % - $(INS.file) - -# Prevent fslib.o from being build in the sub makefiles. -$(FSLIB): - @: - -include $(SRC)/cmd/Makefile.targ - -install: all $(FSTYPEPROG) $(OTHERINSTALL) - -clean: - diff --git a/usr/src/cmd/fs.d/Makefile.mount b/usr/src/cmd/fs.d/Makefile.mount deleted file mode 100644 index 0f8083b..0000000 --- a/usr/src/cmd/fs.d/Makefile.mount +++ /dev/null @@ -1,39 +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/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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2004 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -COMMONOBJ= $(FSLIB) -COMMONSRC= $(COMMONOBJ:%.o=%.c) - -OBJS= $(LIBPROG).o $(COMMONOBJ) -SRCS= $(LIBPROG).c $(COMMONSRC) - -# for messaging catalog file -# -POFILE= $(LIBPROG).po - -CPPFLAGS += -I$(FSCOMMONDIR) diff --git a/usr/src/cmd/fs.d/Makefile.mount.targ b/usr/src/cmd/fs.d/Makefile.mount.targ deleted file mode 100644 index 50e9e98..0000000 --- a/usr/src/cmd/fs.d/Makefile.mount.targ +++ /dev/null @@ -1,44 +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/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 -# -# -#ident "%Z%%M% %I% %E% SMI" -# -# Copyright 2003 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# - -$(LIBPROG): $(OBJS) - $(LINK.c) $(OBJS) -o $@ $(LDLIBS) - $(POST_PROCESS) - -%.o: %.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -%.o: $(FSCOMMONDIR)/%.c - $(COMPILE.c) -o $@ $< - $(POST_PROCESS_O) - -lint: lint_SRCS - -catalog: $(POFILE) - cp $(POFILE) $(FSTYPE).po diff --git a/usr/src/cmd/fs.d/fslib.c b/usr/src/cmd/fs.d/fslib.c deleted file mode 100644 index 5948c1e..0000000 --- a/usr/src/cmd/fs.d/fslib.c +++ /dev/null @@ -1,559 +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 2008 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> -#include <stdarg.h> -#include <stdlib.h> -#include <unistd.h> -#include <libintl.h> -#include <string.h> -#include <fcntl.h> -#include <errno.h> -#include <syslog.h> -#include <alloca.h> -#include <sys/vfstab.h> -#include <sys/mnttab.h> -#include <sys/mntent.h> -#include <sys/mount.h> -#include <sys/filio.h> -#include <sys/fs/ufs_filio.h> -#include <sys/stat.h> -#include <sys/param.h> -#include <zone.h> -#include <signal.h> -#include <strings.h> -#include "fslib.h" - -/* LINTLIBRARY */ - -#define BUFLEN 256 - -#define TIME_MAX 16 - -/* - * Reads all of the entries from the in-kernel mnttab, and returns the - * linked list of the entries. - */ -mntlist_t * -fsgetmntlist(void) -{ - FILE *mfp; - mntlist_t *mntl; - char buf[BUFLEN]; - - if ((mfp = fopen(MNTTAB, "r")) == NULL) { - (void) snprintf(buf, BUFLEN, "fsgetmntlist: fopen %s", MNTTAB); - perror(buf); - return (NULL); - } - - mntl = fsmkmntlist(mfp); - - (void) fclose(mfp); - return (mntl); -} - - -static struct extmnttab zmnttab = { 0 }; - -struct extmnttab * -fsdupmnttab(struct extmnttab *mnt) -{ - struct extmnttab *new; - - new = (struct extmnttab *)malloc(sizeof (*new)); - if (new == NULL) - goto alloc_failed; - - *new = zmnttab; - /* - * Allocate an extra byte for the mountpoint - * name in case a space needs to be added. - */ - new->mnt_mountp = (char *)malloc(strlen(mnt->mnt_mountp) + 2); - if (new->mnt_mountp == NULL) - goto alloc_failed; - (void) strcpy(new->mnt_mountp, mnt->mnt_mountp); - - if ((new->mnt_special = strdup(mnt->mnt_special)) == NULL) - goto alloc_failed; - - if ((new->mnt_fstype = strdup(mnt->mnt_fstype)) == NULL) - goto alloc_failed; - - if (mnt->mnt_mntopts != NULL) - if ((new->mnt_mntopts = strdup(mnt->mnt_mntopts)) == NULL) - goto alloc_failed; - - if (mnt->mnt_time != NULL) - if ((new->mnt_time = strdup(mnt->mnt_time)) == NULL) - goto alloc_failed; - - new->mnt_major = mnt->mnt_major; - new->mnt_minor = mnt->mnt_minor; - return (new); - -alloc_failed: - (void) fprintf(stderr, gettext("fsdupmnttab: Out of memory\n")); - fsfreemnttab(new); - return (NULL); -} - -/* - * Free a single mnttab structure - */ -void -fsfreemnttab(struct extmnttab *mnt) -{ - - if (mnt) { - if (mnt->mnt_special) - free(mnt->mnt_special); - if (mnt->mnt_mountp) - free(mnt->mnt_mountp); - if (mnt->mnt_fstype) - free(mnt->mnt_fstype); - if (mnt->mnt_mntopts) - free(mnt->mnt_mntopts); - if (mnt->mnt_time) - free(mnt->mnt_time); - free(mnt); - } -} - -void -fsfreemntlist(mntlist_t *mntl) -{ - mntlist_t *mntl_tmp; - - while (mntl) { - fsfreemnttab(mntl->mntl_mnt); - mntl_tmp = mntl; - mntl = mntl->mntl_next; - free(mntl_tmp); - } -} - -/* - * Read the mnttab file and return it as a list of mnttab structs. - * Returns NULL if there was a memory failure. - */ -mntlist_t * -fsmkmntlist(FILE *mfp) -{ - struct extmnttab mnt; - mntlist_t *mhead, *mtail; - int ret; - - mhead = mtail = NULL; - - resetmnttab(mfp); - while ((ret = getextmntent(mfp, &mnt, sizeof (struct extmnttab))) - != -1) { - mntlist_t *mp; - - if (ret != 0) /* bad entry */ - continue; - - mp = (mntlist_t *)malloc(sizeof (*mp)); - if (mp == NULL) - goto alloc_failed; - if (mhead == NULL) - mhead = mp; - else - mtail->mntl_next = mp; - mtail = mp; - mp->mntl_next = NULL; - mp->mntl_flags = 0; - if ((mp->mntl_mnt = fsdupmnttab(&mnt)) == NULL) - goto alloc_failed; - } - return (mhead); - -alloc_failed: - fsfreemntlist(mhead); - return (NULL); -} - -/* - * Return the last entry that matches mntin's special - * device and/or mountpt. - * Helps to be robust here, so we check for NULL pointers. - */ -mntlist_t * -fsgetmlast(mntlist_t *ml, struct mnttab *mntin) -{ - mntlist_t *delete = NULL; - - for (; ml; ml = ml->mntl_next) { - if (mntin->mnt_mountp && mntin->mnt_special) { - /* - * match if and only if both are equal. - */ - if ((strcmp(ml->mntl_mnt->mnt_mountp, - mntin->mnt_mountp) == 0) && - (strcmp(ml->mntl_mnt->mnt_special, - mntin->mnt_special) == 0)) - delete = ml; - } else if (mntin->mnt_mountp) { - if (strcmp(ml->mntl_mnt->mnt_mountp, - mntin->mnt_mountp) == 0) - delete = ml; - } else if (mntin->mnt_special) { - if (strcmp(ml->mntl_mnt->mnt_special, - mntin->mnt_special) == 0) - delete = ml; - } - } - return (delete); -} - - -/* - * Returns the mountlevel of the pathname in cp. As examples, - * / => 1, /bin => 2, /bin/ => 2, ////bin////ls => 3, sdf => 0, etc... - */ -int -fsgetmlevel(char *cp) -{ - int mlevel; - char *cp1; - - if (cp == NULL || *cp == NULL || *cp != '/') - return (0); /* this should never happen */ - - mlevel = 1; /* root (/) is the minimal case */ - - for (cp1 = cp + 1; *cp1; cp++, cp1++) - if (*cp == '/' && *cp1 != '/') /* "///" counts as 1 */ - mlevel++; - - return (mlevel); -} - -/* - * Returns non-zero if string s is a member of the strings in ps. - */ -int -fsstrinlist(const char *s, const char **ps) -{ - const char *cp; - cp = *ps; - while (cp) { - if (strcmp(s, cp) == 0) - return (1); - ps++; - cp = *ps; - } - return (0); -} - -static char *empty_opt_vector[] = { - NULL -}; -/* - * Compare the mount options that were requested by the caller to - * the options actually supported by the file system. If any requested - * options are not supported, print a warning message. - * - * WARNING: this function modifies the string pointed to by - * the requested_opts argument. - * - * Arguments: - * requested_opts - the string containing the requested options. - * actual_opts - the string returned by mount(2), which lists the - * options actually supported. It is normal for this - * string to contain more options than the requested options. - * (The actual options may contain the default options, which - * may not have been included in the requested options.) - * special - device being mounted (only used in error messages). - * mountp - mount point (only used in error messages). - */ -void -cmp_requested_to_actual_options(char *requested_opts, char *actual_opts, - char *special, char *mountp) -{ - char *option_ptr, *actopt, *equalptr; - int found; - char *actual_opt_hold, *bufp; - - if (requested_opts == NULL) - return; - - bufp = alloca(strlen(actual_opts) + 1); - - while (*requested_opts != '\0') { - (void) getsubopt(&requested_opts, empty_opt_vector, - &option_ptr); - - /* - * Truncate any "=<value>" string from the end of - * the option. - */ - if ((equalptr = strchr(option_ptr, '=')) != NULL) - *equalptr = '\0'; - - if (*option_ptr == '\0') - continue; - - /* - * Whilst we don't need this option to perform a lofi - * mount, let's not be mendacious enough to complain - * about it. - */ - if (strcmp(option_ptr, "loop") == 0) - continue; - - /* - * Search for the requested option in the list of options - * actually supported. - */ - found = 0; - - /* - * Need to use a copy of actual_opts because getsubopt - * is destructive and we need to scan the actual_opts - * string more than once. - * - * We also need to reset actual_opt_hold to the - * beginning of the buffer because getsubopt changes - * actual_opt_hold (the pointer). - */ - actual_opt_hold = bufp; - if (actual_opts != NULL) - (void) strcpy(actual_opt_hold, actual_opts); - else - *actual_opt_hold = '\0'; - - while (*actual_opt_hold != '\0') { - (void) getsubopt(&actual_opt_hold, empty_opt_vector, - &actopt); - - /* Truncate the "=<value>", if any. */ - if ((equalptr = strchr(actopt, '=')) != NULL) - *equalptr = '\0'; - - if ((strcmp(option_ptr, actopt)) == 0) { - found = 1; - break; - } - } - - if (found == 0) { - /* - * That we're ignoring the option is always - * truthful; the old message that the option - * was unknown is often not correct. - */ - (void) fprintf(stderr, gettext( - "mount: %s on %s - WARNING ignoring option " - "\"%s\"\n"), special, mountp, option_ptr); - } - } -} -/* - * FUNCTION: fsgetmaxphys(int *, int *) - * - * INPUT: int *maxphys - a pointer to an integer that will hold - * the value for the system maxphys value. - * int *error - 0 means completed successfully - * otherwise this indicates the errno value. - * - * RETURNS: int - 0 if maxphys not found - * - 1 if maxphys is found - */ -int -fsgetmaxphys(int *maxphys, int *error) { - - int gotit = 0; - int fp = open("/", O_RDONLY); - - *error = 0; - - /* - * For some reason cannot open root as read only. Need a valid file - * descriptor to call the ufs private ioctl. If this open failes, - * just assume we cannot get maxphys in this case. - */ - if (fp == -1) { - return (gotit); - } - - if (ioctl(fp, _FIOGETMAXPHYS, maxphys) == -1) { - *error = errno; - (void) close(fp); - return (gotit); - } - - (void) close(fp); - gotit = 1; - return (gotit); - -} - -/* - * The below is limited support for zone-aware commands. - */ -struct zone_summary { - zoneid_t zoneid; - char rootpath[MAXPATHLEN]; - size_t rootpathlen; -}; - -struct zone_summary * -fs_get_zone_summaries(void) -{ - uint_t numzones = 0, oldnumzones = 0; - uint_t i, j; - zoneid_t *ids = NULL; - struct zone_summary *summaries; - zoneid_t myzoneid = getzoneid(); - - for (;;) { - if (zone_list(ids, &numzones) < 0) { - perror("unable to retrieve list of zones"); - if (ids != NULL) - free(ids); - return (NULL); - } - if (numzones <= oldnumzones) - break; - if (ids != NULL) - free(ids); - ids = malloc(numzones * sizeof (*ids)); - if (ids == NULL) { - perror("malloc failed"); - return (NULL); - } - oldnumzones = numzones; - } - - summaries = malloc((numzones + 1) * sizeof (*summaries)); - if (summaries == NULL) { - free(ids); - perror("malloc failed"); - return (NULL); - } - - - for (i = 0, j = 0; i < numzones; i++) { - ssize_t len; - - if (ids[i] == myzoneid) - continue; - len = zone_getattr(ids[i], ZONE_ATTR_ROOT, - summaries[j].rootpath, sizeof (summaries[j].rootpath)); - if (len < 0) { - /* - * Zone must have gone away. Skip. - */ - continue; - } - /* - * Adding a trailing '/' to the zone's rootpath allows us to - * use strncmp() to see if a given path resides within that - * zone. - * - * As an example, if the zone's rootpath is "/foo/root", - * "/foo/root/usr" resides within the zone, while - * "/foo/rootpath" doesn't. - */ - (void) strlcat(summaries[j].rootpath, "/", - sizeof (summaries[j].rootpath)); - summaries[j].rootpathlen = len; - summaries[j].zoneid = ids[i]; - j++; - } - summaries[j].zoneid = -1; - free(ids); - return (summaries); -} - -static zoneid_t -fs_find_zone(const struct zone_summary *summaries, const char *mntpt) -{ - uint_t i; - - for (i = 0; summaries[i].zoneid != -1; i++) { - if (strncmp(mntpt, summaries[i].rootpath, - summaries[i].rootpathlen) == 0) - return (summaries[i].zoneid); - } - /* - * (-1) is the special token we return to the caller if the mount - * wasn't found in any other mounts on the system. This means it's - * only visible to our zone. - * - * Odd choice of constant, I know, but it beats calling getzoneid() a - * million times. - */ - return (-1); -} - -boolean_t -fs_mount_in_other_zone(const struct zone_summary *summaries, const char *mntpt) -{ - return (fs_find_zone(summaries, mntpt) != -1); -} - -/* - * List of standard options. - */ -static const char *stdopts[] = { - MNTOPT_RO, MNTOPT_RW, - MNTOPT_SUID, MNTOPT_NOSUID, - MNTOPT_DEVICES, MNTOPT_NODEVICES, - MNTOPT_SETUID, MNTOPT_NOSETUID, - MNTOPT_NBMAND, MNTOPT_NONBMAND, - MNTOPT_EXEC, MNTOPT_NOEXEC, -}; - -#define NSTDOPT (sizeof (stdopts) / sizeof (stdopts[0])) - -static int -optindx(const char *opt) -{ - int i; - - for (i = 0; i < NSTDOPT; i++) { - if (strcmp(opt, stdopts[i]) == 0) - return (i); - } - return (-1); -} - -/* - * INPUT: filesystem option not recognized by the fs specific option - * parsing code. - * OUTPUT: True if and only if the option is one of the standard VFS - * layer options. - */ -boolean_t -fsisstdopt(const char *opt) -{ - return (optindx(opt) != -1); -} diff --git a/usr/src/cmd/fs.d/fslib.h b/usr/src/cmd/fs.d/fslib.h deleted file mode 100644 index 69216bf..0000000 --- a/usr/src/cmd/fs.d/fslib.h +++ /dev/null @@ -1,93 +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/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 2004 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - */ - -#ifndef _FSLIB_H -#define _FSLIB_H - -#pragma ident "%Z%%M% %I% %E% SMI" - -#ifdef __cplusplus -extern "C" { -#endif - -#include <sys/mnttab.h> - -/* - * This structure is used to build a list of - * mnttab structures from /etc/mnttab. - */ -typedef struct mntlist { - int mntl_flags; - uint_t mntl_dev; - struct extmnttab *mntl_mnt; - struct mntlist *mntl_next; -} mntlist_t; - -/* - * Bits for mntl_flags. - */ -#define MNTL_UNMOUNT 0x01 /* unmount this entry */ -#define MNTL_DIRECT 0x02 /* direct mount entry */ - -/* - * Routines available in fslib.c: - */ -void fsfreemnttab(struct extmnttab *); -struct extmnttab *fsdupmnttab(struct extmnttab *); -void fsfreemntlist(mntlist_t *); - -mntlist_t *fsmkmntlist(FILE *); -mntlist_t *fsgetmntlist(void); -mntlist_t *fsgetmlast(mntlist_t *, struct mnttab *); -void cmp_requested_to_actual_options(char *, char *, char *, char *); - -int fsgetmlevel(char *); -int fsstrinlist(const char *, const char **); -int fsgetmaxphys(int *, int *); - -boolean_t fsisstdopt(const char *); - -/* - * Routines for determining which zone a mount resides in. - */ -struct zone_summary; - -struct zone_summary *fs_get_zone_summaries(void); -boolean_t fs_mount_in_other_zone(const struct zone_summary *, - const char *); - -#undef MIN -#undef MAX -#define MIN(a, b) ((a) < (b) ? (a) : (b)) -#define MAX(a, b) ((a) > (b) ? (a) : (b)) - -#define MAXLINE 2048 - -#ifdef __cplusplus -} -#endif - -#endif /* _FSLIB_H */ diff --git a/usr/src/cmd/mdb/Makefile b/usr/src/cmd/mdb/Makefile index 886647c..a2b59fa 100644 --- a/usr/src/cmd/mdb/Makefile +++ b/usr/src/cmd/mdb/Makefile @@ -30,7 +30,6 @@ include $(SRC)/Makefile.master sparc_SUBDIRS = i386_SUBDIRS = \ - foo \ i915 SUBDIRS = $($(MACH)_SUBDIRS) diff --git a/usr/src/cmd/mdb/foo/Makefile b/usr/src/cmd/mdb/foo/Makefile deleted file mode 100644 index b1cbc27..0000000 --- a/usr/src/cmd/mdb/foo/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2016 Gordon Ross <gordon.w.ross@gmail.com> -# - -include $(SRC)/Makefile.master -SUBDIRS = ia32 -$(BUILD64)SUBDIRS += $(MACH64) -include ../Makefile.subdirs diff --git a/usr/src/cmd/mdb/foo/amd64/Makefile b/usr/src/cmd/mdb/foo/amd64/Makefile deleted file mode 100644 index 42f7bec..0000000 --- a/usr/src/cmd/mdb/foo/amd64/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2016 Gordon Ross <gordon.w.ross@gmail.com> -# - -MODULE = foo.so -MDBTGT = kvm - -MODSRCS = foo.c - -include ../../../Makefile.cmd -include ../../../Makefile.cmd.64 -include ../../Makefile.amd64 -include ../../Makefile.module - -CPPFLAGS += -I$(SRC)/uts/common diff --git a/usr/src/cmd/mdb/foo/foo.c b/usr/src/cmd/mdb/foo/foo.c deleted file mode 100644 index 2220c02..0000000 --- a/usr/src/cmd/mdb/foo/foo.c +++ /dev/null @@ -1,96 +0,0 @@ -/* - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - */ - -/* - * Copyright 2016 Gordon Ross <gordon.w.ross@gmail.com> - */ - -/* - * Example mdb module: foo - */ -#include <sys/mdb_modapi.h> -#include <sys/foo.h> - -/* - * One would be correct to observe that a dcmd is unnecessary for - * just printing a variable with mdb. This is just an example, - * where a more real-world case would print something larger and - * more complex than a foocnt_t. - */ - -void -foo_cnt_help(void) -{ - mdb_printf("Print device ID information of Intel graphics card.\n"); -} - -/* ARGSUSED */ -static int -foo_cnt_dcmd(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv) -{ - GElf_Sym sym; - foocnt_t count; - - /* Does not take an address. */ - if (flags & DCMD_ADDRSPEC) - return (DCMD_USAGE); - - /* Locate the foo_count variable */ - if (mdb_lookup_by_obj("foo", "foo_count", &sym)) { - mdb_warn("failed to lookup `foo_count'\n"); - return (DCMD_ERR); - } - addr = (uintptr_t)sym.st_value; - - if (mdb_vread(&count, sizeof (count), addr) == -1) { - mdb_warn("failed to read foo_count at %p", addr); - return (DCMD_ERR); - } - - mdb_printf("foo_count = %d\n", count); - - return (DCMD_OK); -} - - -/* - * MDB module linkage information: - * - * We declare a list of structures describing our dcmds, a list of structures - * describing our walkers, and a function named _mdb_init to return a pointer - * to our module information. - */ - -static const mdb_dcmd_t dcmds[] = { - { - "foo_cnt", - "?", - "get foo_count", - foo_cnt_dcmd, - foo_cnt_help - }, - { NULL } -}; - -static const mdb_walker_t walkers[] = { - /* none */ - { NULL } -}; - -static const mdb_modinfo_t modinfo = { - MDB_API_VERSION, dcmds, walkers -}; - -const mdb_modinfo_t * -_mdb_init(void) -{ - return (&modinfo); -} diff --git a/usr/src/cmd/mdb/foo/ia32/Makefile b/usr/src/cmd/mdb/foo/ia32/Makefile deleted file mode 100644 index a9f1187..0000000 --- a/usr/src/cmd/mdb/foo/ia32/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2016 Gordon Ross <gordon.w.ross@gmail.com> -# - -MODULE = foo.so -MDBTGT = kvm - -MODSRCS = foo.c - -include ../../../Makefile.cmd -include ../../Makefile.ia32 -include ../../Makefile.module - -CPPFLAGS += -I$(SRC)/uts/common diff --git a/usr/src/lib/Makefile b/usr/src/lib/Makefile index e234330..d765c31 100644 --- a/usr/src/lib/Makefile +++ b/usr/src/lib/Makefile @@ -45,7 +45,6 @@ include ../Makefile.master # # SUBDIRS= \ - libfoo \ $($(MACH)_SUBDIRS) i386_SUBDIRS= \ @@ -72,7 +71,6 @@ DCSUBDIRS = MSGSUBDIRS= \ - libfoo \ $($(MACH)_MSGSUBDIRS) sparc_MSGSUBDIRS= diff --git a/usr/src/lib/libdrm/Makefile.pc b/usr/src/lib/libdrm/Makefile.pc index 28221ac..a01589c 100644 --- a/usr/src/lib/libdrm/Makefile.pc +++ b/usr/src/lib/libdrm/Makefile.pc @@ -13,6 +13,8 @@ # Copyright 2016 Gordon W. Ross # +CLOBBERFILES += $(PCS) + ROOTPCDIR= $(ROOT)/usr/lib/pkgconfig ROOTPCDIR64= $(ROOT)/usr/lib/$(MACH64)/pkgconfig diff --git a/usr/src/lib/libfoo/Makefile b/usr/src/lib/libfoo/Makefile deleted file mode 100644 index d803339..0000000 --- a/usr/src/lib/libfoo/Makefile +++ /dev/null @@ -1,75 +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 2011 Nexenta Systems, Inc. All rights reserved. -# - -# include library definitions -include ../Makefile.lib - -SUBDIRS = $(MACH) -$(BUILD64)SUBDIRS += $(MACH64) - -all := TARGET= all -clean := TARGET= clean -clobber := TARGET= clobber -install := TARGET= install -lint := TARGET= lint - -HDRS= foo.h -HDRDIR = common -ROOTHDRDIR= $(ROOT)/usr/include/libfoo -POFILE = libfoo.po -MSGFILES = `$(GREP) -l gettext common/*.[ch]` - -.KEEP_STATE: - -install: all .WAIT $(SUBDIRS) - -all clean clobber lint: $(SUBDIRS) - -install_h: $(ROOTHDRS) - -# need to make libfoo dir -$(ROOTHDRS) : $(ROOTHDRDIR) -$(ROOTHDRDIR) : - $(INS.dir) $@ - -check: $(CHECKHDRS) - -_msg: $(MSGDOMAINPOFILE) - -$(POFILE): pofile_MSGFILES - -# install rule for install_h target -$(ROOTHDRDIR)/%: % - $(INS.file) - -$(SUBDIRS): FRC - @cd $@; pwd; $(MAKE) $(TARGET) - -FRC: - -include ../Makefile.targ -include ../../Makefile.msg.targ diff --git a/usr/src/lib/libfoo/Makefile.com b/usr/src/lib/libfoo/Makefile.com deleted file mode 100644 index 074be62..0000000 --- a/usr/src/lib/libfoo/Makefile.com +++ /dev/null @@ -1,52 +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 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# - -LIBRARY= libfoo.a -VERS= .1 -OBJECTS= getcnt.o - -include ../../Makefile.lib - -LIBS = $(DYNLIB) $(LINTLIB) - -SRCDIR = ../common -SRCS = $(OBJECTS:%.o=$(SRCDIR)/%.c) - -$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) - -CPPFLAGS += -I$(SRCDIR) \ - -I$(SRC)/uts/common -CFLAGS += $(CCVERBOSE) -LDLIBS += -lc - -all : $(LIBS) - -lint : lintcheck - -include ../../Makefile.targ - -.KEEP_STATE: diff --git a/usr/src/lib/libfoo/amd64/Makefile b/usr/src/lib/libfoo/amd64/Makefile deleted file mode 100644 index 05988f5..0000000 --- a/usr/src/lib/libfoo/amd64/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# - -include ../Makefile.com -include ../../Makefile.lib.64 - -install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/lib/libfoo/common/foo.h b/usr/src/lib/libfoo/common/foo.h deleted file mode 100644 index f88b468..0000000 --- a/usr/src/lib/libfoo/common/foo.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - */ - -/* - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - */ -#ifndef _FOO_H -#define _FOO_H - -#include <sys/types.h> - -#ifdef __cplusplus -extern "C" { -#endif - -int foo_getcnt(uint32_t *); -const char *foo_message(uint32_t); - -#ifdef __cplusplus -} -#endif - -#endif /* _FOO_H */ diff --git a/usr/src/lib/libfoo/common/getcnt.c b/usr/src/lib/libfoo/common/getcnt.c deleted file mode 100644 index c97ac28..0000000 --- a/usr/src/lib/libfoo/common/getcnt.c +++ /dev/null @@ -1,36 +0,0 @@ - -#include <stdio.h> -#include <errno.h> -#include <fcntl.h> -#include <libintl.h> -#include <unistd.h> - -#include <sys/types.h> -#include <sys/foo.h> - -int -foo_getcnt(uint32_t *cntp) -{ - const char *devnm = "/dev/foo"; - int fd, rc; - - fd = open(devnm, O_RDONLY, 0); - if (fd == -1) - return (errno); - rc = ioctl(fd, FOO_IOC_GETCNT, cntp); - close(fd); - - if (rc == -1) - return (errno); - - return (0); -} - -const char * -foo_message(int cnt) -{ - const char *msg; - - msg = gettext("This is just an example"); - return (msg); -} diff --git a/usr/src/lib/libfoo/common/llib-lfoo b/usr/src/lib/libfoo/common/llib-lfoo deleted file mode 100644 index 4bf876f..0000000 --- a/usr/src/lib/libfoo/common/llib-lfoo +++ /dev/null @@ -1,6 +0,0 @@ - -/*LINTLIBRARY*/ -/*PROTOLIB1*/ - -#include <sys/types.h> -#include <sys/foo.h> diff --git a/usr/src/lib/libfoo/common/mapfile-vers b/usr/src/lib/libfoo/common/mapfile-vers deleted file mode 100644 index e99c4fc..0000000 --- a/usr/src/lib/libfoo/common/mapfile-vers +++ /dev/null @@ -1,25 +0,0 @@ - -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# - - -$mapfile_version 2 - -SYMBOL_VERSION FOOprivate_1.1 { - global: - foo_getcnt; - local: - *; -}; diff --git a/usr/src/lib/libfoo/i386/Makefile b/usr/src/lib/libfoo/i386/Makefile deleted file mode 100644 index b4dc36b..0000000 --- a/usr/src/lib/libfoo/i386/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# - -include ../Makefile.com - -install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) diff --git a/usr/src/lib/libfoo/sparc/Makefile b/usr/src/lib/libfoo/sparc/Makefile deleted file mode 100644 index b4dc36b..0000000 --- a/usr/src/lib/libfoo/sparc/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# - -include ../Makefile.com - -install: all $(ROOTLIBS) $(ROOTLINKS) $(ROOTLINT) diff --git a/usr/src/lib/libfoo/sparcv9/Makefile b/usr/src/lib/libfoo/sparcv9/Makefile deleted file mode 100644 index 05988f5..0000000 --- a/usr/src/lib/libfoo/sparcv9/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# - -include ../Makefile.com -include ../../Makefile.lib.64 - -install: all $(ROOTLIBS64) $(ROOTLINKS64) diff --git a/usr/src/man/man1/Makefile b/usr/src/man/man1/Makefile index f0fbf24..4c80f51 100644 --- a/usr/src/man/man1/Makefile +++ b/usr/src/man/man1/Makefile @@ -17,7 +17,7 @@ include $(SRC)/Makefile.master MANSECT= 1 -MANFILES= foo.1 +MANFILES= MANLINKS= diff --git a/usr/src/man/man1/foo.1 b/usr/src/man/man1/foo.1 deleted file mode 100644 index 3a0023e..0000000 --- a/usr/src/man/man1/foo.1 +++ /dev/null @@ -1,36 +0,0 @@ -.\" -.\" This file and its contents are supplied under the terms of the -.\" Common Development and Distribution License ("CDDL"), version 1.0. -.\" You may only use this file in accordance with the terms of version -.\" 1.0 of the CDDL. -.\" -.\" A full copy of the text of the CDDL should have accompanied this -.\" source. A copy of the CDDL is also available via the Internet at -.\" http://www.illumos.org/license/CDDL. -.\" -.\" -.\" Copyright 2015 Nexenta Systems, Inc. -.\" -.Dd "Apr 7, 2015" -.Dt FOO 1 -.Os -.Sh NAME -.Nm foo -.Nd example command -.Sh SYNOPSIS -.Nm foo -.Op Fl v -.Sh DESCRIPTION -The -.Nm -command is a dummy example for the on-skeleton repository. -It does nothing interesting, other than demonstrate a -command and a library. -.Sh OPTIONS -.Bl -tag -width indent -.It Fl v -Verbose mode. -.El -.Sh SEE ALSO -.Xr foo 3x , -.Xr foo 7 diff --git a/usr/src/man/man3x/Makefile b/usr/src/man/man3x/Makefile index f48fc91..f45080f 100644 --- a/usr/src/man/man3x/Makefile +++ b/usr/src/man/man3x/Makefile @@ -17,13 +17,9 @@ include $(SRC)/Makefile.master MANSECT= 3x -MANFILES= foo.3x +MANFILES= -MANLINKS= foo_getcnt.3x foo_message.3x libfoo.3x - -foo_getcnt.3x := LINKSRC = foo.3x -foo_message.3x := LINKSRC = foo.3x -libfoo.3x := LINKSRC = foo.3x +MANLINKS= .KEEP_STATE: diff --git a/usr/src/man/man3x/foo.3x b/usr/src/man/man3x/foo.3x deleted file mode 100644 index c0f8717..0000000 --- a/usr/src/man/man3x/foo.3x +++ /dev/null @@ -1,53 +0,0 @@ -.\" -.\" This file and its contents are supplied under the terms of the -.\" Common Development and Distribution License ("CDDL"), version 1.0. -.\" You may only use this file in accordance with the terms of version -.\" 1.0 of the CDDL. -.\" -.\" A full copy of the text of the CDDL should have accompanied this -.\" source. A copy of the CDDL is also available via the Internet at -.\" http://www.illumos.org/license/CDDL. -.\" -.\" -.\" Copyright 2015 Nexenta Systems, Inc. -.\" -.Dd "Apr 7, 2015" -.Dt FOO 3X -.Os -.Sh NAME -.Nm foo_getcnt , -.Nm foo_message , -.Nm libfoo -.Nd get counter stored in /dev/foo -.Sh SYNOPSIS -.In libfoo/foo.h -.Ft int -.Fo foo_getcnt -.Fa int * -.Fc -.Ft int -.Fo foo_message -.Fa void -.Fc -.Sh DESCRIPTION -The -.Fn foo_getcnt -function gets a counter from the -.Sy /dev/foo -device. -The -.Fn foo_message -function returns a message. -.Sh RETURN VALUES -Upon successful completion, -.Fn foo_message -returns -.Sy 0 . -Otherwise, it returns an -.Sy errno -value. -.Sh ERRORS -No errors are defined. -.Sh SEE ALSO -.Xr foo 1 , -.Xr foo 7 diff --git a/usr/src/man/man7/Makefile b/usr/src/man/man7/Makefile index 48ac28e..7307459 100644 --- a/usr/src/man/man7/Makefile +++ b/usr/src/man/man7/Makefile @@ -29,8 +29,8 @@ GENLINKS= \ drm-gem.7 \ drm-ttm.7 -MANFILES= foo.7 \ - $(GENMANS) +MANFILES= $(GENMANS) + MANLINKS= .KEEP_STATE: diff --git a/usr/src/man/man7/foo.7 b/usr/src/man/man7/foo.7 deleted file mode 100644 index 660c34e..0000000 --- a/usr/src/man/man7/foo.7 +++ /dev/null @@ -1,31 +0,0 @@ -.\" -.\" This file and its contents are supplied under the terms of the -.\" Common Development and Distribution License ("CDDL"), version 1.0. -.\" You may only use this file in accordance with the terms of version -.\" 1.0 of the CDDL. -.\" -.\" A full copy of the text of the CDDL should have accompanied this -.\" source. A copy of the CDDL is also available via the Internet at -.\" http://www.illumos.org/license/CDDL. -.\" -.\" -.\" Copyright 2015 Nexenta Systems, Inc. -.\" -.Dd "Apr 7, 2015" -.Dt FOO 7 -.Os -.Sh NAME -.Nm foo -.Nd example "foo" driver -.Sh SYNOPSIS -.In sys/foo.h -.Sh DESCRIPTION -The -.Fn foo -driver is a simple example that just implements one -.Xr ioctl 2 -function: -.Sy FOO_IOC_GETCNT . -.Sh SEE ALSO -.Xr foo 1 , -.Xr libfoo 3x diff --git a/usr/src/uts/common/Makefile.files b/usr/src/uts/common/Makefile.files index 502a97f..1cc38bd 100644 --- a/usr/src/uts/common/Makefile.files +++ b/usr/src/uts/common/Makefile.files @@ -56,7 +56,6 @@ GENSTUBS_OBJS += $(COMMON_GENSTUBS_OBJS) $($(MACH)_GENSTUBS_OBJS) # Driver (pseudo-driver) Modules # -FOO_OBJS += foo.o diff --git a/usr/src/uts/common/Makefile.rules b/usr/src/uts/common/Makefile.rules index 6507381..ecd9df3 100644 --- a/usr/src/uts/common/Makefile.rules +++ b/usr/src/uts/common/Makefile.rules @@ -43,13 +43,7 @@ # Section 1a: C objects build rules # -$(OBJS_DIR)/%.o: $(UTSBASE)/common/io/foo/%.c - $(COMPILE.c) -o $@ $< - $(CTFCONVERT_O) # # Section 1b: Lint `objects' # - -$(LINTS_DIR)/%.ln: $(UTSBASE)/common/io/foo/%.c - @($(LHEAD) $(LINT.c) $< $(LTAIL)) diff --git a/usr/src/uts/common/io/foo/LICENSE b/usr/src/uts/common/io/foo/LICENSE deleted file mode 100644 index 27d86ba..0000000 --- a/usr/src/uts/common/io/foo/LICENSE +++ /dev/null @@ -1,25 +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 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - */ diff --git a/usr/src/uts/common/io/foo/LICENSE.descrip b/usr/src/uts/common/io/foo/LICENSE.descrip deleted file mode 100644 index db9ad86..0000000 --- a/usr/src/uts/common/io/foo/LICENSE.descrip +++ /dev/null @@ -1 +0,0 @@ -"foo" example driver diff --git a/usr/src/uts/common/io/foo/foo.c b/usr/src/uts/common/io/foo/foo.c deleted file mode 100644 index 2780878..0000000 --- a/usr/src/uts/common/io/foo/foo.c +++ /dev/null @@ -1,219 +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 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. - * - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - */ - - -/* - * Sample driver - */ - -#include <sys/types.h> -#include <sys/errno.h> -#include <sys/stat.h> - -#include <sys/file.h> -#include <sys/open.h> -#include <sys/poll.h> -#include <sys/uio.h> -#include <sys/cred.h> -#include <sys/modctl.h> -#include <sys/conf.h> -#include <sys/ddi.h> -#include <sys/sunddi.h> - -#include <sys/foo.h> - -static dev_info_t *foo_dip; -static uint32_t foo_count; - -static int foo_open(dev_t *, int, int, cred_t *); -static int foo_close(dev_t, int, int, cred_t *); -static int foo_ioctl(dev_t dev, int cmd, intptr_t arg, int mode, - cred_t *credp, int *rvalp); - -static int foo_attach(dev_info_t *, ddi_attach_cmd_t); -static int foo_detach(dev_info_t *, ddi_detach_cmd_t); -static int foo_getinfo(dev_info_t *, ddi_info_cmd_t, void *, void **); - -/* DDI declarations */ -static struct cb_ops foo_cb_ops = { - foo_open, /* open */ - foo_close, /* close */ - nodev, /* strategy */ - nodev, /* print */ - nodev, /* dump */ - nodev, /* read */ - nodev, /* write */ - foo_ioctl, /* ioctl */ - nodev, /* devmap */ - nodev, /* mmap */ - nodev, /* segmap */ - nochpoll, /* chpoll */ - ddi_prop_op, /* prop_op */ - NULL, /* streamtab */ - (D_NEW | D_MP), /* cb_flag */ - CB_REV, /* cb_rev */ - nodev, /* aread */ - nodev /* awrite */ -}; - -static struct dev_ops foo_ops = { - DEVO_REV, /* devo_rev, */ - 0, /* refcnt */ - foo_getinfo, /* get_dev_info */ - nulldev, /* identify */ - nulldev, /* probe */ - foo_attach, /* attach */ - foo_detach, /* detach */ - nodev, /* reset */ - &foo_cb_ops, /* driver operations */ - NULL, /* bus operations */ - NULL, /* power */ - ddi_quiesce_not_needed, /* quiesce */ -}; - -/* Modlinkage */ -static struct modldrv modldrv = { - &mod_driverops, - "foo sample device", - &foo_ops -}; - -static struct modlinkage modlinkage = { MODREV_1, { &modldrv, NULL } }; - - -/* DDI glue */ - -int -_init(void) -{ - return (mod_install(&modlinkage)); -} - -int -_fini(void) -{ - return (mod_remove(&modlinkage)); -} - -int -_info(struct modinfo *modinfop) -{ - return (mod_info(&modlinkage, modinfop)); -} - -static int -foo_attach(dev_info_t *dip, ddi_attach_cmd_t cmd) -{ - if (cmd != DDI_ATTACH) - return (DDI_FAILURE); - - if (ddi_create_minor_node(dip, "foo", S_IFCHR, 0, - DDI_PSEUDO, 0) == DDI_FAILURE) { - ddi_remove_minor_node(dip, NULL); - return (DDI_FAILURE); - } - - foo_dip = dip; - - return (DDI_SUCCESS); -} - -static int -foo_detach(dev_info_t *dip, ddi_detach_cmd_t cmd) -{ - if (cmd != DDI_DETACH) - return (DDI_FAILURE); - - foo_dip = NULL; - ddi_remove_minor_node(dip, NULL); - - return (DDI_SUCCESS); -} - -/*ARGSUSED*/ -static int -foo_getinfo(dev_info_t *dip, ddi_info_cmd_t infocmd, void *arg, void **result) -{ - int error; - - switch (infocmd) { - case DDI_INFO_DEVT2DEVINFO: - *result = foo_dip; - error = DDI_SUCCESS; - break; - case DDI_INFO_DEVT2INSTANCE: - *result = (void *)0; - error = DDI_SUCCESS; - break; - default: - error = DDI_FAILURE; - } - return (error); -} - -/*ARGSUSED3*/ -static int -foo_open(dev_t *devp, int flag, int otyp, cred_t *credp) -{ - if (otyp != OTYP_CHR) - return (EINVAL); - - if (flag & FEXCL) - return (EINVAL); - - return (0); -} - -/*ARGSUSED*/ -static int -foo_close(dev_t dev, int flag, int otyp, cred_t *credp) -{ - return (0); -} - -/*ARGSUSED*/ -static int -foo_ioctl(dev_t dev, int cmd, intptr_t arg, int flags, /* model.h */ - cred_t *cr, int *rvalp) -{ - int err; - - err = 0; - switch (cmd) { - case FOO_IOC_GETCNT: - atomic_inc_32(&foo_count); - if (ddi_copyout(&foo_count, (void *)arg, - sizeof (foo_count), flags)) - err = EFAULT; - break; - - default: - err = ENOTTY; - break; - } - - return (err); -} diff --git a/usr/src/uts/common/io/foo/foo.conf b/usr/src/uts/common/io/foo/foo.conf deleted file mode 100644 index e3ea1cc..0000000 --- a/usr/src/uts/common/io/foo/foo.conf +++ /dev/null @@ -1,16 +0,0 @@ -# -# This file and its contents are supplied under the terms of the -# Common Development and Distribution License ("CDDL"), version 1.0. -# You may only use this file in accordance with the terms of version -# 1.0 of the CDDL. -# -# A full copy of the text of the CDDL should have accompanied this -# source. A copy of the CDDL is also available via the Internet at -# http://www.illumos.org/license/CDDL. -# - -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# -name="foo" parent="pseudo"; - diff --git a/usr/src/uts/common/sys/Makefile b/usr/src/uts/common/sys/Makefile index c43bcf2..118fed0 100644 --- a/usr/src/uts/common/sys/Makefile +++ b/usr/src/uts/common/sys/Makefile @@ -49,8 +49,7 @@ sparc_HDRS= GENHDRS= # Normal headers -CHKHDRS= \ - foo.h +CHKHDRS= HDRS= $(GENHDRS) $(CHKHDRS) diff --git a/usr/src/uts/common/sys/foo.h b/usr/src/uts/common/sys/foo.h deleted file mode 100644 index ddc515a..0000000 --- a/usr/src/uts/common/sys/foo.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file and its contents are supplied under the terms of the - * Common Development and Distribution License ("CDDL"), version 1.0. - * You may only use this file in accordance with the terms of version - * 1.0 of the CDDL. - * - * A full copy of the text of the CDDL should have accompanied this - * source. A copy of the CDDL is also available via the Internet at - * http://www.illumos.org/license/CDDL. - */ - -/* - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. - */ - -#ifndef _SYS_FOO_H -#define _SYS_FOO_H - -#include <sys/types.h> - -#ifdef __cplusplus -extern "C" { -#endif - -#define FOO_IOC_GETCNT 1 -typedef uint32_t foocnt_t; - -#ifndef _KERNEL -extern int foo_getcnt(uint32_t *); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* _SYS_FOO_H */ diff --git a/usr/src/uts/intel/foo/Makefile b/usr/src/uts/intel/foo/Makefile deleted file mode 100644 index 0d0946a..0000000 --- a/usr/src/uts/intel/foo/Makefile +++ /dev/null @@ -1,103 +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 -# -# -# uts/intel/foo/Makefile -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# -# This makefile drives the production of the foo `drv' -# kernel module. -# -# intel implementation architecture dependent -# - -# -# Path to the base of the uts directory tree (usually /usr/src/uts). -# -UTSBASE = ../.. - -# -# Define the module and object file sets. -# -MODULE = foo -OBJECTS = $(FOO_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(FOO_OBJS:%.o=$(LINTS_DIR)/%.ln) -ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) -CONF_SRCDIR = $(UTSBASE)/common/io/foo - -# -# Include common rules. -# -include $(UTSBASE)/intel/Makefile.intel - -# -# Define targets -# -ALL_TARGET = $(BINARY) # $(SRC_CONFILE) -LINT_TARGET = $(MODULE).lint -INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) - -# -# Overrides -# - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN - -CERRWARN += -_gcc=-Wno-unused-parameter - -# -# Driver depends on MAC -# -# LDFLAGS += -dy -N misc/mac - -# -# Default build targets. -# -.KEEP_STATE: - -def: $(DEF_DEPS) - -all: $(ALL_DEPS) - -clean: $(CLEAN_DEPS) - -clobber: $(CLOBBER_DEPS) - -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - -install: $(INSTALL_DEPS) - -# -# Include common targets. -# -include $(UTSBASE)/intel/Makefile.targ diff --git a/usr/src/uts/sparc/foo/Makefile b/usr/src/uts/sparc/foo/Makefile deleted file mode 100644 index f24f608..0000000 --- a/usr/src/uts/sparc/foo/Makefile +++ /dev/null @@ -1,101 +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 -# -# -# uts/sparc/foo/Makefile -# -# Copyright 2008 Sun Microsystems, Inc. All rights reserved. -# Use is subject to license terms. -# -# Copyright 2011 Nexenta Systems, Inc. All rights reserved. -# -# This makefile drives the production of the foo `drv' -# kernel module. -# - -# -# Path to the base of the uts directory tree (usually /usr/src/uts). -# -UTSBASE = ../.. - -# -# Define the module and object file sets. -# -MODULE = foo -OBJECTS = $(FOO_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(FOO_OBJS:%.o=$(LINTS_DIR)/%.ln) -ROOTMODULE = $(ROOT_DRV_DIR)/$(MODULE) -CONF_SRCDIR = $(UTSBASE)/common/io/foo - -# -# Include common rules. -# -include $(UTSBASE)/sparc/Makefile.sparc - -# -# Define targets -# -ALL_TARGET = $(BINARY) # $(SRC_CONFILE) -LINT_TARGET = $(MODULE).lint -INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) - -# -# Overrides -# - -# -# For now, disable these lint checks; maintainers should endeavor -# to investigate and remove these for maximum lint coverage. -# Please do not carry these forward to new Makefiles. -# -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN - -CERRWARN += -_gcc=-Wno-unused-parameter - -# -# Driver depends on MAC -# -# LDFLAGS += -dy -N misc/mac - -# -# Default build targets. -# -.KEEP_STATE: - -def: $(DEF_DEPS) - -all: $(ALL_DEPS) - -clean: $(CLEAN_DEPS) - -clobber: $(CLOBBER_DEPS) - -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - -install: $(INSTALL_DEPS) - -# -# Include common targets. -# -include $(UTSBASE)/sparc/Makefile.targ |