diff options
author | blakej <none@none> | 2007-01-18 16:23:02 -0800 |
---|---|---|
committer | blakej <none@none> | 2007-01-18 16:23:02 -0800 |
commit | 4fceebdf03eeac0d7c58a4f70cc19b00a8c40a73 (patch) | |
tree | e858faa03dc6eb485f7baf438780880ccccce117 /usr/src/cmd | |
parent | 55434c770c89aa1b84474f2559a106803511aba0 (diff) | |
download | illumos-gate-4fceebdf03eeac0d7c58a4f70cc19b00a8c40a73.tar.gz |
PSARC/2006/061 xmemfs EOF
6379911 Remove support for xmemfs from Solaris
--HG--
rename : usr/src/cmd/fs.d/xmemfs/Makefile => deleted_files/usr/src/cmd/fs.d/xmemfs/Makefile
rename : usr/src/cmd/fs.d/xmemfs/mount.c => deleted_files/usr/src/cmd/fs.d/xmemfs/mount.c
rename : usr/src/uts/intel/fs/xmemfs/seg_xmem.c => deleted_files/usr/src/uts/intel/fs/xmemfs/seg_xmem.c
rename : usr/src/uts/intel/fs/xmemfs/xmem_dir.c => deleted_files/usr/src/uts/intel/fs/xmemfs/xmem_dir.c
rename : usr/src/uts/intel/fs/xmemfs/xmem_subr.c => deleted_files/usr/src/uts/intel/fs/xmemfs/xmem_subr.c
rename : usr/src/uts/intel/fs/xmemfs/xmem_vfsops.c => deleted_files/usr/src/uts/intel/fs/xmemfs/xmem_vfsops.c
rename : usr/src/uts/intel/fs/xmemfs/xmem_vnops.c => deleted_files/usr/src/uts/intel/fs/xmemfs/xmem_vnops.c
rename : usr/src/uts/intel/sys/fs/seg_xmem.h => deleted_files/usr/src/uts/intel/sys/fs/seg_xmem.h
rename : usr/src/uts/intel/sys/fs/xmem.h => deleted_files/usr/src/uts/intel/sys/fs/xmem.h
rename : usr/src/uts/intel/xmemfs/Makefile => deleted_files/usr/src/uts/intel/xmemfs/Makefile
Diffstat (limited to 'usr/src/cmd')
-rw-r--r-- | usr/src/cmd/fs.d/Makefile | 15 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/xmemfs/Makefile | 37 | ||||
-rw-r--r-- | usr/src/cmd/fs.d/xmemfs/mount.c | 330 | ||||
-rw-r--r-- | usr/src/cmd/zoneadm/zoneadm.c | 3 |
4 files changed, 7 insertions, 378 deletions
diff --git a/usr/src/cmd/fs.d/Makefile b/usr/src/cmd/fs.d/Makefile index d14b141a07..7027a0e299 100644 --- a/usr/src/cmd/fs.d/Makefile +++ b/usr/src/cmd/fs.d/Makefile @@ -19,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -46,11 +46,8 @@ include ../Makefile.cmd SUBDIR1= lofs zfs SUBDIR2= dev fd pcfs nfs hsfs proc ctfs udfs ufs tmpfs cachefs autofs mntfs objfs -i386_SUBDIRS= xmemfs -i386_I18NDIRS= xmemfs -SUBDIRS= $(SUBDIR1) $(SUBDIR2) $($(MACH)_SUBDIRS) -ALL_SUBDIRS= $(SUBDIR1) $(SUBDIR2) $(i386_SUBDIRS) -I18NDIRS= $(SUBDIR2) $(i386_I18NDIRS) +SUBDIRS= $(SUBDIR1) $(SUBDIR2) +I18NDIRS= $(SUBDIR2) CLOBBERFILES += $(POFILES_XPG4) @@ -195,11 +192,11 @@ fs.dfl: $(ROOTUSRSBINFF): $(ROOTUSRSBIN)/ff -$(RM) $@; $(SYMLINK) ./ff $@ -clean: $(ALL_SUBDIRS) .WAIT clean_local +clean: $(SUBDIRS) .WAIT clean_local clean_local: -clobber: $(ALL_SUBDIRS) .WAIT clobber_local +clobber: $(SUBDIRS) .WAIT clobber_local clobber_local: clean_local $(RM) $(PROG) $(ROOTFS_PROG) $(SPPROG) $(MNTTAB) $(DEFAULTFILES) \ @@ -207,7 +204,7 @@ clobber_local: clean_local lint: -$(ALL_SUBDIRS): FRC +$(SUBDIRS): FRC @cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET) FRC: diff --git a/usr/src/cmd/fs.d/xmemfs/Makefile b/usr/src/cmd/fs.d/xmemfs/Makefile deleted file mode 100644 index b2e9e8c85d..0000000000 --- a/usr/src/cmd/fs.d/xmemfs/Makefile +++ /dev/null @@ -1,37 +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. -# - -FSTYPE= xmemfs -LIBPROG= mount - -include ../Makefile.fstype -include ../Makefile.mount - -CPPFLAGS += -I../../../uts/intel -I../../../uts/i86pc - -include ../Makefile.mount.targ diff --git a/usr/src/cmd/fs.d/xmemfs/mount.c b/usr/src/cmd/fs.d/xmemfs/mount.c deleted file mode 100644 index 9cc7b5f950..0000000000 --- a/usr/src/cmd/fs.d/xmemfs/mount.c +++ /dev/null @@ -1,330 +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. - */ -#pragma ident "%Z%%M% %I% %E% SMI" - -#include <stdio.h> -#include <signal.h> -#include <string.h> -#include <unistd.h> -#include <errno.h> -#include <sys/mntent.h> -#include <sys/mnttab.h> -#include <sys/mntent.h> -#include <sys/mount.h> -#include <sys/fs/xmem.h> -#include <sys/types.h> -#include <locale.h> -#include <sys/stat.h> -#include <sys/statvfs.h> -#include <fslib.h> -#include <stdlib.h> - -enum { - FSSIZE, - VERBOSE, - LARGEBSIZE, -#ifdef DEBUG - NOLARGEBSIZE, - BSIZE, - RESERVEMEM, - NORESERVEMEM, -#endif - XOPTSZ -}; - -static char *myopts[] = { - "size", /* required */ - "vb", - "largebsize", -#ifdef DEBUG - "nolargebsize", /* default */ - "bsize", /* internal use only */ - "reservemem", /* default */ - "noreservemem", -#endif - NULL -}; - -static offset_t -atosz(char *optarg) -{ - offset_t off; - char *endptr; - - off = strtoll(optarg, &endptr, 0); - - switch (*endptr) { - case 't': case 'T': - off *= 1024; - /* FALLTHROUGH */ - case 'g': case 'G': - off *= 1024; - /* FALLTHROUGH */ - case 'm': case 'M': - off *= 1024; - /* FALLTHROUGH */ - case 'k': case 'K': - off *= 1024; - /* FALLTHROUGH */ - default: - break; - } - return (off); -} - - -int -main(int argc, char *argv[]) -{ - struct mnttab mnt; - int c; - char *myname; - char optbuf[MAX_MNTOPT_STR]; - char typename[64]; - char *options, *value; - int error = 0; - int verbose = 0; - int nmflg = 0; - offset_t fssize = 0; - offset_t bsize = 0; - int optsize = sizeof (struct xmemfs_args); - int mflg = 0; - int optcnt = 0; - int qflg = 0; - char *saveopt; - struct xmemfs_args xargs = { - 0, /* xa_fssize - file system sz */ - 0, /* xa_bsize - blk sz */ - XARGS_RESERVEMEM /* xa_flags */ - }; - - (void) setlocale(LC_ALL, ""); - -#if !defined(TEXT_DOMAIN) -#define TEXT_DOMAIN "SYS_TEST" -#endif - (void) textdomain(TEXT_DOMAIN); - - myname = strrchr(argv[0], '/'); - myname = myname ? myname + 1 : argv[0]; - (void) snprintf(typename, sizeof (typename), "%s_%s", MNTTYPE_XMEMFS, - myname); - argv[0] = typename; - - /* RO xmemfs not supported... */ - (void) strlcpy(optbuf, "rw", sizeof (optbuf)); - - while ((c = getopt(argc, argv, "Vqo:mO")) != EOF) { - switch (c) { - case 'q': - qflg++; - break; - case 'V': - verbose++; - break; - case 'm': - nmflg++; - mflg |= MS_NOMNTTAB; - break; - case 'O': - mflg |= MS_OVERLAY; - break; - case 'o': - options = optarg; - while (*options != '\0') { - saveopt = options; - - switch (getsubopt(&options, myopts, &value)) { - case LARGEBSIZE: - xargs.xa_flags |= XARGS_LARGEPAGES; - break; - case FSSIZE: - if (value) { - fssize = atosz(value); - if (!fssize) { - (void) fprintf(stderr, -gettext("%s: value %s for option \"%s\" is invalid\n"), -typename, value, myopts[FSSIZE]); - error++; - break; - } - xargs.xa_fssize = fssize; - optcnt++; - if (verbose) - (void) fprintf(stderr, -gettext("setting fssize to %d\n"), fssize); - } else { - (void) fprintf(stderr, -gettext("%s: option \"%s\" requires value\n"), typename, myopts[FSSIZE]); - error++; - } - break; -#ifdef DEBUG - case RESERVEMEM: - xargs.xa_flags |= XARGS_RESERVEMEM; - break; - case NORESERVEMEM: - xargs.xa_flags &= ~XARGS_RESERVEMEM; - break; - case NOLARGEBSIZE: - xargs.xa_flags &= ~XARGS_LARGEPAGES; - break; - case BSIZE: /* file system block size */ - if (value) { - bsize = atosz(value); - if (!bsize) { - (void) fprintf(stderr, -gettext("%s: value %s for option \"%s\" is invalid\n"), -typename, value, myopts[FSSIZE]); - error++; - break; - } - xargs.xa_bsize = bsize; - optcnt++; - if (verbose) - (void) fprintf(stderr, -gettext("setting bsize to %d\n"), bsize); - } else { - (void) fprintf(stderr, -gettext("%s: option \"%s\" requires value\n"), typename, myopts[BSIZE]); - error++; - } - break; -#endif - - case VERBOSE: - verbose++; - break; - default: - if (fsisstdopt(saveopt)) { - (void) strlcat(optbuf, ",", - sizeof (optbuf)); - (void) strlcat(optbuf, - saveopt, sizeof (optbuf)); - break; - } - if (!qflg) { - (void) fprintf(stderr, gettext( - "%s: WARNING: ignoring " - "option \"%s\"\n"), - typename, saveopt); - } - - break; - } - } - if (bsize) { - (void) snprintf(optbuf, sizeof (optbuf), - "%s,bsize=%lld", optbuf, bsize); - if (--optcnt) - (void) strlcat(optbuf, ",", - sizeof (optbuf)); - if (verbose) - (void) fprintf(stderr, "optbuf:%s\n", - optbuf); - } - if (fssize) { - (void) snprintf(optbuf, sizeof (optbuf), - "%s,size=%lld", optbuf, fssize); - if (--optcnt) - (void) strlcat(optbuf, ",", - sizeof (optbuf)); - if (verbose) - (void) fprintf(stderr, "optbuf:%s\n", - optbuf); - } else { - error++; - } - if (options[0] && !error) { - (void) strlcat(optbuf, options, - sizeof (optbuf)); - if (verbose) - (void) fprintf(stderr, "optbuf:%s\n", - optbuf); - } - if (verbose) - (void) fprintf(stderr, "optsize:%d optbuf:%s\n", - optsize, optbuf); - break; - default: - error++; - break; - } - } - - if (verbose && !error) { - char *optptr; - - (void) fprintf(stderr, "%s", typename); - for (optcnt = 1; optcnt < argc; optcnt++) { - optptr = argv[optcnt]; - if (optptr) - (void) fprintf(stderr, " %s", optptr); - } - (void) fprintf(stderr, "\n"); - } - - if (argc - optind != 2 || error) { - (void) fprintf(stderr, - gettext("Usage: %s -o[largebsize,]size=sz" - " xmem mount_point\n"), typename); - exit(1); - } - - mnt.mnt_special = argv[optind++]; - mnt.mnt_mountp = argv[optind++]; - mnt.mnt_fstype = MNTTYPE_XMEMFS; - mflg |= MS_DATA | MS_OPTIONSTR; - mnt.mnt_mntopts = optbuf; - - saveopt = strdup(optbuf); - - if (verbose) { - (void) fprintf(stderr, "mount(%s, \"%s\", %d, %s", - mnt.mnt_special, mnt.mnt_mountp, mflg, MNTTYPE_XMEMFS); - if (optsize) - (void) fprintf(stderr, ", \"%s\", %d)\n", - optbuf, strlen(optbuf)); - else - (void) fprintf(stderr, ")\n"); - } - if (mount(mnt.mnt_special, mnt.mnt_mountp, mflg, MNTTYPE_XMEMFS, - &xargs, optsize, optbuf, MAX_MNTOPT_STR)) { - if (errno == EBUSY) - (void) fprintf(stderr, - gettext("mount: %s already mounted\n"), - mnt.mnt_mountp); - else - perror("mount"); - exit(1); - } - - if (!qflg && saveopt != NULL) - cmp_requested_to_actual_options(saveopt, optbuf, - mnt.mnt_special, mnt.mnt_mountp); - - return (0); -} diff --git a/usr/src/cmd/zoneadm/zoneadm.c b/usr/src/cmd/zoneadm/zoneadm.c index 5d4f180419..9da3182f85 100644 --- a/usr/src/cmd/zoneadm/zoneadm.c +++ b/usr/src/cmd/zoneadm/zoneadm.c @@ -926,8 +926,7 @@ validate_zonepath(char *path, int cmd_num) rpath); return (Z_ERR); } - if ((strcmp(stbuf.st_fstype, MNTTYPE_TMPFS) == 0) || - (strcmp(stbuf.st_fstype, MNTTYPE_XMEMFS) == 0)) { + if (strcmp(stbuf.st_fstype, MNTTYPE_TMPFS) == 0) { (void) printf(gettext("WARNING: %s is on a temporary " "file system.\n"), rpath); } |