summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2016-01-01 19:03:27 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-01-01 19:12:44 +0100
commit6a5966c285a2b99e26a5dc8f9c4b60c93347df8d (patch)
treee90a347762156c37dfe0177b5fd75c9b6bba823a
parenteb8c15953a316a780f2ea6c8d1eb47c878909d94 (diff)
remove unnused disk code and headers
* i386/Makefrag.am: Remove disk.h. * i386/i386at/disk.h: Remove unnused definitions. * i386/include/mach/i386/disk.h: Remove. * linux/dev/glue/block.c (device_get_status): Remove V_GETPARMS case.
-rw-r--r--i386/Makefrag.am1
-rw-r--r--i386/i386at/disk.h101
-rw-r--r--i386/include/mach/i386/disk.h124
-rw-r--r--linux/dev/glue/block.c35
4 files changed, 0 insertions, 261 deletions
diff --git a/i386/Makefrag.am b/i386/Makefrag.am
index 4dd6a9f6..ef393d5d 100644
--- a/i386/Makefrag.am
+++ b/i386/Makefrag.am
@@ -240,7 +240,6 @@ include_mach_i386dir = $(includedir)/mach/i386
include_mach_i386_HEADERS = \
i386/include/mach/i386/asm.h \
i386/include/mach/i386/boolean.h \
- i386/include/mach/i386/disk.h \
i386/include/mach/i386/eflags.h \
i386/include/mach/i386/exception.h \
i386/include/mach/i386/fp_reg.h \
diff --git a/i386/i386at/disk.h b/i386/i386at/disk.h
index 63d033f0..c5583752 100644
--- a/i386/i386at/disk.h
+++ b/i386/i386at/disk.h
@@ -52,53 +52,13 @@ WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef _DISK_H_
#define _DISK_H_
-/* Grab the public part. */
-#include <mach/machine/disk.h>
-
-
-
-#define MAX_ALTENTS 253 /* Maximum # of slots for alts */
- /* allowed for in the table. */
-
-#define ALT_SANITY 0xdeadbeef /* magic # to validate alt table */
-
-struct alt_table {
- u_short alt_used; /* # of alternates already assigned */
- u_short alt_reserved; /* # of alternates reserved on disk */
- long alt_base; /* 1st sector (abs) of the alt area */
- long alt_bad[MAX_ALTENTS]; /* list of bad sectors/tracks */
-};
-
-struct alt_info { /* table length should be multiple of 512 */
- long alt_sanity; /* to validate correctness */
- u_short alt_version; /* to corroborate vintage */
- u_short alt_pad; /* padding for alignment */
- struct alt_table alt_trk; /* bad track table */
- struct alt_table alt_sec; /* bad sector table */
-};
-typedef struct alt_info altinfo_t;
-
#define V_NUMPAR 16 /* maximum number of partitions */
#define VTOC_SANE 0x600DDEEE /* Indicates a sane VTOC */
#define PDLOCATION 29 /* location of VTOC */
-#define BAD_BLK 0x80 /* needed for V_VERIFY */
-/* BAD_BLK moved from old hdreg.h */
-
-
-#define HDPDLOC 29 /* location of pdinfo/vtoc */
#define LBLLOC 1 /* label block for xxxbsd */
-/* Partition permission flags */
-#define V_OPEN 0x100 /* Partition open (for driver use) */
-#define V_VALID 0x200 /* Partition is valid to use */
-
-
-
-/* Sanity word for the physical description area */
-#define VALID_PD 0xCA5E600D
-
struct localpartition {
u_int p_flag; /*permision flags*/
long p_start; /*physical start sector no of partition*/
@@ -126,65 +86,4 @@ struct evtoc {
char fill[512-352];
};
-union io_arg {
- struct {
- u_short ncyl; /* number of cylinders on drive */
- u_char nhead; /* number of heads/cyl */
- u_char nsec; /* number of sectors/track */
- u_short secsiz; /* number of bytes/sector */
- } ia_cd; /* used for Configure Drive cmd */
- struct {
- u_short flags; /* flags (see below) */
- long bad_sector; /* absolute sector number */
- long new_sector; /* RETURNED alternate sect assigned */
- } ia_abs; /* used for Add Bad Sector cmd */
- struct {
- u_short start_trk; /* first track # */
- u_short num_trks; /* number of tracks to format */
- u_short intlv; /* interleave factor */
- } ia_fmt; /* used for Format Tracks cmd */
- struct {
- u_short start_trk; /* first track */
- char *intlv_tbl; /* interleave table */
- } ia_xfmt; /* used for the V_XFORMAT ioctl */
-};
-
-
-#define BOOTSZ 446 /* size of boot code in master boot block */
-#define FD_NUMPART 4 /* number of 'partitions' in fdisk table */
-#define ACTIVE 128 /* indicator of active partition */
-#define BOOT_MAGIC 0xAA55 /* signature of the boot record */
-#define UNIXOS 99 /* UNIX partition */
-#define BSDOS 165
-#define LINUXSWAP 130
-#define LINUXOS 131
-extern int OS; /* what partition we came from */
-
-/*
- * structure to hold the fdisk partition table
- */
-struct ipart {
- u_char bootid; /* bootable or not */
- u_char beghead; /* beginning head, sector, cylinder */
- u_char begsect; /* begcyl is a 10-bit number. High 2 bits */
- u_char begcyl; /* are in begsect. */
- u_char systid; /* OS type */
- u_char endhead; /* ending head, sector, cylinder */
- u_char endsect; /* endcyl is a 10-bit number. High 2 bits */
- u_char endcyl; /* are in endsect. */
- long relsect; /* first sector relative to start of disk */
- long numsect; /* number of sectors in partition */
-};
-
-/*
- * structure to hold master boot block in physical sector 0 of the disk.
- * Note that partitions stuff can't be directly included in the structure
- * because of lameo '386 compiler alignment design.
- */
-struct mboot { /* master boot block */
- char bootinst[BOOTSZ];
- char parts[FD_NUMPART * sizeof(struct ipart)];
- u_short signature;
-};
-
#endif /* _DISK_H_ */
diff --git a/i386/include/mach/i386/disk.h b/i386/include/mach/i386/disk.h
deleted file mode 100644
index 1bbbbdf3..00000000
--- a/i386/include/mach/i386/disk.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Mach Operating System
- * Copyright (c) 1991,1990,1989 Carnegie Mellon University
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
- * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
- * School of Computer Science
- * Carnegie Mellon University
- * Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie Mellon
- * the rights to redistribute these changes.
- */
-/*
- Copyright 1988, 1989 by Intel Corporation, Santa Clara, California.
-
- All Rights Reserved
-
-Permission to use, copy, modify, and distribute this software and
-its documentation for any purpose and without fee is hereby
-granted, provided that the above copyright notice appears in all
-copies and that both the copyright notice and this permission notice
-appear in supporting documentation, and that the name of Intel
-not be used in advertising or publicity pertaining to distribution
-of the software without specific, written prior permission.
-
-INTEL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
-INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
-IN NO EVENT SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
-CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
-NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
-WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-*/
-
-/*
- * disk.h
- */
-
-#ifndef _MACH_I386_DISK_H_
-#define _MACH_I386_DISK_H_
-
-#if defined(__linux__) || defined(__masix__)
-#define PART_DISK 4 /* partition number for entire disk */
-#else
-#define PART_DISK 2 /* partition number for entire disk */
-#endif
-
-
-/* driver ioctl() commands */
-
-#define V_CONFIG _IOW('v',1,union io_arg)/* Configure Drive */
-#define V_REMOUNT _IO('v',2) /* Remount Drive */
-#define V_ADDBAD _IOW('v',3,union io_arg)/* Add Bad Sector */
-#define V_GETPARMS _IOR('v',4,struct disk_parms) /* Get drive/partition parameters */
-#define V_FORMAT _IOW('v',5,union io_arg)/* Format track(s) */
-#define V_PDLOC _IOR('v',6,int) /* Ask driver where pdinfo is on disk */
-
-#define V_ABS _IOW('v',9,int) /* set a sector for an absolute addr */
-#define V_RDABS _IOW('v',10,struct absio)/* Read a sector at an absolute addr */
-#define V_WRABS _IOW('v',11,struct absio)/* Write a sector to absolute addr */
-#define V_VERIFY _IOWR('v',12,union vfy_io)/* Read verify sector(s) */
-#define V_XFORMAT _IO('v',13) /* Selectively mark sectors as bad */
-#define V_SETPARMS _IOW('v',14,int) /* Set drivers parameters */
-
-
-/*
- * Data structure for the V_VERIFY ioctl
- */
-union vfy_io {
- struct {
- long abs_sec; /* absolute sector number */
- u_short num_sec; /* number of sectors to verify */
- u_short time_flg; /* flag to indicate time the ops */
- }vfy_in;
- struct {
- long deltatime; /* duration of operation */
- u_short err_code; /* reason for failure */
- }vfy_out;
-};
-
-
-/* data structure returned by the Get Parameters ioctl: */
-struct disk_parms {
-/*00*/ char dp_type; /* Disk type (see below) */
- u_char dp_heads; /* Number of heads */
- u_short dp_cyls; /* Number of cylinders */
-/*04*/ u_char dp_sectors; /* Number of sectors/track */
- u_short dp_secsiz; /* Number of bytes/sector */
- /* for this partition: */
-/*08*/ u_short dp_ptag; /* Partition tag */
- u_short dp_pflag; /* Partition flag */
-/*0c*/ long dp_pstartsec; /* Starting absolute sector number */
-/*10*/ long dp_pnumsec; /* Number of sectors */
-/*14*/ u_char dp_dosheads; /* Number of heads */
- u_short dp_doscyls; /* Number of cylinders */
-/*18*/ u_char dp_dossectors; /* Number of sectors/track */
-};
-
-/* Disk types for disk_parms.dp_type: */
-#define DPT_WINI 1 /* Winchester disk */
-#define DPT_FLOPPY 2 /* Floppy */
-#define DPT_OTHER 3 /* Other type of disk */
-#define DPT_NOTDISK 0 /* Not a disk device */
-
-/* Data structure for V_RDABS/V_WRABS ioctl's */
-struct absio {
- long abs_sec; /* Absolute sector number (from 0) */
- char *abs_buf; /* Sector buffer */
-};
-
-#endif /* _MACH_I386_DISK_H_ */
diff --git a/linux/dev/glue/block.c b/linux/dev/glue/block.c
index 453e10be..74126ebe 100644
--- a/linux/dev/glue/block.c
+++ b/linux/dev/glue/block.c
@@ -1661,41 +1661,6 @@ device_get_status (void *d, dev_flavor_t flavor, dev_status_t status,
*status_count = DEV_GET_RECORDS_COUNT;
break;
- case V_GETPARMS:
- if (*status_count < (sizeof (struct disk_parms) / sizeof (int)))
- return D_INVALID_OPERATION;
- else
- {
- struct disk_parms *dp = status;
- struct hd_geometry hg;
- DECL_DATA;
-
- INIT_DATA();
-
- if ((*bd->ds->fops->ioctl) (&td.inode, &td.file,
- HDIO_GETGEO, (unsigned long)&hg))
- return D_INVALID_OPERATION;
-
- dp->dp_type = DPT_WINI; /* XXX: It may be a floppy... */
- dp->dp_heads = hg.heads;
- dp->dp_cyls = hg.cylinders;
- dp->dp_sectors = hg.sectors;
- dp->dp_dosheads = hg.heads;
- dp->dp_doscyls = hg.cylinders;
- dp->dp_dossectors = hg.sectors;
- dp->dp_secsiz = 512; /* XXX */
- dp->dp_ptag = 0;
- dp->dp_pflag = 0;
-
- /* XXX */
- dp->dp_pstartsec = -1;
- dp->dp_pnumsec = -1;
-
- *status_count = sizeof (struct disk_parms) / sizeof (int);
- }
-
- break;
-
default:
return D_INVALID_OPERATION;
}