summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-12-11 22:05:28 +0000
committerMatt Wilson <msw@redhat.com>2000-12-11 22:05:28 +0000
commit794ab11af0e2d8a116de692df81d1e5c6883da52 (patch)
treedc897593893ef59c93830eebc3bc065abff2ffba
parentd09d978b5f3d9fee4979b2dc42cd815272c8433b (diff)
downloadanaconda-794ab11af0e2d8a116de692df81d1e5c6883da52.tar.gz
anaconda-794ab11af0e2d8a116de692df81d1e5c6883da52.tar.xz
anaconda-794ab11af0e2d8a116de692df81d1e5c6883da52.zip
move kernel excludes to a generic dictionary, add kinput2 excludes
-rw-r--r--balkan/bsdlabel.c90
-rw-r--r--comps.py26
2 files changed, 63 insertions, 53 deletions
diff --git a/balkan/bsdlabel.c b/balkan/bsdlabel.c
index e756e5596..6b47f8284 100644
--- a/balkan/bsdlabel.c
+++ b/balkan/bsdlabel.c
@@ -10,49 +10,54 @@
#define BSD_FS_UNUSED 0 /* disklabel unused partition entry ID */
#define BSD_LABEL_OFFSET 64
-struct bsd_disklabel {
- unsigned int d_magic; /* the magic number */
- signed short d_type; /* drive type */
- signed short d_subtype; /* controller/d_type specific */
- char d_typename[16]; /* type name, e.g. "eagle" */
- char d_packname[16]; /* pack identifier */
- unsigned int d_secsize; /* # of bytes per sector */
- unsigned int d_nsectors; /* # of data sectors per track */
- unsigned int d_ntracks; /* # of tracks per cylinder */
- unsigned int d_ncylinders; /* # of data cylinders per unit */
- unsigned int d_secpercyl; /* # of data sectors per cylinder */
- unsigned int d_secperunit; /* # of data sectors per unit */
- unsigned short d_sparespertrack; /* # of spare sectors per track */
- unsigned short d_sparespercyl; /* # of spare sectors per cylinder */
- unsigned int d_acylinders; /* # of alt. cylinders per unit */
- unsigned short d_rpm; /* rotational speed */
- unsigned short d_interleave; /* hardware sector interleave */
- unsigned short d_trackskew; /* sector 0 skew, per track */
- unsigned short d_cylskew; /* sector 0 skew, per cylinder */
- unsigned int d_headswitch; /* head switch time, usec */
- unsigned int d_trkseek; /* track-to-track seek, usec */
- unsigned int d_flags; /* generic flags */
- #define NDDATA 5
- unsigned int d_drivedata[NDDATA]; /* drive-type specific information */
- #define NSPARE 5
- unsigned int d_spare[NSPARE]; /* reserved for future use */
- unsigned int d_magic2; /* the magic number (again) */
- unsigned short d_checksum; /* xor of data incl. partitions */
-
- /* filesystem and partition information: */
- unsigned short d_npartitions; /* number of partitions in following */
- unsigned int d_bbsize; /* size of boot area at sn0, bytes */
- unsigned int d_sbsize; /* max size of fs superblock, bytes */
- struct bsd_partition { /* the partition table */
- unsigned int p_size; /* number of sectors in partition */
- unsigned int p_offset; /* starting sector */
- unsigned int p_fsize; /* filesystem basic fragment size */
- unsigned char p_fstype; /* filesystem type, see below */
- unsigned char p_frag; /* filesystem fragments per block */
- unsigned short p_cpg; /* filesystem cylinders per group */
- } d_partitions[BSD_MAXPARTITIONS]; /* actually may be more */
+typedef struct bsd_partition bsdp;
+typedef struct bsd_disklabel bsdl;
+
+struct bsd_partition { /* the partition table */
+ u_int32_t p_size; /* number of sectors in partition */
+ u_int32_t p_offset; /* starting sector */
+ u_int32_t p_fsize; /* filesystem basic fragment size */
+ u_int8_t p_fstype; /* filesystem type, see below */
+ u_int8_t p_frag; /* filesystem fragments per block */
+ u_int16_t p_cpg; /* filesystem cylinders per group */
};
+struct bsd_disklabel {
+ u_int32_t d_magic; /* the magic number */
+ int16_t d_type; /* drive type */
+ int16_t d_subtype; /* controller/d_type specific */
+ int8_t d_typename[16]; /* type name, e.g. "eagle" */
+ int8_t d_packname[16]; /* pack identifier */
+ u_int32_t d_secsize; /* # of bytes per sector */
+ u_int32_t d_nsectors; /* # of data sectors per track */
+ u_int32_t d_ntracks; /* # of tracks per cylinder */
+ u_int32_t d_ncylinders; /* # of data cylinders per unit */
+ u_int32_t d_secpercyl; /* # of data sectors per cylinder */
+ u_int32_t d_secperunit; /* # of data sectors per unit */
+ u_int16_t d_sparespertrack; /* # of spare sectors per track */
+ u_int16_t d_sparespercyl; /* # of spare sectors per cylinder */
+ u_int32_t d_acylinders; /* # of alt. cylinders per unit */
+ u_int16_t d_rpm; /* rotational speed */
+ u_int16_t d_interleave; /* hardware sector interleave */
+ u_int16_t d_trackskew; /* sector 0 skew, per track */
+ u_int16_t d_cylskew; /* sector 0 skew, per cylinder */
+ u_int32_t d_headswitch; /* head switch time, usec */
+ u_int32_t d_trkseek; /* track-to-track seek, usec */
+ u_int32_t d_flags; /* generic flags */
+#define NDDATA 5
+ u_int32_t d_drivedata[NDDATA]; /* drive-type specific information */
+#define NSPARE 5
+ u_int32_t d_spare[NSPARE]; /* reserved for future use */
+ u_int32_t d_magic2; /* the magic number (again) */
+ u_int16_t d_checksum; /* xor of data incl. partitions */
+
+ /* filesystem and partition information: */
+ u_int16_t d_npartitions; /* number of partitions in following */
+ u_int32_t d_bbsize; /* size of boot area at sn0, bytes */
+ u_int32_t d_sbsize; /* max size of fs superblock, bytes */
+ bsdp d_partitions[BSD_MAXPARTITIONS]; /* actually may be more */
+} __attribute__((packed));
+
#if 0
static unsigned short xbsd_dkcksum (struct bsd_disklabel *lp) {
unsigned short *start, *end;
@@ -127,6 +132,9 @@ void main() {
int i;
struct partitionTable table;
+ printf ("%d\n", sizeof(struct bsd_disklabel));
+ printf ("%d\n", sizeof(struct bsd_partition));
+ return;
fd = open("/dev/hda", O_RDONLY);
printf("rc= %d\n", bsdlReadTable(fd, &table));
diff --git a/comps.py b/comps.py
index 9225e0624..c7c16dd37 100644
--- a/comps.py
+++ b/comps.py
@@ -9,13 +9,19 @@ from translate import N_
from log import log
import time
-XFreeServerPackages = { 'XFree86-3DLabs' : 1, 'XFree86-8514' : 1,
- 'XFree86-AGX' : 1, 'XFree86-I128' : 1,
- 'XFree86-Mach32' : 1, 'XFree86-Mach64' : 1,
- 'XFree86-Mach8' : 1, 'XFree86-Mono' : 1,
- 'XFree86-P9000' : 1, 'XFree86-S3' : 1,
- 'XFree86-S3V' : 1, 'XFree86-SVGA' : 1,
- 'XFree86-VGA16' : 1, 'XFree86-W32' : 1 }
+ExcludePackages = { 'XFree86-3DLabs' : None, 'XFree86-8514' : None,
+ 'XFree86-AGX' : None, 'XFree86-I128' : None,
+ 'XFree86-Mach32' : None, 'XFree86-Mach64' : None,
+ 'XFree86-Mach8' : None, 'XFree86-Mono' : None,
+ 'XFree86-P9000' : None, 'XFree86-S3' : None,
+ 'XFree86-S3V' : None, 'XFree86-SVGA' : None,
+ 'XFree86-VGA16' : None, 'XFree86-W32' : None,
+
+ 'kernel' : None, 'kernel-BOOT' : None,
+ 'kernel-smp' : None,
+
+ 'kinput2-canna' : None, 'kinput-canna-wnn4' : None,
+ 'kinput2-wnn4' : None, 'kinput2-wnn6' : None }
# Package selection is complicated. Here are the rules:
#
@@ -447,11 +453,7 @@ class ComponentSet:
everything = Component(N_("Everything"), 0, 0)
for package in packages.keys ():
- if (packages[package][rpm.RPMTAG_NAME] != 'kernel' and
- packages[package][rpm.RPMTAG_NAME] != 'kernel-BOOT' and
-# packages[package][rpm.RPMTAG_NAME] != 'kernel-enterprise' and
- packages[package][rpm.RPMTAG_NAME] != 'kernel-smp' and
- not XFreeServerPackages.has_key(packages[package][rpm.RPMTAG_NAME])):
+ if not ExcludePackages.has_key(packages[package][rpm.RPMTAG_NAME]):
everything.addPackage (packages[package])
self.comps.append (everything)
self.compsDict["Everything"] = everything