diff options
| author | Garrett D'Amore <gdamore@opensolaris.org> | 2009-11-30 19:13:57 -0800 |
|---|---|---|
| committer | Garrett D'Amore <gdamore@opensolaris.org> | 2009-11-30 19:13:57 -0800 |
| commit | 69ed0c8ece2346b34605e2c9567c9f7b0dad5dc8 (patch) | |
| tree | aa6ea4f289df0633b309f96104c58502a6474300 /usr/src/lib/libsmedia/plugins | |
| parent | e4c316c4f7fa9251e92bdcb24e380caf4a49c90f (diff) | |
| download | illumos-joyent-69ed0c8ece2346b34605e2c9567c9f7b0dad5dc8.tar.gz | |
PSARC 2009/582 EOF of pcmem/pcram
PSARC 2009/628 EOF pcmciad and pem
6901492 EOF pcram and pcmem
6901491 EOF pcmciad and pem
6902707 i.devlink.tab has many duplicate entries
Diffstat (limited to 'usr/src/lib/libsmedia/plugins')
| -rw-r--r-- | usr/src/lib/libsmedia/plugins/Makefile | 12 | ||||
| -rw-r--r-- | usr/src/lib/libsmedia/plugins/pcmem/Makefile | 32 | ||||
| -rw-r--r-- | usr/src/lib/libsmedia/plugins/pcmem/Makefile.targ | 35 | ||||
| -rw-r--r-- | usr/src/lib/libsmedia/plugins/pcmem/amd64/Makefile | 38 | ||||
| -rw-r--r-- | usr/src/lib/libsmedia/plugins/pcmem/common/mapfile-vers | 51 | ||||
| -rw-r--r-- | usr/src/lib/libsmedia/plugins/pcmem/common/p_generic.c | 582 | ||||
| -rw-r--r-- | usr/src/lib/libsmedia/plugins/pcmem/i386/Makefile | 38 | ||||
| -rw-r--r-- | usr/src/lib/libsmedia/plugins/pcmem/sparc/Makefile | 37 | ||||
| -rw-r--r-- | usr/src/lib/libsmedia/plugins/pcmem/sparcv9/Makefile | 38 |
9 files changed, 4 insertions, 859 deletions
diff --git a/usr/src/lib/libsmedia/plugins/Makefile b/usr/src/lib/libsmedia/plugins/Makefile index 007a59fd98..648ce576a9 100644 --- a/usr/src/lib/libsmedia/plugins/Makefile +++ b/usr/src/lib/libsmedia/plugins/Makefile @@ -2,9 +2,8 @@ # 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. @@ -20,10 +19,8 @@ # CDDL HEADER END # # -# Copyright (c) 1991-2001 by Sun Microsystems, Inc. -# All rights reserved. -# -#pragma ident "%Z%%M% %I% %E% SMI" +# Copyright 2009 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # # lib/libsmedia/plugins/Makefile @@ -31,7 +28,6 @@ SUBDIRS = \ scsi \ floppy \ - pcmem \ pcata def := TARGET= def diff --git a/usr/src/lib/libsmedia/plugins/pcmem/Makefile b/usr/src/lib/libsmedia/plugins/pcmem/Makefile deleted file mode 100644 index b2f50ab484..0000000000 --- a/usr/src/lib/libsmedia/plugins/pcmem/Makefile +++ /dev/null @@ -1,32 +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) 1990,1998-1999 by Sun Microsystems, Inc. -# All rights reserved. -# -#pragma ident "%Z%%M% %I% %E% SMI" -# -# lib/libsmedia/plugins/pcmem/Makefile - -include ../../../Makefile.lib -include Makefile.targ -include ../Makefile.plugin diff --git a/usr/src/lib/libsmedia/plugins/pcmem/Makefile.targ b/usr/src/lib/libsmedia/plugins/pcmem/Makefile.targ deleted file mode 100644 index 07266eddf9..0000000000 --- a/usr/src/lib/libsmedia/plugins/pcmem/Makefile.targ +++ /dev/null @@ -1,35 +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) 1990,1997-1999 by Sun Microsystems, Inc. -# All rights reserved. -# -#pragma ident "%Z%%M% %I% %E% SMI" -# -# lib/libsmedia/plugins/pcmem/Makefile.targ - -LIBRARY= sm_pcmem.a -VERS= .1 - -OBJECTS= p_generic.o - diff --git a/usr/src/lib/libsmedia/plugins/pcmem/amd64/Makefile b/usr/src/lib/libsmedia/plugins/pcmem/amd64/Makefile deleted file mode 100644 index fb4ba5994f..0000000000 --- a/usr/src/lib/libsmedia/plugins/pcmem/amd64/Makefile +++ /dev/null @@ -1,38 +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. -# -# ident "%Z%%M% %I% %E% SMI" -# - -include ../Makefile.targ -include ../../../../Makefile.lib -include ../../../../Makefile.targ -include ../../Makefile.com -include ../../../../Makefile.lib.64 - -.KEEP_STATE: - -all: $(LIBS) $(TXTS) - -install: all $(PLUGINDIR64) .WAIT $(PLUGINS64) diff --git a/usr/src/lib/libsmedia/plugins/pcmem/common/mapfile-vers b/usr/src/lib/libsmedia/plugins/pcmem/common/mapfile-vers deleted file mode 100644 index 8bfd4dad37..0000000000 --- a/usr/src/lib/libsmedia/plugins/pcmem/common/mapfile-vers +++ /dev/null @@ -1,51 +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. -# - -# -# MAPFILE HEADER START -# -# WARNING: STOP NOW. DO NOT MODIFY THIS FILE. -# Object versioning must comply with the rules detailed in -# -# usr/src/lib/README.mapfiles -# -# You should not be making modifications here until you've read the most current -# copy of that file. If you need help, contact a gatekeeper for guidance. -# -# MAPFILE HEADER END -# - -SUNWprivate_1.1 { - global: - _m_device_type; - _m_free_device_info; - _m_get_device_info; - _m_get_media_info; - _m_media_format; - _m_media_format_track; - _m_version_no; - local: - *; -}; diff --git a/usr/src/lib/libsmedia/plugins/pcmem/common/p_generic.c b/usr/src/lib/libsmedia/plugins/pcmem/common/p_generic.c deleted file mode 100644 index 7b9753534d..0000000000 --- a/usr/src/lib/libsmedia/plugins/pcmem/common/p_generic.c +++ /dev/null @@ -1,582 +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) 1999-2001 by Sun Microsystems, Inc. - * All rights reserved. - */ - -#pragma ident "%Z%%M% %I% %E% SMI" - -/* - * p_generic.c : - * This file contains the functions for pcmcia memory card plug-in - * for libsm.so.g - */ - -#include <stdio.h> -#include <unistd.h> -#include <locale.h> -#include <sys/types.h> -#include <sys/param.h> -#include <sys/dkio.h> -#include <string.h> -#include "../../../library/common/l_defines.h" -#include "../../../library/inc/rmedia.h" - -/* - * These defines are from the PCMCIA memory driver driver - * header files (pcramio.h/pcramvar.h) and they are in - * the Platform Specific (PS) train. - */ -#ifndef PCRAM_PROBESIZE -#define PCRAMIOC ('P' << 8) -#define PCRAM_PROBESIZE (PCRAMIOC|22) /* Probe memory card size */ -#endif - -/* FORMAT PATTERNS */ -#define PATTERN_1 0x55; -#define PATTERN_2 0xaa; -#define PATTERN_3 0xff; -#define PATTERN_4 0x00; - -#define PERROR(string) my_perror(gettext(string)) - -static void -my_perror(char *err_string) -{ - - int error_no; - if (errno == 0) - return; - - error_no = errno; - (void) fprintf(stderr, gettext(err_string)); - (void) fprintf(stderr, gettext(" : ")); - errno = error_no; - perror(""); -} - -int32_t -_m_version_no(void) -{ - return (SM_PCMEM_VERSION_1); -} - -int32_t -_m_device_type(ushort_t ctype, ushort_t mtype) -{ - if (ctype == DKC_PCMCIA_MEM) { - if (mtype == 0) - return (0); - } - return (-1); -} - - -int32_t -_m_get_media_info(rmedia_handle_t *handle, void *ip) -{ - smmedium_prop_t *mp = (smmedium_prop_t *)ip; - struct dk_geom dkg; - enum dkio_state state = DKIO_NONE; - - if (handle == NULL) { - DPRINTF("Null Handle\n"); - errno = EINVAL; - return (-1); - } - if (handle->sm_signature != (int32_t)LIBSMEDIA_SIGNATURE) { - DPRINTF2( - "Signature expected=0x%x, found=0x%x\n", - LIBSMEDIA_SIGNATURE, handle->sm_signature); - errno = EINVAL; - return (-1); - } - - if (ioctl(handle->sm_fd, DKIOCSTATE, &state) < 0) { - PERROR("DKIOCSTATE failed"); - return (-1); - } - - if (state != DKIO_INSERTED) { - DPRINTF("No media.\n"); - mp->sm_media_type = SM_NOT_PRESENT; - mp->sm_version = SMMEDIA_PROP_V_1; - return (0); - - } - /* Get card cyl/head/secptrack info */ - if (ioctl(handle->sm_fd, DKIOCGGEOM, &dkg) < 0) { - /* - * Card doesn't have a CIS. So, ask driver to probe - * card size info - */ - if (ioctl(handle->sm_fd, PCRAM_PROBESIZE, &dkg) < 0) { - int save_errno; - save_errno = errno; - (void) fprintf(stderr, gettext("Unable to get card \ - size information")); - errno = save_errno; - if (!errno) - errno = EIO; - return (-1); - } - } - - mp->sm_media_type = SM_PCMCIA_MEM; - mp->sm_blocksize = DEV_BSIZE; /* PCMCIA memory default sector size */ - mp->sm_pcyl = dkg.dkg_pcyl; - mp->sm_nhead = dkg.dkg_nhead; - mp->sm_nsect = dkg.dkg_nsect; - mp->sm_capacity = mp->sm_pcyl * mp->sm_nhead * mp->sm_nsect; - return (0); -} - - - -/* ARGSUSED0 */ - -int32_t -_m_get_device_info(rmedia_handle_t *handle, void *ip) -{ - smdevice_info_t *mp = (smdevice_info_t *)ip; - char *vendor_name, *product_name, *fw_version; - - if (handle == NULL) { - DPRINTF("Null Handle\n"); - errno = EINVAL; - return (-1); - } - if (handle->sm_signature != (int32_t)LIBSMEDIA_SIGNATURE) { - DPRINTF2( - "Signature expected=0x%x, found=0x%x\n", - LIBSMEDIA_SIGNATURE, handle->sm_signature); - errno = EINVAL; - return (-1); - } - vendor_name = (char *)malloc(1); - if (vendor_name == NULL) { - if (!errno) - errno = ENOMEM; - return (-1); - } - product_name = (char *)malloc(1); - if (product_name == NULL) { - free(vendor_name); - if (!errno) - errno = ENOMEM; - return (-1); - } - - fw_version = (char *)malloc(1); - if (fw_version == NULL) { - free(vendor_name); - free(product_name); - if (!errno) - errno = ENOMEM; - return (-1); - } - - vendor_name[0] = 0; - product_name[0] = 0; - fw_version[0] = 0; - mp->sm_interface_type = IF_PCMCIA; - mp->sm_vendor_name = vendor_name; - mp->sm_product_name = product_name; - mp->sm_firmware_version = fw_version; - return (0); -} - -int32_t -_m_free_device_info(rmedia_handle_t *handle, void *ip) -{ - struct smdevice_info *dev_info = ip; - - /* Check for valid handle */ - if (handle == NULL) { - DPRINTF("Null Handle\n"); - errno = EINVAL; - return (-1); - } - if (handle->sm_signature != LIBSMEDIA_SIGNATURE) { - DPRINTF("Invalid signature in handle.\n"); - errno = EINVAL; - return (-1); - } - - free(dev_info->sm_vendor_name); - free(dev_info->sm_product_name); - free(dev_info->sm_firmware_version); - return (0); -} - - -/* ARGSUSED1 */ - -int32_t -_m_media_format(rmedia_handle_t *handle, void *ip) -{ - int32_t sec_size; /* sector size */ - int32_t i, j; - char wrpat; - char wrbuf[512]; - char rdbuf[512]; - enum dkio_state state = DKIO_NONE; - int32_t card_size; /* PCMCIA memory card size */ - struct dk_geom dkg; - - /* Check for valid handle */ - if (handle == NULL) { - DPRINTF("Null Handle\n"); - errno = EINVAL; - return (-1); - } - if (handle->sm_signature != (int32_t)LIBSMEDIA_SIGNATURE) { - DPRINTF2( - "Signature expected=0x%x, found=0x%x\n", - LIBSMEDIA_SIGNATURE, handle->sm_signature); - errno = EINVAL; - return (-1); - } - if (ioctl(handle->sm_fd, DKIOCSTATE, &state) < 0) { - PERROR("DKIOCSTATE failed"); - return (-1); - } - - if (state != DKIO_INSERTED) { - (void) fprintf(stderr, - gettext("No media.\n")); - return (-1); - } - - - /* Get card cyl/head/secptrack info */ - if (ioctl(handle->sm_fd, DKIOCGGEOM, &dkg) < 0) { - /* - * Card doesn't have a CIS. So, ask driver to probe - * card size info - */ - if (ioctl(handle->sm_fd, PCRAM_PROBESIZE, &dkg) < 0) { - PERROR("Unable to get card size information"); - return (-1); - } - } - - /* PCMCIA memory default sector size */ - sec_size = DEV_BSIZE; - - card_size = dkg.dkg_ncyl * dkg.dkg_nhead * - dkg.dkg_nsect * sec_size; - - /* - * First try to format only 512 bytes with four different - * patterns. - */ - for (i = 0; i < 4; ++i) { - switch (i) { - - case 0: - wrpat = (uchar_t)PATTERN_1; - break; - case 1: - wrpat = (uchar_t)PATTERN_2; - break; - case 2: - wrpat = (uchar_t)PATTERN_3; - break; - case 3: - wrpat = PATTERN_4; - break; - } - - if (llseek(handle->sm_fd, (off_t)0, 0) != 0) { - if (!errno) - errno = EIO; - PERROR("seek to blk 0 failed"); - return (-1); - } - - (void) memset(wrbuf, wrpat, 512); - - if (write(handle->sm_fd, &wrbuf[0], 512) != 512) { - if (!errno) - errno = EIO; - PERROR("Format Write failed"); - return (-1); - } - - if (llseek(handle->sm_fd, (off_t)0, 0) != 0) { - if (!errno) - errno = EIO; - PERROR("seek to blk 0 failed"); - return (-1); - } - - if (read(handle->sm_fd, &rdbuf[0], 512) != 512) { - if (!errno) - errno = EIO; - PERROR("Format Read failed"); - return (-1); - } - - if (memcmp(wrbuf, rdbuf, 512) != 0) { - (void) fprintf(stderr, - gettext("Format Compare Error")); - return (-1); - } - } - /* - * Then format the whole memory card with patterns - * 0xff and 0x00 to erase the card. - */ - for (i = 0; i < 2; ++i) { - - if (i == 0) { - wrpat = (uchar_t)PATTERN_3; - } else { - wrpat = PATTERN_4; - } - - if (llseek(handle->sm_fd, (off_t)0, 0) != 0) { - if (!errno) - errno = EIO; - PERROR("seek to blk 0 failed"); - return (-1); - } - - (void) memset(wrbuf, wrpat, 512); - - for (j = 0; j < (card_size/512); ++j) { - if (write(handle->sm_fd, &wrbuf[0], 512) != 512) { - if (!errno) - errno = EIO; - PERROR("Format Write failed"); - return (-1); - } - } - /* - * do a verify - */ - - if (llseek(handle->sm_fd, (off_t)0, 0) != 0) { - if (!errno) - errno = EIO; - PERROR("seek to blk 0 failed"); - return (-1); - } - - for (j = 0; j < (card_size/512); ++j) { - if (read(handle->sm_fd, &rdbuf[0], 512) != 512) { - if (!errno) - errno = EIO; - PERROR("Format Read failed"); - return (-1); - } - if (memcmp(wrbuf, rdbuf, 512) != 0) { - (void) fprintf(stderr, - gettext("Format Compare Error")); - return (-1); - } - } - } - - return (0); -} - -int32_t -_m_media_format_track(rmedia_handle_t *handle, void *ip) -{ - struct format_track *ft = (struct format_track *)ip; - int32_t sec_size; /* sector size */ - int32_t i, j; - char wrpat; - char wrbuf[512]; - char rdbuf[512]; - enum dkio_state state = DKIO_NONE; - int32_t fmt_start; /* The offset where format starts */ - struct dk_geom dkg; - - if (handle == NULL) { - DPRINTF("Null Handle\n"); - errno = EINVAL; - return (-1); - } - if (handle->sm_signature != (int32_t)LIBSMEDIA_SIGNATURE) { - DPRINTF2( - "Signature expected=0x%x, found=0x%x\n", - LIBSMEDIA_SIGNATURE, handle->sm_signature); - errno = EINVAL; - return (-1); - } - /* - * Using DKIOCSTATE ioctl() - * to replace FDGETCHANGE ioctl() - * start out with state=DKIO_NONE - */ - if (ioctl(handle->sm_fd, DKIOCSTATE, &state) < 0) { - PERROR("DKIOCSTATE failed"); - return (-1); - } - - if (state != DKIO_INSERTED) { - (void) fprintf(stderr, - gettext("No media\n")); - return (-1); - } - - - /* Get card cyl/head/secptrack info */ - if (ioctl(handle->sm_fd, DKIOCGGEOM, &dkg) < 0) { - /* - * Card doesn't have a CIS. So, ask driver to probe - * card size info - */ - if (ioctl(handle->sm_fd, PCRAM_PROBESIZE, &dkg) < 0) { - PERROR("Unable to get card size information"); - return (-1); - } - } - - /* PCMCIA memory default sector size */ - sec_size = DEV_BSIZE; - - fmt_start = ft->track_no * dkg.dkg_nhead * dkg.dkg_nsect * sec_size; - - /* - * If first track is being formatted, first try to format - * only 512 bytes with four different patterns. - */ - if (ft->track_no == 0) { - for (i = 0; i < 4; ++i) { - switch (i) { - - case 0: - wrpat = (uchar_t)PATTERN_1; - break; - case 1: - wrpat = (uchar_t)PATTERN_2; - break; - case 2: - wrpat = (uchar_t)PATTERN_3; - break; - case 3: - wrpat = PATTERN_4; - break; - } - - if (llseek(handle->sm_fd, (off_t)0, 0) != 0) { - if (!errno) - errno = EIO; - PERROR("seek to blk 0 failed"); - return (-1); - } - - (void) memset(wrbuf, wrpat, 512); - - if (write(handle->sm_fd, &wrbuf[0], 512) != 512) { - if (!errno) - errno = EIO; - PERROR("Format Write failed"); - return (-1); - } - - if (llseek(handle->sm_fd, (off_t)0, 0) != 0) { - if (!errno) - errno = EIO; - PERROR("seek to blk 0 failed"); - return (-1); - } - - if (read(handle->sm_fd, &rdbuf[0], 512) != 512) { - if (!errno) - errno = EIO; - PERROR("Format Read failed"); - return (-1); - } - - if (memcmp(wrbuf, rdbuf, 512) != 0) { - (void) fprintf(stderr, - gettext("Format Compare Error")); - return (-1); - } - } - } - - /* - * Then format the whole memory card with patterns - * 0xff and 0x00 to erase the card. - */ - for (i = 0; i < 2; ++i) { - - if (i == 0) { - wrpat = (uchar_t)PATTERN_3; - } else { - wrpat = PATTERN_4; - } - - if (llseek(handle->sm_fd, (off_t)fmt_start, 0) != fmt_start) { - if (!errno) - errno = EIO; - PERROR("seek to blk 0 failed"); - return (-1); - } - - (void) memset(wrbuf, wrpat, 512); - - for (j = fmt_start/512; j < (fmt_start/512 + dkg.dkg_nsect); - j++) { - if (write(handle->sm_fd, &wrbuf[0], 512) != 512) { - if (!errno) - errno = EIO; - PERROR("Format Write failed"); - return (-1); - } - } - /* - * do a verify - */ - - if (llseek(handle->sm_fd, (off_t)fmt_start, 0) != fmt_start) { - if (!errno) - errno = EIO; - PERROR("seek to blk 0 failed"); - return (-1); - } - - for (j = fmt_start/512; j < (fmt_start/512 + dkg.dkg_nsect); - ++j) { - if (read(handle->sm_fd, &rdbuf[0], 512) != 512) { - if (!errno) - errno = EIO; - PERROR("Format Read failed"); - return (-1); - } - if (memcmp(wrbuf, rdbuf, 512) != 0) { - (void) fprintf(stderr, - gettext("Format Compare Error")); - return (-1); - } - } - } - - return (0); -} diff --git a/usr/src/lib/libsmedia/plugins/pcmem/i386/Makefile b/usr/src/lib/libsmedia/plugins/pcmem/i386/Makefile deleted file mode 100644 index 988437ada2..0000000000 --- a/usr/src/lib/libsmedia/plugins/pcmem/i386/Makefile +++ /dev/null @@ -1,38 +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. -# -# ident "%Z%%M% %I% %E% SMI" -# - -include ../Makefile.targ -include ../../../../Makefile.lib -include ../../../../Makefile.targ -include ../../Makefile.com - -.KEEP_STATE: - -all: $(LIBS) $(TXTS) - - -install: all $(PLUGINDIR) .WAIT $(PLUGINS) diff --git a/usr/src/lib/libsmedia/plugins/pcmem/sparc/Makefile b/usr/src/lib/libsmedia/plugins/pcmem/sparc/Makefile deleted file mode 100644 index eed569e3d1..0000000000 --- a/usr/src/lib/libsmedia/plugins/pcmem/sparc/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 (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" -# - -include ../Makefile.targ -include ../../../../Makefile.lib -include ../../../../Makefile.targ -include ../../Makefile.com - -.KEEP_STATE: - -all: $(LIBS) $(TXTS) - -install: all $(PLUGINDIR) .WAIT $(PLUGINS) diff --git a/usr/src/lib/libsmedia/plugins/pcmem/sparcv9/Makefile b/usr/src/lib/libsmedia/plugins/pcmem/sparcv9/Makefile deleted file mode 100644 index fb4ba5994f..0000000000 --- a/usr/src/lib/libsmedia/plugins/pcmem/sparcv9/Makefile +++ /dev/null @@ -1,38 +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. -# -# ident "%Z%%M% %I% %E% SMI" -# - -include ../Makefile.targ -include ../../../../Makefile.lib -include ../../../../Makefile.targ -include ../../Makefile.com -include ../../../../Makefile.lib.64 - -.KEEP_STATE: - -all: $(LIBS) $(TXTS) - -install: all $(PLUGINDIR64) .WAIT $(PLUGINS64) |
