patch for 2.1.85

Andries.Brouwer@cwi.nl
Mon, 9 Feb 1998 23:42:07 +0100 (MET)


Below a patch for 2.1.85. Most of it is just polish,
required to compile the kernel with kdev_t a pointer type.

[I have now been running a kernel with kdev_t a pointer
for a few days, and most things are fine. Today I tried
a plain 2.1.85 and saw that all things that are bad in
2.1.85+pointer_kdev_t are also bad in vanilla 2.1.85.]

This patch does not yet change anything at all - it is
just preparation. More in particular, I have not yet
looked carefully at nfsd and neighbours, where dev_t and
kdev_t are mixed freely, and I need some time to figure
out precisely what is sent over the wire, and what is
internal.

This also corrects some typos, introduces an ioctl BLKFLSBUF
in sr_ioctl.c, improves xconfig a little, removes some dead
code, fixes console.c a little - there may be more I forgot.

Andries

[This is patch number 5. Patches 1-3 were applied, 4 was not.
It is again contained in here.]

---

diff -u --recursive --new-file ../linux-2.1.85/linux/Documentation/filesystems/isofs.txt ./linux/Documentation/filesystems/isofs.txt --- ../linux-2.1.85/linux/Documentation/filesystems/isofs.txt Mon Feb 9 21:22:09 1998 +++ ./linux/Documentation/filesystems/isofs.txt Mon Feb 9 20:05:17 1998 @@ -1,9 +1,5 @@ Mount options that are the same as for msdos and vfat partitions. - conv=binary Data is returned exactly as is, with CRLF's. [default] - conv=text (Carriage return, line feed) is replaced with newline. - conv=mtext (Carriage return, line feed) is returned as is (?). - conv=auto Chooses, file by file, conv=binary or conv=text (by guessing) gid=nnn All files in the partition will be in group nnn. uid=nnn All files in the partition will be owned by user id nnn. umask=nnn The permission mask (see umask(1)) for the partition. diff -u --recursive --new-file ../linux-2.1.85/linux/arch/m68k/config.in ./linux/arch/m68k/config.in --- ../linux-2.1.85/linux/arch/m68k/config.in Tue Dec 2 20:41:44 1997 +++ ./linux/arch/m68k/config.in Mon Feb 9 20:05:17 1998 @@ -129,7 +129,7 @@ dep_tristate 'SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI dep_tristate 'SCSI CD-ROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then - bool ' Enable vendor-specific extentions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR + bool ' Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR fi dep_tristate 'SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI diff -u --recursive --new-file ../linux-2.1.85/linux/arch/sparc/config.in ./linux/arch/sparc/config.in --- ../linux-2.1.85/linux/arch/sparc/config.in Tue Jan 13 00:15:43 1998 +++ ./linux/arch/sparc/config.in Mon Feb 9 20:05:17 1998 @@ -110,7 +110,7 @@ dep_tristate 'SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI dep_tristate 'SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then - bool ' Enable vendor-specific extentions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR + bool ' Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR fi dep_tristate 'SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI diff -u --recursive --new-file ../linux-2.1.85/linux/arch/sparc64/config.in ./linux/arch/sparc64/config.in --- ../linux-2.1.85/linux/arch/sparc64/config.in Tue Jan 13 00:15:43 1998 +++ ./linux/arch/sparc64/config.in Mon Feb 9 20:05:17 1998 @@ -138,7 +138,7 @@ dep_tristate 'SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI dep_tristate 'SCSI CDROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then - bool ' Enable vendor-specific extentions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR + bool ' Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR fi dep_tristate 'SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/block/md.c ./linux/drivers/block/md.c --- ../linux-2.1.85/linux/drivers/block/md.c Mon Feb 9 21:22:09 1998 +++ ./linux/drivers/block/md.c Mon Feb 9 20:45:49 1998 @@ -61,7 +61,7 @@ #include <asm/atomic.h> #ifdef CONFIG_MD_BOOT -extern dev_t name_to_dev_t(char *line) __init; +extern kdev_t name_to_kdev_t(char *line) __init; #endif static struct hd_struct md_hd_struct[MAX_MD_DEV]; @@ -1196,7 +1196,7 @@ __initfunc(void do_md_setup(char *str,int *ints)) { int minor, pers, factor, fault; - dev_t dev; + kdev_t dev; int i=1; if(ints[0] < 4) { @@ -1254,9 +1254,9 @@ pers=pers | factor | (fault << FAULT_SHIFT); - while( str && (dev = name_to_dev_t(str))) { + while( str && (dev = name_to_kdev_t(str))) { do_md_add (minor, dev); - if(str = strchr (str, ',')) + if((str = strchr (str, ',')) != NULL) str++; } diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/block/paride/pt.c ./linux/drivers/block/paride/pt.c --- ../linux-2.1.85/linux/drivers/block/paride/pt.c Mon Feb 9 21:21:55 1998 +++ ./linux/drivers/block/paride/pt.c Mon Feb 9 20:05:17 1998 @@ -680,7 +680,7 @@ return -1; } -#define DEVICE_NR(x) (x % 128) +#define DEVICE_NR(dev) (MINOR(dev) % 128) static int pt_open (struct inode *inode, struct file *file) @@ -711,7 +711,8 @@ return -EROFS; } - if (!(inode->i_rdev & 128)) PT.flags |= PT_REWIND; + if (!(MINOR(inode->i_rdev) & 128)) + PT.flags |= PT_REWIND; PT.bufptr = kmalloc(PT_BUFSIZE,GFP_KERNEL); if (PT.bufptr == NULL) { @@ -726,18 +727,19 @@ static int pt_ioctl(struct inode *inode,struct file *file, unsigned int cmd, unsigned long arg) - -{ int unit; +{ + int unit; struct mtop mtop; - - if ((!inode) || (!inode->i_rdev)) return -EINVAL; + if (!inode || !inode->i_rdev) + return -EINVAL; unit = DEVICE_NR(inode->i_rdev); - if (unit >= PT_UNITS) return -EINVAL; - if (!PT.present) return -ENODEV; + if (unit >= PT_UNITS) + return -EINVAL; + if (!PT.present) + return -ENODEV; switch (cmd) { - case MTIOCTOP: if (copy_from_user((char *)&mtop, (char *)arg, sizeof(struct mtop))) return -EFAULT; @@ -763,8 +765,8 @@ static int pt_release (struct inode *inode, struct file *file) - -{ int unit = DEVICE_NR(inode->i_rdev); +{ + int unit = DEVICE_NR(inode->i_rdev); if ((unit >= PT_UNITS) || (PT.access <= 0)) return -EINVAL; @@ -786,8 +788,8 @@ static ssize_t pt_read(struct file * filp, char * buf, size_t count, loff_t *ppos) - -{ struct inode *ino = filp->f_dentry->d_inode; +{ + struct inode *ino = filp->f_dentry->d_inode; int unit = DEVICE_NR(ino->i_rdev); char rd_cmd[12] = {ATAPI_READ_6,1,0,0,0,0,0,0,0,0,0,0}; int k, n, r, p, s, t, b; @@ -870,8 +872,8 @@ static ssize_t pt_write(struct file * filp, const char * buf, size_t count, loff_t *ppos) - -{ struct inode *ino = filp->f_dentry->d_inode; +{ + struct inode *ino = filp->f_dentry->d_inode; int unit = DEVICE_NR(ino->i_rdev); char wr_cmd[12] = {ATAPI_WRITE_6,1,0,0,0,0,0,0,0,0,0,0}; int k, n, r, p, s, t, b; diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/block/ps2esdi.c ./linux/drivers/block/ps2esdi.c --- ../linux-2.1.85/linux/drivers/block/ps2esdi.c Mon Feb 9 21:21:44 1998 +++ ./linux/drivers/block/ps2esdi.c Mon Feb 9 20:05:17 1998 @@ -95,7 +95,7 @@ static int ps2esdi_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long arg); -static int ps2esdi_reread_partitions(int dev); +static int ps2esdi_reread_partitions(kdev_t dev); static int ps2esdi_read_status_words(int num_words, int max_words, u_short * buffer); @@ -1060,7 +1060,7 @@ int dev = DEVICE_NR(inode->i_rdev); if (dev < ps2esdi_drives) { - sync_dev(dev); + sync_dev(inode->i_rdev); access_count[dev]--; } return 0; @@ -1126,7 +1126,7 @@ -static int ps2esdi_reread_partitions(int dev) +static int ps2esdi_reread_partitions(kdev_t dev) { int target = DEVICE_NR(dev); int start = target << ps2esdi_gendisk.minor_shift; diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/cdrom/cdu31a.c ./linux/drivers/cdrom/cdu31a.c --- ../linux-2.1.85/linux/drivers/cdrom/cdu31a.c Mon Feb 9 21:21:56 1998 +++ ./linux/drivers/cdrom/cdu31a.c Mon Feb 9 20:05:17 1998 @@ -3282,7 +3282,7 @@ &scd_dops, /* device operations */ NULL, /* link */ NULL, /* handle */ - MKDEV(MAJOR_NR,0), /* dev */ + 0, /* dev */ 0, /* mask */ 2, /* maximum speed */ 1, /* number of discs */ @@ -3549,6 +3549,7 @@ init_timer(&cdu31a_abort_timer); cdu31a_abort_timer.function = handle_abort_timeout; + scd_info.dev = MKDEV(MAJOR_NR,0); scd_info.mask = deficiency; strncpy(scd_info.name, "cdu31a", sizeof(scd_info.name)); diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/cdrom/cm206.c ./linux/drivers/cdrom/cm206.c --- ../linux-2.1.85/linux/drivers/cdrom/cm206.c Mon Feb 9 21:21:56 1998 +++ ./linux/drivers/cdrom/cm206.c Mon Feb 9 20:05:17 1998 @@ -1248,7 +1248,7 @@ &cm206_dops, /* device operations */ NULL, /* link */ NULL, /* handle (not used by cm206) */ - MKDEV(MAJOR_NR,0), /* dev */ + 0, /* dev */ 0, /* mask */ 2, /* maximum speed */ 1, /* number of discs */ @@ -1386,6 +1386,7 @@ cleanup(3); return -EIO; } + cm206_info.dev = MKDEV(MAJOR_NR,0); if (register_cdrom(&cm206_info) != 0) { printk(KERN_INFO "Cannot register for cdrom %d!\n", MAJOR_NR); cleanup(3); diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/cdrom/mcd.c ./linux/drivers/cdrom/mcd.c --- ../linux-2.1.85/linux/drivers/cdrom/mcd.c Mon Feb 9 21:21:56 1998 +++ ./linux/drivers/cdrom/mcd.c Mon Feb 9 20:05:17 1998 @@ -216,7 +216,7 @@ &mcd_dops, /* device operations */ NULL, /* link */ NULL, /* handle */ - MKDEV(MAJOR_NR,0), /* dev */ + 0, /* dev */ 0, /* mask */ 2, /* maximum speed */ 1, /* number of discs */ @@ -243,15 +243,14 @@ static int mcd_media_changed(struct cdrom_device_info * cdi, int disc_nr) { - int retval, target; + int retval; #if 1 /* the below is not reliable */ return 0; #endif - target = cdi->dev; - if (target > 0) { + if (cdi->dev) { printk("mcd: Mitsumi CD-ROM request error: invalid device.\n"); return 0; } @@ -1231,17 +1230,20 @@ if (result[1] == 'D') { - sprintf(msg, " mcd: Mitsumi Double Speed CD-ROM at port=0x%x, irq=%d\n", mcd_port, mcd_irq); - MCMD_DATA_READ = MCMD_2X_READ; - mcd_info.speed = 2; - mcdDouble = 1; /* Added flag to drop to 1x speed if too many errors */ - } - else { - sprintf(msg, " mcd: Mitsumi Single Speed CD-ROM at port=0x%x, irq=%d\n", mcd_port, mcd_irq); - mcd_info.speed = 2; + sprintf(msg, " mcd: Mitsumi Double Speed CD-ROM at port=0x%x," + " irq=%d\n", mcd_port, mcd_irq); + MCMD_DATA_READ = MCMD_2X_READ; + + mcd_info.speed = 2; + /* Added flag to drop to 1x speed if too many errors */ + mcdDouble = 1; + } else { + sprintf(msg, " mcd: Mitsumi Single Speed CD-ROM at port=0x%x," + " irq=%d\n", mcd_port, mcd_irq); + mcd_info.speed = 2; } - request_region(mcd_port, 4,"mcd"); + request_region(mcd_port, 4, "mcd"); outb(MCMD_CONFIG_DRIVE, MCDPORT(0)); outb(0x02,MCDPORT(0)); @@ -1255,6 +1257,8 @@ mcd_invalidate_buffers(); mcdPresent = 1; + + mcd_info.dev = MKDEV(MAJOR_NR,0); if (register_cdrom(&mcd_info) != 0) { printk("Cannot register Mitsumi CD-ROM!\n"); diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/cdrom/mcdx.c ./linux/drivers/cdrom/mcdx.c --- ../linux-2.1.85/linux/drivers/cdrom/mcdx.c Mon Jan 5 09:06:26 1998 +++ ./linux/drivers/cdrom/mcdx.c Mon Feb 9 20:05:17 1998 @@ -294,7 +294,7 @@ &mcdx_dops, /* device operations */ NULL, /* link */ NULL, /* handle */ - MKDEV(MAJOR_NR,0), /* dev */ + 0, /* dev */ 0, /* mask */ 2, /* maximum speed */ 1, /* number of discs */ @@ -1024,174 +1024,186 @@ /* Support functions ************************************************/ -__initfunc(int mcdx_init(void)) +__initfunc(int mcdx_init_drive(int drive)) { - int drive; + struct s_version version; + struct s_drive_stuff* stuffp; + int size = sizeof(*stuffp); char msg[80]; -#ifdef MODULE - xwarn("Version 2.14(hs) for " UTS_RELEASE "\n"); -#else - xwarn("Version 2.14(hs) \n"); -#endif - - xwarn("$Id: mcdx.c,v 1.21 1997/01/26 07:12:59 davem Exp $\n"); - - /* zero the pointer array */ - for (drive = 0; drive < MCDX_NDRIVES; drive++) - mcdx_stuffp[drive] = NULL; - - /* do the initialisation */ - for (drive = 0; drive < MCDX_NDRIVES; drive++) { - struct s_version version; - struct s_drive_stuff* stuffp; - int size; - mcdx_blocksizes[drive] = 0; + mcdx_blocksizes[drive] = 0; - size = sizeof(*stuffp); + xtrace(INIT, "init() try drive %d\n", drive); - xtrace(INIT, "init() try drive %d\n", drive); + xtrace(INIT, "kmalloc space for stuffpt's\n"); + xtrace(MALLOC, "init() malloc %d bytes\n", size); + if (!(stuffp = kmalloc(size, GFP_KERNEL))) { + xwarn("init() malloc failed\n"); + return 1; + } - xtrace(INIT, "kmalloc space for stuffpt's\n"); - xtrace(MALLOC, "init() malloc %d bytes\n", size); - if (!(stuffp = kmalloc(size, GFP_KERNEL))) { - xwarn("init() malloc failed\n"); - break; - } + xtrace(INIT, "init() got %d bytes for drive stuff @ %p\n", + sizeof(*stuffp), stuffp); - xtrace(INIT, "init() got %d bytes for drive stuff @ %p\n", sizeof(*stuffp), stuffp); + /* set default values */ + memset(stuffp, 0, sizeof(*stuffp)); - /* set default values */ - memset(stuffp, 0, sizeof(*stuffp)); + stuffp->present = 0; /* this should be 0 already */ + stuffp->toc = NULL; /* this should be NULL already */ - stuffp->present = 0; /* this should be 0 already */ - stuffp->toc = NULL; /* this should be NULL already */ + /* setup our irq and i/o addresses */ + stuffp->irq = irq(mcdx_drive_map[drive]); + stuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]); + stuffp->wreg_reset = stuffp->rreg_status = stuffp->wreg_data + 1; + stuffp->wreg_hcon = stuffp->wreg_reset + 1; + stuffp->wreg_chn = stuffp->wreg_hcon + 1; + + /* check if i/o addresses are available */ + if (check_region((unsigned int) stuffp->wreg_data, MCDX_IO_SIZE)) { + xwarn("0x%3p,%d: Init failed. " + "I/O ports (0x%3p..0x%3p) already in use.\n", + stuffp->wreg_data, stuffp->irq, + stuffp->wreg_data, + stuffp->wreg_data + MCDX_IO_SIZE - 1); + xtrace(MALLOC, "init() free stuffp @ %p\n", stuffp); + kfree(stuffp); + xtrace(INIT, "init() continue at next drive\n"); + return 0; /* next drive */ + } - /* setup our irq and i/o addresses */ - stuffp->irq = irq(mcdx_drive_map[drive]); - stuffp->wreg_data = stuffp->rreg_data = port(mcdx_drive_map[drive]); - stuffp->wreg_reset = stuffp->rreg_status = stuffp->wreg_data + 1; - stuffp->wreg_hcon = stuffp->wreg_reset + 1; - stuffp->wreg_chn = stuffp->wreg_hcon + 1; - - /* check if i/o addresses are available */ - if (0 != check_region((unsigned int) stuffp->wreg_data, MCDX_IO_SIZE)) { - xwarn("0x%3p,%d: " - "Init failed. I/O ports (0x%3p..0x%3p) already in use.\n", - stuffp->wreg_data, stuffp->irq, - stuffp->wreg_data, - stuffp->wreg_data + MCDX_IO_SIZE - 1); - xtrace(MALLOC, "init() free stuffp @ %p\n", stuffp); - kfree(stuffp); - xtrace(INIT, "init() continue at next drive\n"); - continue; /* next drive */ - } - - xtrace(INIT, "init() i/o port is available at 0x%3p\n", stuffp->wreg_data); - - xtrace(INIT, "init() hardware reset\n"); - mcdx_reset(stuffp, HARD, 1); - - xtrace(INIT, "init() get version\n"); - if (-1 == mcdx_requestversion(stuffp, &version, 4)) { - /* failed, next drive */ - xwarn("%s=0x%3p,%d: Init failed. Can't get version.\n", - MCDX, - stuffp->wreg_data, stuffp->irq); - xtrace(MALLOC, "init() free stuffp @ %p\n", stuffp); - kfree(stuffp); - xtrace(INIT, "init() continue at next drive\n"); - continue; - } + xtrace(INIT, "init() i/o port is available at 0x%3p\n", + stuffp->wreg_data); + xtrace(INIT, "init() hardware reset\n"); + mcdx_reset(stuffp, HARD, 1); + + xtrace(INIT, "init() get version\n"); + if (-1 == mcdx_requestversion(stuffp, &version, 4)) { + /* failed, next drive */ + xwarn("%s=0x%3p,%d: Init failed. Can't get version.\n", + MCDX, + stuffp->wreg_data, stuffp->irq); + xtrace(MALLOC, "init() free stuffp @ %p\n", stuffp); + kfree(stuffp); + xtrace(INIT, "init() continue at next drive\n"); + return 0; + } - switch (version.code) { - case 'D': + switch (version.code) { + case 'D': stuffp->readcmd = READ2X; stuffp->present = DOUBLE | DOOR | MULTI; break; - case 'F': + case 'F': stuffp->readcmd = READ1X; stuffp->present = SINGLE | DOOR | MULTI; break; - case 'M': + case 'M': stuffp->readcmd = READ1X; stuffp->present = SINGLE; break; - default: + default: stuffp->present = 0; break; - } + } stuffp->playcmd = READ1X; + if (!stuffp->present) { + xwarn("%s=0x%3p,%d: Init failed. No Mitsumi CD-ROM?.\n", + MCDX, stuffp->wreg_data, stuffp->irq); + kfree(stuffp); + return 0; /* next drive */ + } - if (!stuffp->present) { - xwarn("%s=0x%3p,%d: Init failed. No Mitsumi CD-ROM?.\n", - MCDX, stuffp->wreg_data, stuffp->irq); - kfree(stuffp); - continue; /* next drive */ - } - - xtrace(INIT, "init() register blkdev\n"); - if (register_blkdev(MAJOR_NR, "mcdx", &cdrom_fops) != 0) { - xwarn("%s=0x%3p,%d: Init failed. Can't get major %d.\n", - MCDX, - stuffp->wreg_data, stuffp->irq, MAJOR_NR); - kfree(stuffp); - continue; /* next drive */ - } - - blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST; - read_ahead[MAJOR_NR] = READ_AHEAD; - - blksize_size[MAJOR_NR] = mcdx_blocksizes; - - xtrace(INIT, "init() subscribe irq and i/o\n"); - mcdx_irq_map[stuffp->irq] = stuffp; - if (request_irq(stuffp->irq, mcdx_intr, SA_INTERRUPT, "mcdx", NULL)) { - xwarn("%s=0x%3p,%d: Init failed. Can't get irq (%d).\n", - MCDX, - stuffp->wreg_data, stuffp->irq, stuffp->irq); - stuffp->irq = 0; - kfree(stuffp); - continue; - } - request_region((unsigned int) stuffp->wreg_data, - MCDX_IO_SIZE, - "mcdx"); + xtrace(INIT, "init() register blkdev\n"); + if (register_blkdev(MAJOR_NR, "mcdx", &cdrom_fops) != 0) { + xwarn("%s=0x%3p,%d: Init failed. Can't get major %d.\n", + MCDX, + stuffp->wreg_data, stuffp->irq, MAJOR_NR); + kfree(stuffp); + return 1; + } - xtrace(INIT, "init() get garbage\n"); - { - int i; - mcdx_delay(stuffp, HZ/2); - for (i = 100; i; i--) (void) inb((unsigned int) stuffp->rreg_status); - } + blk_dev[MAJOR_NR].request_fn = DEVICE_REQUEST; + read_ahead[MAJOR_NR] = READ_AHEAD; + blksize_size[MAJOR_NR] = mcdx_blocksizes; + + xtrace(INIT, "init() subscribe irq and i/o\n"); + mcdx_irq_map[stuffp->irq] = stuffp; + if (request_irq(stuffp->irq, mcdx_intr, SA_INTERRUPT, "mcdx", NULL)) { + xwarn("%s=0x%3p,%d: Init failed. Can't get irq (%d).\n", + MCDX, + stuffp->wreg_data, stuffp->irq, stuffp->irq); + stuffp->irq = 0; + kfree(stuffp); + return 0; + } + request_region((unsigned int) stuffp->wreg_data, + MCDX_IO_SIZE, + "mcdx"); + + xtrace(INIT, "init() get garbage\n"); + { + int i; + mcdx_delay(stuffp, HZ/2); + for (i = 100; i; i--) + (void) inb((unsigned int) stuffp->rreg_status); + } #if WE_KNOW_WHY - outb(0x50, (unsigned int) stuffp->wreg_chn); /* irq 11 -> channel register */ + /* irq 11 -> channel register */ + outb(0x50, (unsigned int) stuffp->wreg_chn); #endif - xtrace(INIT, "init() set non dma but irq mode\n"); - mcdx_config(stuffp, 1); + xtrace(INIT, "init() set non dma but irq mode\n"); + mcdx_config(stuffp, 1); - stuffp->minor = drive; + stuffp->minor = drive; - sprintf(msg, " mcdx: Mitsumi CD-ROM installed at 0x%3p, irq %d." - " (Firmware version %c %x)\n", - stuffp->wreg_data, stuffp->irq, version.code, - version.ver); - mcdx_stuffp[drive] = stuffp; - xtrace(INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp); + sprintf(msg, " mcdx: Mitsumi CD-ROM installed at 0x%3p, irq %d." + " (Firmware version %c %x)\n", + stuffp->wreg_data, stuffp->irq, version.code, + version.ver); + mcdx_stuffp[drive] = stuffp; + xtrace(INIT, "init() mcdx_stuffp[%d] = %p\n", drive, stuffp); + mcdx_info.dev = MKDEV(MAJOR_NR,0); if (register_cdrom(&mcdx_info) != 0) { - printk("Cannot register Mitsumi CD-ROM!\n"); - release_region((unsigned long) stuffp->wreg_data, MCDX_IO_SIZE); - free_irq(stuffp->irq, NULL); - kfree(stuffp); - if (unregister_blkdev(MAJOR_NR, "mcdx") != 0) + printk("Cannot register Mitsumi CD-ROM!\n"); + release_region((unsigned long) stuffp->wreg_data, + MCDX_IO_SIZE); + free_irq(stuffp->irq, NULL); + kfree(stuffp); + if (unregister_blkdev(MAJOR_NR, "mcdx") != 0) xwarn("cleanup() unregister_blkdev() failed\n"); - return -EIO; + return 2; } printk(msg); + return 0; +} + +__initfunc(int mcdx_init(void)) +{ + int drive; +#ifdef MODULE + xwarn("Version 2.14(hs) for " UTS_RELEASE "\n"); +#else + xwarn("Version 2.14(hs) \n"); +#endif + + xwarn("$Id: mcdx.c,v 1.21 1997/01/26 07:12:59 davem Exp $\n"); + + /* zero the pointer array */ + for (drive = 0; drive < MCDX_NDRIVES; drive++) + mcdx_stuffp[drive] = NULL; + + /* do the initialisation */ + for (drive = 0; drive < MCDX_NDRIVES; drive++) { + switch(mcdx_init_drive(drive)) { + case 2: + return -EIO; + case 1: + break; + } } return 0; } diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/cdrom/sbpcd.c ./linux/drivers/cdrom/sbpcd.c --- ../linux-2.1.85/linux/drivers/cdrom/sbpcd.c Mon Feb 9 21:21:56 1998 +++ ./linux/drivers/cdrom/sbpcd.c Mon Feb 9 20:05:18 1998 @@ -5417,7 +5417,7 @@ &sbpcd_dops, /* device operations */ NULL, /* link */ NULL, /* handle */ - MKDEV(MAJOR_NR,0), /* dev */ + 0, /* dev */ 0, /* mask */ 2, /* maximum speed */ 1, /* number of discs */ diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/char/conmakehash.c ./linux/drivers/char/conmakehash.c --- ../linux-2.1.85/linux/drivers/char/conmakehash.c Tue Aug 12 02:28:19 1997 +++ ./linux/drivers/char/conmakehash.c Mon Feb 9 20:05:18 1998 @@ -283,7 +283,7 @@ } printf("0x%04x", unitable[fp0][nent++]); if ( i == nuni-1 ) - printf("\n};"); + printf("\n};\n"); else if ( i % 8 == 7 ) printf(",\n\t"); else diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/char/console.c ./linux/drivers/char/console.c --- ../linux-2.1.85/linux/drivers/char/console.c Thu Dec 4 00:21:57 1997 +++ ./linux/drivers/char/console.c Mon Feb 9 20:05:18 1998 @@ -1420,6 +1420,12 @@ /* If we got -4 (not found) then see if we have defined a replacement character (U+FFFD) */ tc = conv_uni_to_pc(0xfffd); + + /* One reason for the -4 can be that we just + did a clear_unimap(); + try at least to show something. */ + if (tc == -4) + tc = c; } else if ( tc == -3 ) { /* Bad hash table -- hope for the best */ tc = c; diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/char/istallion.c ./linux/drivers/char/istallion.c --- ../linux-2.1.85/linux/drivers/char/istallion.c Fri Dec 19 21:30:54 1997 +++ ./linux/drivers/char/istallion.c Mon Feb 9 20:05:18 1998 @@ -498,8 +498,8 @@ /* * Define macros to extract a brd or port number from a minor number. */ -#define MKDEV2BRD(min) (((min) & 0xc0) >> 6) -#define MKDEV2PORT(min) ((min) & 0x3f) +#define MINOR2BRD(min) (((min) & 0xc0) >> 6) +#define MINOR2PORT(min) ((min) & 0x3f) /* * Define a baud rate table that converts termios baud rate selector @@ -790,7 +790,7 @@ #endif minordev = MINOR(tty->device); - brdnr = MKDEV2BRD(minordev); + brdnr = MINOR2BRD(minordev); if (brdnr >= stli_nrbrds) return(-ENODEV); brdp = stli_brds[brdnr]; @@ -798,7 +798,7 @@ return(-ENODEV); if ((brdp->state & BST_STARTED) == 0) return(-ENODEV); - portnr = MKDEV2PORT(minordev); + portnr = MINOR2PORT(minordev); if ((portnr < 0) || (portnr > brdp->nrports)) return(-ENODEV); diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/char/rocket.c ./linux/drivers/char/rocket.c --- ../linux-2.1.85/linux/drivers/char/rocket.c Sun Jan 4 19:55:08 1998 +++ ./linux/drivers/char/rocket.c Mon Feb 9 20:05:18 1998 @@ -224,7 +224,7 @@ static void rp_start(struct tty_struct *tty); static inline int rocket_paranoia_check(struct r_port *info, - dev_t device, const char *routine) + kdev_t device, const char *routine) { #ifdef ROCKET_PARANOIA_CHECK static const char *badmagic = diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/char/stallion.c ./linux/drivers/char/stallion.c --- ../linux-2.1.85/linux/drivers/char/stallion.c Fri Dec 19 21:30:54 1997 +++ ./linux/drivers/char/stallion.c Mon Feb 9 20:05:18 1998 @@ -377,8 +377,8 @@ /* * Define macros to extract a brd/port number from a minor number. */ -#define MKDEV2BRD(min) (((min) & 0xc0) >> 6) -#define MKDEV2PORT(min) ((min) & 0x3f) +#define MINOR2BRD(min) (((min) & 0xc0) >> 6) +#define MINOR2PORT(min) ((min) & 0x3f) /* * Define a baud rate table that converts termios baud rate selector @@ -796,13 +796,13 @@ #endif minordev = MINOR(tty->device); - brdnr = MKDEV2BRD(minordev); + brdnr = MINOR2BRD(minordev); if (brdnr >= stl_nrbrds) return(-ENODEV); brdp = stl_brds[brdnr]; if (brdp == (stlbrd_t *) NULL) return(-ENODEV); - minordev = MKDEV2PORT(minordev); + minordev = MINOR2PORT(minordev); for (portnr = -1, panelnr = 0; (panelnr < STL_MAXPANELS); panelnr++) { if (brdp->panels[panelnr] == (stlpanel_t *) NULL) break; diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/char/sysrq.c ./linux/drivers/char/sysrq.c --- ../linux-2.1.85/linux/drivers/char/sysrq.c Mon Dec 22 02:27:17 1997 +++ ./linux/drivers/char/sysrq.c Mon Feb 9 20:05:18 1998 @@ -171,9 +171,9 @@ static void go_sync(kdev_t dev, int remount_flag) { - printk(KERN_INFO "%sing device %04x ... ", + printk(KERN_INFO "%sing device %s ... ", remount_flag ? "Remount" : "Sync", - dev); + kdevname(dev)); if (remount_flag) { /* Remount R/O */ struct super_block *sb = get_super(dev); diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/char/vc_screen.c ./linux/drivers/char/vc_screen.c --- ../linux-2.1.85/linux/drivers/char/vc_screen.c Mon Dec 29 19:27:23 1997 +++ ./linux/drivers/char/vc_screen.c Mon Feb 9 20:05:18 1998 @@ -16,8 +16,7 @@ * aeb@cwi.nl - efter Friedas begravelse - 950211 * * machek@k332.feld.cvut.cz - modified not to send characters to wrong console - * - fixed some fatal of-by-one bugs (0-- no longer == -1 -> looping and looping and looping...) - * - making it working with multiple monitor patches + * - fixed some fatal off-by-one bugs (0-- no longer == -1 -> looping and looping and looping...) * - making it shorter - scr_readw are macros which expand in PRETTY long code */ @@ -76,24 +75,22 @@ static long long vcs_lseek(struct file *file, long long offset, int orig) { - int size; - size = vcs_size(file->f_dentry->d_inode); + int size = vcs_size(file->f_dentry->d_inode); switch (orig) { - case 0: - file->f_pos = offset; + default: + return -EINVAL; + case 2: + offset += size; break; case 1: - file->f_pos += offset; - break; - case 2: - file->f_pos = size + offset; + offset += file->f_pos; + case 0: break; - default: - return -EINVAL; } - if (file->f_pos < 0 || file->f_pos > size) - { file->f_pos = 0; return -EINVAL; } + if (offset < 0 || offset > size) + return -EINVAL; + file->f_pos = offset; return file->f_pos; } diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/net/arcnet.c ./linux/drivers/net/arcnet.c --- ../linux-2.1.85/linux/drivers/net/arcnet.c Sat Nov 29 19:33:19 1997 +++ ./linux/drivers/net/arcnet.c Mon Feb 9 20:05:19 1998 @@ -1434,7 +1434,9 @@ struct ClientData *head = (struct ClientData *)skb->data; struct device *dev=skb->dev; struct arcnet_local *lp=(struct arcnet_local *)(dev->priv); +#ifdef CONFIG_INET int status; +#endif /* * Only ARP and IP are currently supported diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/net/strip.c ./linux/drivers/net/strip.c --- ../linux-2.1.85/linux/drivers/net/strip.c Thu Jan 15 23:33:06 1998 +++ ./linux/drivers/net/strip.c Mon Feb 9 20:05:19 1998 @@ -1630,11 +1630,9 @@ static int strip_rebuild_header(struct sk_buff *skb) { +#ifdef CONFIG_INET STRIP_Header *header = (STRIP_Header *)skb->data; - /*printk(KERN_INFO "%s: strip_rebuild_header\n", skb->dev->name);*/ - -#ifdef CONFIG_INET /* Arp find returns zero if if knows the address, */ /* or if it doesn't know the address it sends an ARP packet and returns non-zero */ return arp_find(header->dst_addr.c, skb)? 1 : 0; diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/scsi/Config.in ./linux/drivers/scsi/Config.in --- ../linux-2.1.85/linux/drivers/scsi/Config.in Mon Feb 9 21:22:09 1998 +++ ./linux/drivers/scsi/Config.in Mon Feb 9 20:05:19 1998 @@ -4,7 +4,7 @@ dep_tristate 'SCSI tape support' CONFIG_CHR_DEV_ST $CONFIG_SCSI dep_tristate 'SCSI CD-ROM support' CONFIG_BLK_DEV_SR $CONFIG_SCSI if [ "$CONFIG_BLK_DEV_SR" != "n" ]; then - bool ' Enable vendor-specific extentions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR + bool ' Enable vendor-specific extensions (for SCSI CDROM)' CONFIG_BLK_DEV_SR_VENDOR fi dep_tristate 'SCSI generic support' CONFIG_CHR_DEV_SG $CONFIG_SCSI diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/scsi/sr_ioctl.c ./linux/drivers/scsi/sr_ioctl.c --- ../linux-2.1.85/linux/drivers/scsi/sr_ioctl.c Fri Jan 9 05:35:43 1998 +++ ./linux/drivers/scsi/sr_ioctl.c Mon Feb 9 20:05:19 1998 @@ -803,6 +803,15 @@ RO_IOCTLS(cdi->dev,arg); + case BLKFLSBUF: + if(!suser()) + return -EACCES; + if(!(cdi->dev)) + return -EINVAL; + fsync_dev(cdi->dev); + invalidate_buffers(cdi->dev); + return 0; + default: return scsi_ioctl(scsi_CDs[target].device,cmd,(void *) arg); } diff -u --recursive --new-file ../linux-2.1.85/linux/drivers/scsi/sr_vendor.c ./linux/drivers/scsi/sr_vendor.c --- ../linux-2.1.85/linux/drivers/scsi/sr_vendor.c Fri Jan 9 05:35:43 1998 +++ ./linux/drivers/scsi/sr_vendor.c Mon Feb 9 20:05:19 1998 @@ -3,7 +3,7 @@ * vendor-specific code for SCSI CD-ROM's goes here. * * This is needed becauce most of the new features (multisession and - * the like) are to new to be included into the SCSI-II standard (to + * the like) are too new to be included into the SCSI-II standard (to * be exact: there is'nt anything in my draft copy). * * Aug 1997: Ha! Got a SCSI-3 cdrom spec across my fingers. SCSI-3 does @@ -83,7 +83,13 @@ if (!strncmp (model,"CD-ROM DRIVE:25", 15) || !strncmp (model,"CD-ROM DRIVE:36", 15) || !strncmp (model,"CD-ROM DRIVE:83", 15) || - !strncmp (model,"CD-ROM DRIVE:84 ",16)) + !strncmp (model,"CD-ROM DRIVE:84 ",16) +#if 0 + /* my NEC 3x returns the read-raw data if a read-raw + is followed by a read for the same sector - aeb */ + || !strncmp (model,"CD-ROM DRIVE:500",16) +#endif + ) /* these can't handle multisession, may hang */ scsi_CDs[minor].cdi.mask |= CDC_MULTI_SESSION; @@ -148,7 +154,7 @@ unsigned long sector,min,sec,frame; unsigned char *buffer; /* the buffer for the ioctl */ unsigned char cmd[12]; /* the scsi-command */ - int rc,is_xa,no_multi,minor; + int rc,no_multi,minor; minor = MINOR(cdi->dev); if (scsi_CDs[minor].cdi.mask & CDC_MULTI_SESSION) @@ -158,7 +164,6 @@ if(!buffer) return -ENOMEM; sector = 0; /* the multisession sector offset goes here */ - is_xa = 0; /* flag: the CD uses XA-Sectors */ no_multi = 0; /* flag: the drive can't handle multisession */ rc = 0; diff -u --recursive --new-file ../linux-2.1.85/linux/fs/coda/file.c ./linux/fs/coda/file.c --- ../linux-2.1.85/linux/fs/coda/file.c Tue Jan 6 19:00:21 1998 +++ ./linux/fs/coda/file.c Mon Feb 9 20:05:19 1998 @@ -264,7 +264,7 @@ { struct super_block *sbptr; - sbptr = get_super(dev); + sbptr = get_super(to_kdev_t(dev)); if ( !sbptr ) { printk("coda_inode_grab: coda_find_super returns NULL.\n"); diff -u --recursive --new-file ../linux-2.1.85/linux/fs/coda/pioctl.c ./linux/fs/coda/pioctl.c --- ../linux-2.1.85/linux/fs/coda/pioctl.c Sun Dec 21 23:45:14 1997 +++ ./linux/fs/coda/pioctl.c Mon Feb 9 20:05:19 1998 @@ -129,8 +129,8 @@ target_inode = target_de->d_inode; } - CDEBUG(D_PIOCTL, "target ino: 0x%ld, dev: 0x%d\n", - target_inode->i_ino, target_inode->i_dev); + CDEBUG(D_PIOCTL, "target ino: 0x%ld, dev: %s\n", + target_inode->i_ino, kdevname(target_inode->i_dev)); /* return if it is not a Coda inode */ if ( target_inode->i_sb != inode->i_sb ) { diff -u --recursive --new-file ../linux-2.1.85/linux/fs/coda/super.c ./linux/fs/coda/super.c --- ../linux-2.1.85/linux/fs/coda/super.c Tue Jan 6 19:00:21 1998 +++ ./linux/fs/coda/super.c Mon Feb 9 20:05:19 1998 @@ -131,8 +131,8 @@ goto error; } - printk("coda_read_super: rootinode is %ld dev %d\n", - root->i_ino, root->i_dev); + printk("coda_read_super: rootinode is %ld dev %s\n", + root->i_ino, kdevname(root->i_dev)); sbi->sbi_root = root; sb->s_root = d_alloc_root(root, NULL); unlock_super(sb); @@ -351,7 +351,7 @@ if (MINOR(psdev->i_rdev) >= MAX_CODADEVS) { printk("minor %d not an allocated Coda PSDEV\n", - psdev->i_rdev); + MINOR(psdev->i_rdev)); return 1; } diff -u --recursive --new-file ../linux-2.1.85/linux/fs/coda/symlink.c ./linux/fs/coda/symlink.c --- ../linux-2.1.85/linux/fs/coda/symlink.c Tue Jan 6 19:00:21 1998 +++ ./linux/fs/coda/symlink.c Mon Feb 9 20:05:19 1998 @@ -94,7 +94,7 @@ char mem[CFS_MAXPATHLEN]; char *path; ENTRY; - CDEBUG(D_INODE, "(%x/%ld)\n", inode->i_dev, inode->i_ino); + CDEBUG(D_INODE, "(%s/%ld)\n", kdevname(inode->i_dev), inode->i_ino); cnp = ITOC(inode); CHECK_CNODE(cnp); diff -u --recursive --new-file ../linux-2.1.85/linux/fs/ext2/inode.c ./linux/fs/ext2/inode.c --- ../linux-2.1.85/linux/fs/ext2/inode.c Mon Jan 12 23:22:54 1998 +++ ./linux/fs/ext2/inode.c Mon Feb 9 20:05:20 1998 @@ -629,17 +629,11 @@ void ext2_write_inode (struct inode * inode) { -#if 0 - printk("ext2_write(%04x:%06d)...", inode->i_dev, inode->i_ino); -#endif ext2_update_inode (inode, 0); } int ext2_sync_inode (struct inode *inode) { -#if 0 - printk("ext2_sync(%04x:%06d)...", inode->i_dev, inode->i_ino); -#endif return ext2_update_inode (inode, 1); } diff -u --recursive --new-file ../linux-2.1.85/linux/fs/isofs/inode.c ./linux/fs/isofs/inode.c --- ../linux-2.1.85/linux/fs/isofs/inode.c Fri Dec 19 01:37:02 1997 +++ ./linux/fs/isofs/inode.c Mon Feb 9 20:05:20 1998 @@ -79,7 +79,6 @@ char cruft; char unhide; unsigned char check; - unsigned char conversion; unsigned int blocksize; mode_t mode; gid_t gid; @@ -98,7 +97,6 @@ popt->cruft = 'n'; popt->unhide = 'n'; popt->check = 's'; /* default: strict */ - popt->conversion = 'b'; /* default: no conversion */ popt->blocksize = 1024; popt->mode = S_IRUGO | S_IXUGO; /* r-x for all. The disc could be shared with DOS machines so @@ -166,12 +164,14 @@ else return 0; } else if (!strcmp(this_char,"conv") && value) { - if (value[0] && !value[1] && strchr("btma",*value)) - popt->conversion = *value; - else if (!strcmp(value,"binary")) popt->conversion = 'b'; - else if (!strcmp(value,"text")) popt->conversion = 't'; - else if (!strcmp(value,"mtext")) popt->conversion = 'm'; - else if (!strcmp(value,"auto")) popt->conversion = 'a'; + /* no conversion is done anymore; + we still accept the same mount options, + but ignore them */ + if (value[0] && !value[1] && strchr("btma",*value)) ; + else if (!strcmp(value,"binary")) ; + else if (!strcmp(value,"text")) ; + else if (!strcmp(value,"mtext")) ; + else if (!strcmp(value,"auto")) ; else return 0; } else if (value && @@ -254,17 +254,17 @@ printk("isofs.inode: XA disk: %s\n", ms_info.xa_flag ? "yes":"no"); printk("isofs.inode: vol_desc_start = %d\n", ms_info.addr.lba); } -#endif 0 +#endif if (i==0) #if WE_OBEY_THE_WRITTEN_STANDARDS if (ms_info.xa_flag) /* necessary for a valid ms_info.addr */ -#endif WE_OBEY_THE_WRITTEN_STANDARDS +#endif vol_desc_start=ms_info.addr.lba; } return vol_desc_start; } -struct super_block *isofs_read_super(struct super_block *s,void *data, +struct super_block *isofs_read_super(struct super_block *s, void *data, int silent) { struct buffer_head * bh = NULL; @@ -301,7 +301,6 @@ printk("check = %c\n", opt.check); printk("cruft = %c\n", opt.cruft); printk("unhide = %c\n", opt.unhide); - printk("conversion = %c\n", opt.conversion); printk("blocksize = %d\n", opt.blocksize); printk("gid = %d\n", opt.gid); printk("uid = %d\n", opt.uid); @@ -571,7 +570,6 @@ s->u.isofs_sb.s_mapping = opt.map; s->u.isofs_sb.s_rock = (opt.rock == 'y' ? 2 : 0); s->u.isofs_sb.s_name_check = opt.check; - s->u.isofs_sb.s_conversion = opt.conversion; s->u.isofs_sb.s_cruft = opt.cruft; s->u.isofs_sb.s_unhide = opt.unhide; s->u.isofs_sb.s_uid = opt.uid; @@ -798,21 +796,6 @@ inode->u.isofs_i.i_first_extent = (isonum_733 (raw_inode->extent) + isonum_711 (raw_inode->ext_attr_length)) << inode -> i_sb -> u.isofs_sb.s_log_zone_size; - - switch (inode->i_sb->u.isofs_sb.s_conversion){ - case 'a': - inode->u.isofs_i.i_file_format = ISOFS_FILE_UNKNOWN; /* File type */ - break; - case 'b': - inode->u.isofs_i.i_file_format = ISOFS_FILE_BINARY; /* File type */ - break; - case 't': - inode->u.isofs_i.i_file_format = ISOFS_FILE_TEXT; /* File type */ - break; - case 'm': - inode->u.isofs_i.i_file_format = ISOFS_FILE_TEXT_M; /* File type */ - break; - } /* Now test for possible Rock Ridge extensions which will override some of these numbers in the inode structure. */ diff -u --recursive --new-file ../linux-2.1.85/linux/include/linux/ctype.h ./linux/include/linux/ctype.h --- ../linux-2.1.85/linux/include/linux/ctype.h Sat Nov 23 11:29:04 1996 +++ ./linux/include/linux/ctype.h Mon Feb 9 20:05:20 1998 @@ -2,7 +2,7 @@ #define _LINUX_CTYPE_H /* - * NOTE! This ctype does not handle EOF like the standarc C + * NOTE! This ctype does not handle EOF like the standard C * library is required to. */ diff -u --recursive --new-file ../linux-2.1.85/linux/include/linux/iso_fs.h ./linux/include/linux/iso_fs.h --- ../linux-2.1.85/linux/include/linux/iso_fs.h Tue Dec 9 09:09:00 1997 +++ ./linux/include/linux/iso_fs.h Mon Feb 9 20:33:38 1998 @@ -163,10 +163,6 @@ #define ISOFS_ZONE_BITS(INODE) ((INODE)->i_sb->u.isofs_sb.s_log_zone_size) #define ISOFS_SUPER_MAGIC 0x9660 -#define ISOFS_FILE_UNKNOWN 0 -#define ISOFS_FILE_TEXT 1 -#define ISOFS_FILE_BINARY 2 -#define ISOFS_FILE_TEXT_M 3 #ifdef __KERNEL__ extern int isonum_711(char *); diff -u --recursive --new-file ../linux-2.1.85/linux/include/linux/iso_fs_i.h ./linux/include/linux/iso_fs_i.h --- ../linux-2.1.85/linux/include/linux/iso_fs_i.h Wed Jul 16 19:26:21 1997 +++ ./linux/include/linux/iso_fs_i.h Mon Feb 9 20:05:20 1998 @@ -6,7 +6,6 @@ */ struct iso_inode_info { unsigned int i_first_extent; - unsigned char i_file_format; }; #endif diff -u --recursive --new-file ../linux-2.1.85/linux/include/linux/iso_fs_sb.h ./linux/include/linux/iso_fs_sb.h --- ../linux-2.1.85/linux/include/linux/iso_fs_sb.h Thu Oct 23 23:00:15 1997 +++ ./linux/include/linux/iso_fs_sb.h Mon Feb 9 20:05:20 1998 @@ -13,7 +13,6 @@ unsigned char s_high_sierra; /* A simple flag */ unsigned char s_mapping; - unsigned char s_conversion; unsigned char s_rock; unsigned char s_joliet_level; unsigned char s_utf8; diff -u --recursive --new-file ../linux-2.1.85/linux/init/main.c ./linux/init/main.c --- ../linux-2.1.85/linux/init/main.c Mon Feb 9 21:22:10 1998 +++ ./linux/init/main.c Mon Feb 9 20:38:42 1998 @@ -426,7 +426,7 @@ { NULL, 0 } }; -__initfunc(dev_t name_to_dev_t(char *line)) +__initfunc(kdev_t name_to_kdev_t(char *line)) { int base = 0; if (strncmp(line,"/dev/",5) == 0) { @@ -447,7 +447,7 @@ __initfunc(static void root_dev_setup(char *line, int *num)) { - ROOT_DEV = name_to_dev_t(line); + ROOT_DEV = name_to_kdev_t(line); } /* @@ -1165,14 +1165,16 @@ #ifdef CONFIG_BLK_DEV_INITRD root_mountflags = real_root_mountflags; - if (mount_initrd && ROOT_DEV != real_root_dev && ROOT_DEV == MKDEV(RAMDISK_MAJOR,0)) { + if (mount_initrd && ROOT_DEV != real_root_dev + && MAJOR(ROOT_DEV) == RAMDISK_MAJOR && MINOR(ROOT_DEV) == 0) { int error; int i, pid; pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); if (pid>0) while (pid != wait(&i)); - if (real_root_dev != MKDEV(RAMDISK_MAJOR, 0)) { + if (MAJOR(real_root_dev) != RAMDISK_MAJOR + || MINOR(real_root_dev) != 0) { error = change_root(real_root_dev,"/initrd"); if (error) printk(KERN_ERR "Change root to /initrd: " diff -u --recursive --new-file ../linux-2.1.85/linux/scripts/header.tk ./linux/scripts/header.tk --- ../linux-2.1.85/linux/scripts/header.tk Mon Jan 5 10:41:01 1998 +++ ./linux/scripts/header.tk Mon Feb 9 20:05:20 1998 @@ -237,7 +237,7 @@ then { puts $file1 "$varname=y"; \ puts $file2 "#define $varname 1" } \ else { \ - error "Attempting to write value for variable that is not configured ($varname)." \ + puts stdout "ERROR - Attempting to write value for unconfigured variable ($varname)." \ } } @@ -281,7 +281,21 @@ pack $w.x$line.l -side right -fill both -expand on } -proc toggle_switch {w mnum line text variable} { +proc toggle_switch2 {w mnum line text variable} { + frame $w.x$line -relief sunken + radiobutton $w.x$line.y -text "y" -variable $variable -value 1 \ + -relief groove -width 2 -command "update_menu$mnum .menu$mnum" + radiobutton $w.x$line.m -text "-" -variable $variable -value 2 \ + -relief groove -width 2 -command "update_menu$mnum .menu$mnum" + radiobutton $w.x$line.n -text "n" -variable $variable -value 0 \ + -relief groove -width 2 -command "update_menu$mnum .menu$mnum" + + option_name $w $mnum $line $text $variable + + pack $w.x$line.n $w.x$line.m $w.x$line.y -side right -fill y +} + +proc toggle_switch3 {w mnum line text variable} { frame $w.x$line -relief sunken radiobutton $w.x$line.y -text "y" -variable $variable -value 1 \ -relief groove -width 2 -command "update_menu$mnum .menu$mnum" @@ -296,13 +310,13 @@ } proc bool {w mnum line text variable} { - toggle_switch $w $mnum $line $text $variable + toggle_switch2 $w $mnum $line $text $variable $w.x$line.m configure -state disabled pack $w.x$line -anchor w -fill both -expand on } proc tristate {w mnum line text variable } { - toggle_switch $w $mnum $line $text $variable + toggle_switch3 $w $mnum $line $text $variable pack $w.x$line -anchor w -fill both -expand on } @@ -336,7 +350,7 @@ frame $w.x$line menubutton $w.x$line.x -textvariable $variable -menu \ $w.x$line.x.menu -relief raised \ - -width 15 -anchor w + -anchor w option_name $w $mnum $line $text $helpidx pack $w.x$line.x -anchor w -side right -fill y pack $w.x$line -anchor w -fill both -expand on diff -u --recursive --new-file ../linux-2.1.85/linux/scripts/tkgen.c ./linux/scripts/tkgen.c --- ../linux-2.1.85/linux/scripts/tkgen.c Mon Jan 5 10:41:02 1998 +++ ./linux/scripts/tkgen.c Mon Feb 9 20:05:20 1998 @@ -685,7 +685,7 @@ int menu_maxlines = 0; struct kconfig * cfg; struct kconfig * cfg1 = NULL; - char * menulabel; + char * menulabel = "tkgen error"; /* * Start by assigning menu numbers, and submenu numbers. diff -u --recursive --new-file ../linux-2.1.85/linux/scripts/tkparse.c ./linux/scripts/tkparse.c --- ../linux-2.1.85/linux/scripts/tkparse.c Tue Dec 23 22:52:02 1997 +++ ./linux/scripts/tkparse.c Mon Feb 9 20:05:20 1998 @@ -578,7 +578,7 @@ char buffer[1024]; int offset; int old_lineno; - char * old_file; + char * old_file = 0; /* superfluous, just for gcc */ char * pnt; FILE * infile; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu