Commit da0f0135 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.2.2pre1

parent 85a51578
......@@ -57,6 +57,8 @@ java.txt
- info on the in-kernel binary support for Java(tm)
joystick.txt
- info on using joystick devices (and driver) with linux.
kbuild/
- directory with info about the kernel build process
kmod.txt
- - info on the kernel module loader/unloader (kerneld replacement)
locks.txt
......
00-INDEX
- this file: info on the kernel build process
bug-list.txt
- known bugs in kbuild programs
commands.txt
- overview of kbuild commands
config-language.txt
- specification of Config Language, the language in Config.in files
Bug List
21 January 1999
Michael Elizabeth Chastain, <mailto:mec@shout.net>
- If a variable has a value of "m" in the previous .config file,
and a type of bool in the Config script, then all the interpreters
get confused. This happens frequently when someone changes a
tristate option to a bool option and people in the field have
.config files with a value of 'm'. For example: CONFIG_PSMOUSE.
- CONFIG_MODVERSIONS has incorrect dependencies. If you have a
problem building the kernel, and you have CONFIG_MODVERSIONS turned
on, do a 'make dep' followed by 'make clean' before you try anything
else.
- 'make dep' uses multistage dependencies, so the .hdepend file contains
'touch' commands. As a result, building a kernel often touches files
in include/linux/*.h. This messes up CVS and other systems which like
to rely on file dates.
- 'make dep' fails for C files which include other C files, such as
drivers/cdrom/sbpcd2.c.
Overview of Kbuild Commands
24 January 1999
Michael Elizabeth Chastain, <mailto:mec@shout.net>
=== Introduction
Someday we'll get our arms around all this stuff and clean it up
a little! Meanwhile, this file describes the system as it is today.
=== Quick Start
If you are building a kernel for the first time, here are the commands
you need:
make config
make dep
make bzImage
Instead of 'make config', you can run 'make menuconfig' for a full-screen
text interface, or 'make xconfig' for an X interface using TCL/TK.
'make bzImage' will leave your new kernel image in arch/i386/boot/bzImage.
You can also use 'make bzdisk' or 'make bzlilo'.
See the lilo documentation for more information on how to use lilo.
You can also use the 'loadlin' program to boot Linux from MS-DOS.
Some computers won't work with 'make bzImage', either due to hardware
problems or very old versions of lilo or loadlin. If your kernel image
is small, you may use 'make zImage', 'make zdisk', or 'make zlilo'
on theses systems.
If you find a file name 'vmlinux' in the top directory of the source tree,
just ignore it. This is an intermediate file and you can't boot from it.
Other architectures: the information above is oriented towards the
i386. On other architectures, there are no 'bzImage' files; simply
use 'zImage' or 'vmlinux' as appropriate for your architecture.
Note: the difference between 'zImage' files and 'bzImage' files is that
'bzImage' uses a different layout and a different loading algorithm,
and thus has a larger capacity. Both files use gzip compression.
The 'bz' in 'bzImage' stands for 'big zImage', not for 'bzip'!
=== Top Level Makefile targets
Here are the targets available at the top level:
make config, make oldconfig, make menuconfig, make xconfig
Configure the Linux kernel. You must do this before almost
anything else.
config line-oriented interface
oldconfig line-oriented interface, re-uses old values
menuconfig curses-based full-screen interface
xconfig X window system interface
make checkconfig
This runs a little perl script that checks the source tree for
missing instances of #include <linux/config.h>. Someone needs to
do this occasionally, because the C preprocessor will silently give
bad results if these symbols haven't been included (it treats
undefined symbols in preprocessor directives as defined to 0).
Superfluous uses of #include <linux/config.h> are also reported,
but you can ignore these, because smart CONFIG_* dependencies
make them harmless.
You can run 'make checkconfig' without configuring the kernel.
Also, 'make checkconfig' does not modify any files.
make checkhelp
This runs another little perl script that checks the source tree
for options that are in Config.in files but are not documented
in scripts/Configure.help. Again, someone needs to do this
occasionally. If you are adding configuration options, it's
nice if you do it before you publish your patch!
You can run 'make checkhelp' withoug configuring the kernel.
Also, 'make checkhelp' does not modify any files.
make dep, make depend
'make dep' is a synonym for the long form, 'make depend'.
This command does two things. First, it computes dependency
information about which .o files depend on which .h files.
It records this information in a top-level file named .hdepend
and in one file per source directory named .depend.
Second, if you have CONFIG_MODVERSIONS enabled, 'make dep'
computes symbol version information for all of the files that
export symbols (note that both resident and modular files may
export symbols).
If you do not enable CONFIG_MODVERSIONS, you only have to run
'make dep' once, right after the first time you configure
the kernel. The .hdepend files and the .depend file are
independent of your configuration.
If you do enable CONFIG_MODVERSIONS, you must run 'make dep'
every time you change your configuration, because the module
symbol version information depends on the configuration.
[to be continued ...]
This diff is collapsed.
Documentation for the ESS AudioDrive chips
In 2.2 kernels the SoundBlaster driver not only tries to detect an ESS chip, it
tries to detect the type of ESS chip too. The correct detection of the chip
doesn't always succeed however, so the default behaviour is 2.0 behaviour
which means: only detect ES688 and ES1688.
All ESS chips now have a recording level setting. This is a need-to-have for
people who want to use their ESS for recording sound.
Every chip that's detected as a later-than-es1688 chip has a 6 bits logarithmic
master volume control.
Every chip that's detected as a ES1887 now has Full Duplex support. Made a
little testprogram that showes that is works, haven't seen a real program that
needs this however.
For ESS chips an additional parameter "esstype" can be specified. This controls
the (auto) detection of the ESS chips. It can have 3 kinds of values:
-1 Act like 2.0 kernels: only detect ES688 or ES1688.
0 Try to auto-detect the chip (may fail for ES1688)
688 The chip will be treated as ES688
1688 ,, ,, ,, ,, ,, ,, ES1688
1868 ,, ,, ,, ,, ,, ,, ES1868
1869 ,, ,, ,, ,, ,, ,, ES1869
1788 ,, ,, ,, ,, ,, ,, ES1788
1887 ,, ,, ,, ,, ,, ,, ES1887
1888 ,, ,, ,, ,, ,, ,, ES1888
Because Full Duplex is supported for ES1887 you can specify a second DMA
channel by specifying module parameter dma16. It can be one of: 0, 1, 3 or 5.
......@@ -2,8 +2,7 @@ OPL3-SA1 sound driver (opl3sa.o)
---
Note: This howto only describes how to setup the OPL3-SA1 chip; this info
does not apply to the SA2, SA3, or SA4. Contact hannu@opensound.com for
the support details of these other SAx chips.
does not apply to the SA2, SA3, or SA4.
---
The Yamaha OPL3-SA1 sound chip is usually found built into motherboards, and
......
VERSION = 2
PATCHLEVEL = 2
SUBLEVEL = 1
SUBLEVEL = 2
EXTRAVERSION =
ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
......@@ -221,35 +221,27 @@ symlinks:
mkdir include/linux/modules; \
fi
oldconfig: symlinks scripts/split-include
oldconfig: symlinks
$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
if [ -r include/linux/autoconf.h ]; then \
scripts/split-include include/linux/autoconf.h include/config; \
fi
xconfig: symlinks scripts/split-include
xconfig: symlinks
$(MAKE) -C scripts kconfig.tk
wish -f scripts/kconfig.tk
if [ -r include/linux/autoconf.h ]; then \
scripts/split-include include/linux/autoconf.h include/config; \
fi
menuconfig: include/linux/version.h symlinks scripts/split-include
menuconfig: include/linux/version.h symlinks
$(MAKE) -C scripts/lxdialog all
$(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in
if [ -r include/linux/autoconf.h ]; then \
scripts/split-include include/linux/autoconf.h include/config; \
fi
config: symlinks scripts/split-include
config: symlinks
$(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
if [ -r include/linux/autoconf.h ]; then \
scripts/split-include include/linux/autoconf.h include/config; \
fi
include/config/MARKER: scripts/split-include include/linux/autoconf.h
scripts/split-include include/linux/autoconf.h include/config
@ touch include/config/MARKER
linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
$(patsubst %, _dir_%, $(SUBDIRS)) : dummy
$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/config/MARKER
$(MAKE) -C $(patsubst _dir_%, %, $@)
$(TOPDIR)/include/linux/version.h: include/linux/version.h
......@@ -286,10 +278,10 @@ include/linux/version.h: ./Makefile
@echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
@mv -f .ver $@
init/version.o: init/version.c include/linux/compile.h
init/version.o: init/version.c include/linux/compile.h include/config/MARKER
$(CC) $(CFLAGS) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c
init/main.o: init/main.c
init/main.o: init/main.c include/config/MARKER
$(CC) $(CFLAGS) $(PROFILING) -c -o $*.o $<
fs lib mm ipc kernel drivers net: dummy
......
......@@ -243,7 +243,7 @@ fi
endmenu
mainmenu_option next_comment
comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
comment 'Old CD-ROM drivers (not SCSI, not IDE)'
bool 'Support non-SCSI/IDE/ATAPI drives' CONFIG_CD_NO_IDESCSI
if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
......
......@@ -186,6 +186,18 @@ entIF:
jsr $31,do_entIF
.end entIF
.align 3
.globl entDbg
.ent entDbg
entDbg:
SAVE_ALL
lda $8,0x3fff
bic $30,$8,$8
lda $26,ret_from_sys_call
jsr $31,do_entDbg
.end entDbg
/*
* Fork() is one of the special system calls: it needs to
* save the callee-saved regs so that the regs can be found
......
......@@ -187,6 +187,7 @@ extern void entInt(void);
extern void entMM(void);
extern void entSys(void);
extern void entUna(void);
extern void entDbg(void);
/* process.c */
extern void generic_kill_arch (int mode, char *reboot_cmd);
......
......@@ -121,9 +121,9 @@ long alpha_fp_emul (unsigned long pc);
#endif
asmlinkage void
do_entArith(unsigned long summary, unsigned long write_mask, unsigned long a2,
unsigned long a3, unsigned long a4, unsigned long a5,
struct pt_regs regs)
do_entArith(unsigned long summary, unsigned long write_mask,
unsigned long a2, unsigned long a3, unsigned long a4,
unsigned long a5, struct pt_regs regs)
{
if ((summary & 1)) {
/*
......@@ -145,9 +145,10 @@ do_entArith(unsigned long summary, unsigned long write_mask, unsigned long a2,
unlock_kernel();
}
asmlinkage void do_entIF(unsigned long type, unsigned long a1,
unsigned long a2, unsigned long a3, unsigned long a4,
unsigned long a5, struct pt_regs regs)
asmlinkage void
do_entIF(unsigned long type, unsigned long a1,
unsigned long a2, unsigned long a3, unsigned long a4,
unsigned long a5, struct pt_regs regs)
{
lock_kernel();
die_if_kernel("Instruction fault", &regs, type, 0);
......@@ -230,6 +231,25 @@ asmlinkage void do_entIF(unsigned long type, unsigned long a1,
unlock_kernel();
}
/* There is an ifdef in the PALcode in MILO that enables a
"kernel debugging entry point" as an unprivilaged call_pal.
We don't want to have anything to do with it, but unfortunately
several versions of MILO included in distributions have it enabled,
and if we don't put something on the entry point we'll oops. */
asmlinkage void
do_entDbg(unsigned long type, unsigned long a1,
unsigned long a2, unsigned long a3, unsigned long a4,
unsigned long a5, struct pt_regs regs)
{
lock_kernel();
die_if_kernel("Instruction fault", &regs, type, 0);
force_sig(SIGILL, current);
unlock_kernel();
}
/*
* entUna has a different register layout to be reasonably simple. It
* needs access to all the integer registers (the kernel doesn't use
......@@ -895,4 +915,5 @@ trap_init(void)
wrent(entIF, 3);
wrent(entUna, 4);
wrent(entSys, 5);
wrent(entDbg, 6);
}
......@@ -158,7 +158,7 @@ fi
endmenu
mainmenu_option next_comment
comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
comment 'Old CD-ROM drivers (not SCSI, not IDE)'
bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
......
......@@ -637,7 +637,13 @@ void __init setup_ExtINT_pin(unsigned int pin)
entry.delivery_mode = dest_ExtINT;
entry.dest_mode = 1; /* logical delivery */
entry.mask = 0; /* unmask IRQ now */
entry.dest.logical.logical_dest = 0x01; /* logical CPU #0 */
/*
* Careful with this one. We do not use 'true' logical
* delivery, as we set local APICs to LDR == 0. But
* 0xff logical destination is special (broadcast).
* Any other combination will cause problems.
*/
entry.dest.logical.logical_dest = 0xff;
entry.vector = 0; /* it's ignored */
......
......@@ -146,6 +146,17 @@ int skip_ioapic_setup = 0; /* 1 if "noapic" boot option passed */
*/
#define APIC_DEFAULT_PHYS_BASE 0xfee00000
/*
* Reads and clears the Pentium Timestamp-Counter
*/
#define READ_TSC(x) __asm__ __volatile__ ( "rdtsc" \
:"=a" (((unsigned long*)&(x))[0]), \
"=d" (((unsigned long*)&(x))[1]))
#define CLEAR_TSC \
__asm__ __volatile__ ("\t.byte 0x0f, 0x30;\n"::\
"a"(0x00001000), "d"(0x00001000), "c"(0x10):"memory")
/*
* Setup routine for controlling SMP activation
*
......@@ -710,24 +721,19 @@ void __init enable_local_APIC(void)
value |= 0xff; /* Set spurious IRQ vector to 0xff */
apic_write(APIC_SPIV,value);
value = apic_read(APIC_TASKPRI);
value &= ~APIC_TPRI_MASK; /* Set Task Priority to 'accept all' */
apic_write(APIC_TASKPRI,value);
/*
* Set arbitrarion priority to 0
* Set Task Priority to 'accept all'
*/
value = apic_read(APIC_ARBPRI);
value &= ~APIC_ARBPRI_MASK;
apic_write(APIC_ARBPRI, value);
value = apic_read(APIC_TASKPRI);
value &= ~APIC_TPRI_MASK;
apic_write(APIC_TASKPRI,value);
/*
* Set the logical destination ID to 'all', just to be safe.
* Clear the logical destination ID, just to be safe.
* also, put the APIC into flat delivery mode.
*/
value = apic_read(APIC_LDR);
value &= ~APIC_LDR_MASK;
value |= SET_APIC_LOGICAL_ID(0xff);
apic_write(APIC_LDR,value);
value = apic_read(APIC_DFR);
......@@ -735,8 +741,6 @@ void __init enable_local_APIC(void)
apic_write(APIC_DFR, value);
udelay(100); /* B safe */
ack_APIC_irq();
udelay(100);
}
unsigned long __init init_smp_mappings(unsigned long memory_start)
......@@ -1815,10 +1819,6 @@ asmlinkage void smp_spurious_interrupt(void)
* closely follows bus clocks.
*/
#define RDTSC(x) __asm__ __volatile__ ( "rdtsc" \
:"=a" (((unsigned long*)&x)[0]), \
"=d" (((unsigned long*)&x)[1]))
/*
* The timer chip is already set up at HZ interrupts per second here,
* but we do not accept timer interrupts yet. We only allow the BP
......@@ -1937,7 +1937,7 @@ int __init calibrate_APIC_clock(void)
/*
* We wrapped around just now. Let's start:
*/
RDTSC(t1);
READ_TSC(t1);
tt1=apic_read(APIC_TMCCT);
#define LOOPS (HZ/10)
......@@ -1948,7 +1948,7 @@ int __init calibrate_APIC_clock(void)
wait_8254_wraparound ();
tt2=apic_read(APIC_TMCCT);
RDTSC(t2);
READ_TSC(t2);
/*
* The APIC bus clock counter is 32 bits only, it
......
......@@ -346,13 +346,13 @@ endmenu
source fs/Config.in
if [ "$CONFIG_VME" = "n" ]; then
mainmenu_option next_comment
comment 'Console drivers'
if [ "$CONFIG_HP300" = "y" ]; then
bool 'Frame buffer support' CONFIG_FB
else
define_bool CONFIG_FB y
fi
mainmenu_option next_comment
comment 'Console drivers'
source drivers/video/Config.in
endmenu
fi
......
......@@ -179,7 +179,7 @@ if [ "$CONFIG_SGI" != "y" ]; then
endmenu
mainmenu_option next_comment
comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
comment 'Old CD-ROM drivers (not SCSI, not IDE)'
bool 'Support non-SCSI/IDE/ATAPI drives' CONFIG_CD_NO_IDESCSI
if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
......
......@@ -152,7 +152,7 @@ fi
endmenu
mainmenu_option next_comment
comment 'CD-ROM drivers (not for SCSI or IDE/ATAPI drives)'
comment 'Old CD-ROM drivers (not SCSI, not IDE)'
bool 'Support non-SCSI/IDE/ATAPI CDROM drives' CONFIG_CD_NO_IDESCSI
if [ "$CONFIG_CD_NO_IDESCSI" != "n" ]; then
......
......@@ -130,6 +130,14 @@ static inline int is_extended_partition(struct partition *p)
SYS_IND(p) == LINUX_EXTENDED_PARTITION);
}
static int sector_partition_scale(kdev_t dev)
{
if (hardsect_size[MAJOR(dev)] != NULL)
return (hardsect_size[MAJOR(dev)][MINOR(dev)]/512);
else
return (1);
}
static unsigned int get_ptable_blocksize(kdev_t dev)
{
int ret = 1024;
......@@ -149,6 +157,7 @@ static unsigned int get_ptable_blocksize(kdev_t dev)
* the natural blocksize for the device so that we don't have to try
* and read partial sectors. Anything smaller should be just fine.
*/
switch( blksize_size[MAJOR(dev)][MINOR(dev)] )
{
case 2048:
......@@ -196,6 +205,7 @@ static void extended_partition(struct gendisk *hd, kdev_t dev)
struct partition *p;
unsigned long first_sector, first_size, this_sector, this_size;
int mask = (1 << hd->minor_shift) - 1;
int sector_size = sector_partition_scale(dev);
int i;
first_sector = hd->part[MINOR(dev)].start_sect;
......@@ -233,22 +243,22 @@ static void extended_partition(struct gendisk *hd, kdev_t dev)
* First process the data partition(s)
*/
for (i=0; i<4; i++, p++) {
if (!NR_SECTS(p) || is_extended_partition(p))
continue;
/* Check the 3rd and 4th entries -
these sometimes contain random garbage */
if (i >= 2
&& START_SECT(p) + NR_SECTS(p) > this_size
&& (this_sector + START_SECT(p) < first_sector ||
this_sector + START_SECT(p) + NR_SECTS(p) >
first_sector + first_size))
continue;
add_partition(hd, current_minor, this_sector+START_SECT(p), NR_SECTS(p));
current_minor++;
if ((current_minor & mask) == 0)
goto done;
if (!NR_SECTS(p) || is_extended_partition(p))
continue;
/* Check the 3rd and 4th entries -
these sometimes contain random garbage */
if (i >= 2
&& START_SECT(p) + NR_SECTS(p) > this_size
&& (this_sector + START_SECT(p) < first_sector ||
this_sector + START_SECT(p) + NR_SECTS(p) >
first_sector + first_size))
continue;
add_partition(hd, current_minor, this_sector+START_SECT(p)*sector_size, NR_SECTS(p)*sector_size);
current_minor++;
if ((current_minor & mask) == 0)
goto done;
}
/*
* Next, process the (first) extended partition, if present.
......@@ -262,20 +272,21 @@ static void extended_partition(struct gendisk *hd, kdev_t dev)
*/
p -= 4;
for (i=0; i<4; i++, p++)
if(NR_SECTS(p) && is_extended_partition(p))
break;
if(NR_SECTS(p) && is_extended_partition(p))
break;
if (i == 4)
goto done; /* nothing left to do */
goto done; /* nothing left to do */
hd->part[current_minor].nr_sects = NR_SECTS(p);
hd->part[current_minor].start_sect = first_sector + START_SECT(p);
this_sector = first_sector + START_SECT(p);
hd->part[current_minor].nr_sects = NR_SECTS(p) * sector_size; /* JSt */
hd->part[current_minor].start_sect = first_sector + START_SECT(p) * sector_size;
this_sector = first_sector + START_SECT(p) * sector_size;
dev = MKDEV(hd->major, current_minor);
brelse(bh);
}
done:
brelse(bh);
}
#ifdef CONFIG_SOLARIS_X86_PARTITION
static void
solaris_x86_partition(struct gendisk *hd, kdev_t dev, long offset) {
......@@ -317,11 +328,13 @@ solaris_x86_partition(struct gendisk *hd, kdev_t dev, long offset) {
#endif
#ifdef CONFIG_BSD_DISKLABEL
static void check_and_add_bsd_partition(struct gendisk *hd, struct bsd_partition *bsd_p)
static void check_and_add_bsd_partition(struct gendisk *hd,
struct bsd_partition *bsd_p, kdev_t dev)
{
struct hd_struct *lin_p;
/* check relative position of partitions. */
for (lin_p = hd->part + 1; lin_p - hd->part < current_minor; lin_p++) {
for (lin_p = hd->part + 1 + MINOR(dev);
lin_p - hd->part - MINOR(dev) < current_minor; lin_p++) {
/* no relationship -> try again */
if (lin_p->start_sect + lin_p->nr_sects <= bsd_p->p_offset
|| lin_p->start_sect >= bsd_p->p_offset + bsd_p->p_size)
......@@ -383,7 +396,7 @@ static void bsd_disklabel_partition(struct gendisk *hd, kdev_t dev,
break;
if (p->p_fstype != BSD_FS_UNUSED)
check_and_add_bsd_partition(hd, p);
check_and_add_bsd_partition(hd, p, dev);
}
brelse(bh);
......@@ -436,6 +449,7 @@ static int msdos_partition(struct gendisk *hd, kdev_t dev, unsigned long first_s
struct partition *p;
unsigned char *data;
int mask = (1 << hd->minor_shift) - 1;
int sector_size = sector_partition_scale(dev);
#ifdef CONFIG_BSD_DISKLABEL
/* no bsd disklabel as a default */
kdev_t bsd_kdev = 0;
......@@ -538,7 +552,7 @@ static int msdos_partition(struct gendisk *hd, kdev_t dev, unsigned long first_s
for (i=1 ; i<=4 ; minor++,i++,p++) {
if (!NR_SECTS(p))
continue;
add_partition(hd, minor, first_sector+START_SECT(p), NR_SECTS(p));
add_partition(hd, minor, first_sector+START_SECT(p)*sector_size, NR_SECTS(p)*sector_size);
if (is_extended_partition(p)) {
printk(" <");
/*
......@@ -790,7 +804,7 @@ static int sgi_partition(struct gendisk *hd, kdev_t dev, unsigned long first_sec
struct sgi_partition *p;
#define SGI_LABEL_MAGIC 0x0be5a941
if(!(bh = bread(dev, 0, 1024))) {
if(!(bh = bread(dev, 0, get_ptable_blocksize(dev)))) {
printk("Dev %s: unable to read partition table\n", kdevname(dev));
return -1;
}
......@@ -854,11 +868,18 @@ amiga_partition(struct gendisk *hd, kdev_t dev, unsigned long first_sector)
int blk;
int part, res;
/*
* Don't bother touching M/O 2K media.
*/
if (get_ptable_blocksize(dev) != 1024)
return 0;
set_blocksize(dev,512);
res = 0;
for (blk = 0; blk < RDB_ALLOCATION_LIMIT; blk++) {
if(!(bh = bread(dev,blk,512))) {
if(!(bh = bread(dev,blk,get_ptable_blocksize(dev)))) {
printk("Dev %s: unable to read RDB block %d\n",
kdevname(dev),blk);
goto rdb_done;
......@@ -875,7 +896,7 @@ amiga_partition(struct gendisk *hd, kdev_t dev, unsigned long first_sector)
blk = htonl(rdb->rdb_PartitionList);
brelse(bh);
for (part = 1; blk > 0 && part <= 16; part++) {
if (!(bh = bread(dev,blk,512))) {
if (!(bh = bread(dev,blk, get_ptable_blocksize(dev)))) {
printk("Dev %s: unable to read partition block %d\n",
kdevname(dev),blk);
goto rdb_done;
......@@ -908,6 +929,10 @@ amiga_partition(struct gendisk *hd, kdev_t dev, unsigned long first_sector)
}
rdb_done:
/*
* FIXME: should restore the original size. Then we could clean
* up the M/O skip. Amiga people ?
*/
set_blocksize(dev,BLOCK_SIZE);
return res;
}
......@@ -1089,7 +1114,7 @@ static int atari_partition (struct gendisk *hd, kdev_t dev,
partsect = extensect = pi->st;
while (1)
{
xbh = bread (dev, partsect / 2, 1024);
xbh = bread (dev, partsect / 2, get_ptable_blocksize(dev));
if (!xbh)
{
printk (" block %ld read failed\n", partsect);
......
......@@ -101,20 +101,6 @@ static int lba_capacity_is_ok (struct hd_driveid *id)
id->cyls = lba_sects / (16 * 63); /* correct cyls */
return 1; /* lba_capacity is our only option */
}
/*
* This is a split test for drives less than 8 Gig only.
* Drives less than 8GB sometimes declare that they have 15 heads.
* This is an accounting trick (0-15) == (1-16), just an initial
* zero point difference.
*/
if ((id->lba_capacity < 16514064) && (lba_sects > chs_sects) &&
((id->heads == 15) || (id->heads == 16)) && (id->sectors == 63)) {
if (id->heads == 15)
id->cyls = lba_sects / (15 * 63); /* correct cyls */
if (id->heads == 16)
id->cyls = lba_sects / (16 * 63); /* correct cyls */
return 1; /* lba_capacity is our only option */
}
/* perform a rough sanity check on lba_sects: within 10% is "okay" */
if ((lba_sects - chs_sects) < _10_percent) {
return 1; /* lba_capacity is good */
......
......@@ -720,17 +720,39 @@ static int hwif_init (ide_hwif_t *hwif)
}
if (register_blkdev (hwif->major, hwif->name, ide_fops)) {
printk("%s: UNABLE TO GET MAJOR NUMBER %d\n", hwif->name, hwif->major);
} else if (init_irq (hwif)) {
printk("%s: UNABLE TO GET IRQ %d\n", hwif->name, hwif->irq);
(void) unregister_blkdev (hwif->major, hwif->name);
} else {
init_gendisk(hwif);
blk_dev[hwif->major].data = hwif;
blk_dev[hwif->major].request_fn = rfn;
blk_dev[hwif->major].queue = ide_get_queue;
read_ahead[hwif->major] = 8; /* (4kB) */
hwif->present = 1; /* success */
return (hwif->present = 0);
}
if (init_irq (hwif)) {
int i = hwif->irq;
/*
* It failed to initialise. Find the default IRQ for
* this port and try that.
*/
if (!(hwif->irq = ide_default_irq(hwif->io_ports[IDE_DATA_OFFSET])))
{
printk("%s: Disabled unable to get IRQ %d.\n", hwif->name, i);
(void) unregister_blkdev (hwif->major, hwif->name);
return (hwif->present = 0);
}
if(init_irq (hwif))
{
printk("%s: probed IRQ %d and default IRQ %d failed.\n",
hwif->name, i, hwif->irq);
(void) unregister_blkdev (hwif->major, hwif->name);
return (hwif->present = 0);
}
printk("%s: probed IRQ %d failed, using default.\n",
hwif->name, hwif->irq);
}
init_gendisk(hwif);
blk_dev[hwif->major].data = hwif;
blk_dev[hwif->major].request_fn = rfn;
blk_dev[hwif->major].queue = ide_get_queue;
read_ahead[hwif->major] = 8; /* (4kB) */
hwif->present = 1; /* success */
#if (DEBUG_SPINLOCK > 0)
{
static int done = 0;
......
......@@ -2880,9 +2880,6 @@ static void idcard(int i)
} else if (I2CRead(&(btv->i2c), I2C_STBEE)>=0) {
btv->type=BTTV_STB;
} else
if (I2CRead(&(btv->i2c), I2C_VHX)>=0) {
btv->type=BTTV_VHX;
} else {
if (I2CRead(&(btv->i2c), 0x80)>=0) /* check for msp34xx */
btv->type = BTTV_MIROPRO;
......@@ -2907,8 +2904,8 @@ static void idcard(int i)
}
if(btv->type==BTTV_AVERMEDIA98)
{
btv->pll.pll_ifreq=28636363;
btv->pll.pll_crystal=BT848_IFORM_XT0;
btv->pll.pll_ifreq=28636363;
btv->pll.pll_crystal=BT848_IFORM_XT0;
}
if (btv->have_tuner && btv->tuner_type != -1)
......
......@@ -206,7 +206,8 @@ struct bttv
#define BTTV_MIROPRO 0x0b
#define BTTV_ADSTECH_TV 0x0c
#define BTTV_AVERMEDIA98 0x0d
#define BTTV_VHX 0x0e
#define BTTV_VHX 0x0e
#define BTTV_ZOLTRIX 0x0f
#define AUDIO_TUNER 0x00
#define AUDIO_RADIO 0x01
......
......@@ -1075,6 +1075,7 @@ static int epp_open(struct device *dev)
if (!(pp->modes & (PARPORT_MODE_PCECPEPP|PARPORT_MODE_PCEPP))) {
printk(KERN_ERR "%s: parport at 0x%lx does not support any EPP mode\n",
bc_drvname, pp->base);
parport_release(bc->pdev);
parport_unregister_device(bc->pdev);
return -EIO;
}
......
......@@ -1972,6 +1972,7 @@ scsi_error_handler(void * data)
*/
SCSI_LOG_ERROR_RECOVERY(1,printk("Error handler sleeping\n"));
down_interruptible (&sem);
sem.owner = 0;
if (signal_pending(current) )
break;
......
......@@ -12,6 +12,7 @@
*/
/*
* Thomas Sailer : ioctl code reworked (vmalloc/vfree removed)
* Andrew Veliath : fixed running status in MIDI input state machine
*/
#include <linux/config.h>
......@@ -196,13 +197,19 @@ midi_synth_input(int orig_dev, unsigned char data)
inc->m_left = len_tab[(data >> 4) - 8];
inc->m_buf[0] = inc->m_prev_status = data;
}
} else if (inc->m_prev_status & 0x80) /* Ignore if no previous status (yet) */
{ /* Data byte (use running status) */
inc->m_state = MST_DATA;
} else if (inc->m_prev_status & 0x80) {
/* Data byte (use running status) */
inc->m_ptr = 2;
inc->m_left = len_tab[(data >> 4) - 8] - 1;
inc->m_buf[0] = inc->m_prev_status;
inc->m_buf[1] = data;
inc->m_buf[0] = inc->m_prev_status;
inc->m_left = len_tab[(inc->m_buf[0] >> 4) - 8] - 1;
if (inc->m_left > 0)
inc->m_state = MST_DATA; /* Not done yet */
else {
inc->m_state = MST_INIT;
do_midi_msg(dev, inc->m_buf, inc->m_ptr);
inc->m_ptr = 0;
}
}
break; /* MST_INIT */
......
......@@ -48,12 +48,6 @@
#define MDL_ES1868MIDI 14 /* MIDI port of ESS1868 */
#define MDL_AEDSP 15 /* Audio Excel DSP 16 */
#define SUBMDL_ES1788 0x10 /* Subtype ES1788 for specific handling */
#define SUBMDL_ES1868 0x11 /* Subtype ES1868 for specific handling */
#define SUBMDL_ES1869 0x12 /* Subtype ES1869 for specific handling */
#define SUBMDL_ES1878 0x13 /* Subtype ES1878 for specific handling */
#define SUBMDL_ES1887 0x14 /* Subtype ES1887 for specific handling */
#define SUBMDL_ES1888 0x14 /* Subtype ES1888 for specific handling */
#define SUBMDL_ALS007 42 /* ALS-007 differs from SB16 only in mixer */
/* register assignment */
#define SUBMDL_ALS100 43 /* ALS-100 allows sampling rates of up */
......
......@@ -113,7 +113,7 @@ void unload_sb(struct address_info *hw_config)
}
int sb_be_quiet=0;
int esstype = 0; /* ESS chip type */
extern int esstype; /* ESS chip type */
#ifdef MODULE
......@@ -130,13 +130,13 @@ int mpu_io = 0;
int io = -1;
int irq = -1;
int dma = -1;
int dma16 = -1; /* Set this for modules that need it */
int type = 0; /* Can set this to a specific card type */
int mad16 = 0; /* Set mad16=1 to load this as support for mad16 */
int trix = 0; /* Set trix=1 to load this as support for trix */
int pas2 = 0; /* Set pas2=1 to load this as support for pas2 */
int dma16 = -1; /* Set this for modules that need it */
int type = 0; /* Can set this to a specific card type */
int mad16 = 0; /* Set mad16=1 to load this as support for mad16 */
int trix = 0; /* Set trix=1 to load this as support for trix */
int pas2 = 0; /* Set pas2=1 to load this as support for pas2 */
int sm_games = 0; /* Mixer - see sb_mixer.c */
int acer = 0; /* Do acer notebook init */
int acer = 0; /* Do acer notebook init */
MODULE_PARM(io, "i");
MODULE_PARM(irq, "i");
......
#undef FKS_LOGGING
#undef FKS_TEST
/*
* Created: 9-Jan-1999
* tabs should be 4 spaces, in vi(m): set tabstop=4
*
* TODO: consistency speed calculations!!
* cleanup!
* ????: Did I break MIDI support?
*
* History:
*
* Rolf Fokkens (Dec 20 1998): ES188x recording level support on a per
* input basis.
* (Dec 24 1998): Recognition of ES1788, ES1887, ES1888,
* ES1868, ES1869 and ES1878. Could be used for
* specific handling in the future. All except
* ES1887 and ES1888 and ES688 are handled like
* ES1688.
* (Dec 27 1998): RECLEV for all (?) ES1688+ chips. ES188x now
* have the "Dec 20" support + RECLEV
* (Jan 2 1999): Preparation for Full Duplex. This means
* Audio 2 is now used for playback when dma16
* is specified. The next step would be to use
* Audio 1 and Audio 2 at the same time.
* (Jan 9 1999): Put all ESS stuff into sb_ess.[ch], this
* includes both the ESS stuff that has been in
* sb_*[ch] before I touched it and the ESS suppor
* I added later
* (Jan 23 1998): Full Duplex seems to work. I wrote a small
* test proggy which works OK. Haven't found
* any applications to test it though. So why did
* I bother to create it anyway?? :) Just for
* fun.
*
* This files contains ESS chip specifics. It's based on the existing ESS
* handling as it resided in sb_common.c, sb_mixer.c and sb_audio.c. This
* file adds features like:
......@@ -19,27 +48,13 @@
*
* ESS detection isn't full proof (yet). If it fails an additional module
* parameter esstype can be specified to be one of the following:
* 688, 1688, 1868, 1869, 1788, 1887, 1888
*
* History:
*
* Rolf Fokkens (Dec 20 1998): ES188x recording level support on a per
* input basis.
* (Dec 24 1998): Recognition of ES1788, ES1887, ES1888,
* ES1868, ES1869 and ES1878. Could be used for
* specific handling in the future. All except
* ES1887 and ES1888 and ES688 are handled like
* ES1688.
* (Dec 27 1998): RECLEV for all (?) ES1688+ chips. ES188x now
* have the "Dec 20" support + RECLEV
* (jan 2 1999): Preparation for Full Duplex. This means
* Audio 2 is now used for playback when dma16
* is specified. The next step would be to use
* Audio 1 and Audio 2 at the same time.
* -1, 0, 688, 1688, 1868, 1869, 1788, 1887, 1888
* -1 means: mimic 2.0 behaviour,
* 0 means: auto detect.
* others: explicitly specify chip
* -1 is default, cause auto detect still doesn't work.
*/
#undef FKS_LOGGING
/*
* About the documentation
*
......@@ -156,13 +171,26 @@
* ES1946 yes This is a PCI chip; not handled by this driver
*/
#include <linux/config.h>
#include <linux/delay.h>
#include "sound_config.h"
#include "sb_mixer.h"
#include "sb.h"
#include "sb_ess.h"
extern int esstype; /* module parameter in sb_card.c */
#define ESSTYPE_LIKE20 -1 /* Mimic 2.0 behaviour */
#define ESSTYPE_DETECT 0 /* Mimic 2.0 behaviour */
int esstype = ESSTYPE_LIKE20; /* module parameter in sb_card.c */
#define SUBMDL_ES1788 0x10 /* Subtype ES1788 for specific handling */
#define SUBMDL_ES1868 0x11 /* Subtype ES1868 for specific handling */
#define SUBMDL_ES1869 0x12 /* Subtype ES1869 for specific handling */
#define SUBMDL_ES1878 0x13 /* Subtype ES1878 for specific handling */
#define SUBMDL_ES1887 0x14 /* Subtype ES1887 for specific handling */
#define SUBMDL_ES1888 0x15 /* Subtype ES1888 for specific handling */
#ifdef FKS_LOGGING
static void ess_show_mixerregs (sb_devc *devc);
......@@ -370,45 +398,6 @@ printk (KERN_INFO "FKS: ess_speed (%d) b speed = %d, div=%x\n", audionum, devc->
}
}
#if 0
static void ess_speed(sb_devc * devc)
{
int divider;
unsigned char bits = 0;
int speed = devc->speed;
if (speed < 4000)
speed = 4000;
else if (speed > 48000)
speed = 48000;
if (speed > 22000)
{
bits = 0x80;
divider = 256 - (795500 + speed / 2) / speed;
}
else
{
divider = 128 - (397700 + speed / 2) / speed;
}
bits |= (unsigned char) divider;
ess_write (devc, 0xa1, bits);
/*
* Set filter divider register
*/
speed = (speed * 9) / 20; /* Set filter roll-off to 90% of speed/2 */
divider = 256 - 7160000 / (speed * 82);
ess_write (devc, 0xa2, divider);
return;
}
#endif
static int ess_audio_prepare_for_input(int dev, int bsize, int bcount)
{
sb_devc *devc = audio_devs[dev]->devc;
......@@ -931,6 +920,29 @@ static int ess_set_irq_hw (sb_devc * devc)
return ess_common_set_irq_hw (devc);
}
#ifdef FKS_TEST
/*
* FKS_test:
* for ES1887: 00, 18, non wr bits: 0001 1000
* for ES1868: 00, b8, non wr bits: 1011 1000
* for ES1888: 00, f8, non wr bits: 1111 1000
* for ES1688: 00, f8, non wr bits: 1111 1000
* + ES968
*/
static void FKS_test (sb_devc * devc)
{
int val1, val2;
val1 = ess_getmixer (devc, 0x64);
ess_setmixer (devc, 0x64, ~val1);
val2 = ess_getmixer (devc, 0x64) ^ ~val1;
ess_setmixer (devc, 0x64, val1);
val1 ^= ess_getmixer (devc, 0x64);
printk (KERN_INFO "FKS: FKS_test %02x, %02x\n", (val1 & 0x0ff), (val2 & 0x0ff));
};
#endif
static unsigned int ess_identify (sb_devc * devc)
{
unsigned int val;
......@@ -1025,42 +1037,55 @@ int ess_init(sb_devc * devc, struct address_info *hw_config)
if (ess_major == 0x68 && (ess_minor & 0xf0) == 0x80) {
char *chip = NULL;
int submodel = -1;
if (esstype) {
int submodel = -1;
switch (esstype) {
case 688:
submodel = 0x00;
break;
case 1688:
submodel = 0x08;
break;
case 1868:
submodel = SUBMDL_ES1868;
break;
case 1869:
submodel = SUBMDL_ES1869;
break;
case 1788:
submodel = SUBMDL_ES1788;
break;
case 1887:
submodel = SUBMDL_ES1887;
break;
case 1888:
submodel = SUBMDL_ES1888;
break;
};
if (submodel != -1) {
devc->submodel = submodel;
sprintf (modelname, "ES%d", esstype);
chip = modelname;
};
switch (esstype) {
case ESSTYPE_DETECT:
case ESSTYPE_LIKE20:
break;
case 688:
submodel = 0x00;
break;
case 1688:
submodel = 0x08;
break;
case 1868:
submodel = SUBMDL_ES1868;
break;
case 1869:
submodel = SUBMDL_ES1869;
break;
case 1788:
submodel = SUBMDL_ES1788;
break;
case 1887:
submodel = SUBMDL_ES1887;
break;
case 1888:
submodel = SUBMDL_ES1888;
break;
default:
printk (KERN_ERR "Invalid esstype=%d specified\n", esstype);
return 0;
};
if (submodel != -1) {
devc->submodel = submodel;
sprintf (modelname, "ES%d", esstype);
chip = modelname;
};
if (chip == NULL && (ess_minor & 0x0f) < 8) {
chip = "ES688";
};
#ifdef FKS_TEST
FKS_test (devc);
#endif
/*
* If Nothing detected yet, and we want 2.0 behaviour...
* Then let's assume it's ES1688.
*/
if (chip == NULL && esstype == ESSTYPE_LIKE20) {
chip = "ES1688";
};
if (chip == NULL) {
int type;
......@@ -1080,6 +1105,10 @@ int ess_init(sb_devc * devc, struct address_info *hw_config)
chip = "ES1878";
devc->submodel = SUBMDL_ES1878;
break;
default:
if ((type & 0x00ff) != ((type >> 8) & 0x00ff)) {
printk ("ess_init: Unrecognized %04x\n", type);
}
};
};
#if 0
......
......@@ -13,6 +13,7 @@
*/
/*
* Thomas Sailer : ioctl code reworked (vmalloc/vfree removed)
* Andrew Veliath : adapted tmr2ticks from level 1 sequencer (avoid overflow)
*/
#include <linux/config.h>
......@@ -39,11 +40,17 @@ static unsigned long
tmr2ticks(int tmr_value)
{
/*
* Convert system timer ticks (HZ) to MIDI ticks
* (divide # of MIDI ticks/minute by # of system ticks/minute).
* Convert timer ticks to MIDI ticks
*/
return ((tmr_value * curr_tempo * curr_timebase) + (30 * 100)) / (60 * HZ);
unsigned long tmp;
unsigned long scale;
/* tmr_value (ticks per sec) *
1000000 (usecs per sec) / HZ (ticks per sec) -=> usecs */
tmp = tmr_value * (1000000 / HZ);
scale = (60 * 1000000) / (curr_tempo * curr_timebase); /* usecs per MIDI tick */
return (tmp + scale / 2) / scale;
}
static void
......
......@@ -515,7 +515,7 @@ struct svc_procedure nfsd_procedures2[18] = {
PROC(symlink, symlinkargs, void, none, RC_REPLSTAT),
PROC(mkdir, createargs, diropres, fhandle, RC_REPLBUFF),
PROC(rmdir, diropargs, void, none, RC_REPLSTAT),
PROC(readdir, readdirargs, readdirres, none, RC_REPLSTAT),
PROC(readdir, readdirargs, readdirres, none, RC_REPLBUFF),
PROC(statfs, fhandle, statfsres, none, RC_NOCACHE),
};
......
......@@ -37,6 +37,7 @@
#include <linux/file.h>
#include <linux/console.h>
#include <linux/poll.h>
#include <linux/mm.h>
#if defined(CONFIG_PROC_FS)
#include <linux/proc_fs.h>
......@@ -105,6 +106,7 @@ EXPORT_SYMBOL(max_mapnr);
EXPORT_SYMBOL(high_memory);
EXPORT_SYMBOL(update_vm_cache);
EXPORT_SYMBOL(vmtruncate);
EXPORT_SYMBOL(find_vma);
/* filesystem internal functions */
EXPORT_SYMBOL(in_group_p);
......
......@@ -382,6 +382,9 @@ EXPORT_SYMBOL(rtnl_unlock);
EXPORT_SYMBOL(ipv4_config);
EXPORT_SYMBOL(dev_open);
/* Used by other modules */
EXPORT_SYMBOL(in_ntoa);
EXPORT_SYMBOL(ip_rcv);
EXPORT_SYMBOL(arp_rcv);
EXPORT_SYMBOL(arp_tbl);
......
#! /bin/sh
#
# This script is used to configure the Linux kernel.
......@@ -8,18 +7,8 @@
# something better'' because the old configure script wasn't flexible
# enough.
#
# Please send comments / questions / bug fixes to raymondc@microsoft.com.
#
# ***** IMPORTANT COMPATIBILITY NOTE ****
# If configuration changes are made which might adversely effect
# Menuconfig or xconfig, please notify the respective maintainers so that
# those utilities can be updated in parallel.
#
# Menuconfig: <mec@shout.net>
# xconfig: <apenwarr@foxnet.net> <eric@aib.com>
# ****************************************
#
# Each line in the config file is a command.
# Raymond Chen was the original author of Configure.
# Michael Elizabeth Chastain (mec@shout.net) is the current maintainer.
#
# 050793 - use IFS='@' to get around a bug in a pre-version of bash-1.13
# with an empty IFS.
......@@ -56,6 +45,9 @@
#
# 102598 Michael Chastain (mec@shout.net) - put temporary files in
# current directory, not in /tmp.
#
# 24 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
# - Improve the exit message (Jeff Ronne).
#
# Make sure we're really running bash.
......@@ -528,10 +520,13 @@ mv .tmpconfig .config
mv .tmpconfig.h include/linux/autoconf.h
echo
echo "The Linux kernel should now be configured for your setup."
echo "Check the top-level Makefile for additional configuration,"
echo "and do a 'make dep ; make clean' if you want to be sure all"
echo "the files are correctly re-made"
echo "*** End of Linux kernel configuration."
echo "*** Check the top-level Makefile for additional configuration."
if [ ! -f .hdepend -o "$CONFIG_MODVERSIONS" = "y" ] ; then
echo "*** Next, you must run 'make dep'."
else
echo "*** Next, you may run 'make zImage', 'make zdisk', or 'make zlilo'."
fi
echo
exit 0
......@@ -65,6 +65,9 @@
# 02 January 1999, Michael Elizabeth Chastain (mec@shout.net)
# Blow away lxdialog.scrltmp on entry to activate_menu. This protects
# against people who use commands like ' ' to select menus.
#
# 24 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
# - Improve the exit message (Jeff Ronne).
#
......@@ -1290,9 +1293,19 @@ if $DIALOG --backtitle "$backtitle" \
then
save_configuration
echo
echo The linux kernel is now configured for your setup.
echo
echo "*** End of Linux kernel configuration."
echo "*** Check the top-level Makefile for additional configuration."
if [ ! -f .hdepend -o "$CONFIG_MODVERSIONS" = "y" ] ; then
echo "*** Next, you must run 'make dep'."
else
echo "*** Next, you may run 'make zImage', 'make zdisk', or 'make zlilo.'"
fi
echo
else
echo
echo
echo Your kernel configuration changes were NOT saved.
echo
fi
exit 0
......@@ -4,12 +4,17 @@
# CHANGES
# =======
#
# 8 January 1998, Michael Elizabeth Chastain, <mec@shout.net>
# Remove unused do_cmd function (part of the 2.0 sound support).
# Arrange buttons in three columns for better screen fitting.
# Add CONSTANT_Y, CONSTANT_M, CONSTANT_N for commands like:
# dep_tristate 'foo' CONFIG_FOO m
# 8 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
# - Remove unused do_cmd function (part of the 2.0 sound support).
# - Arrange buttons in three columns for better screen fitting.
# - Add CONSTANT_Y, CONSTANT_M, CONSTANT_N for commands like:
# dep_tristate 'foo' CONFIG_FOO m
#
# 23 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
# - Shut vfix the hell up.
#
# 24 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
# - Improve the exit message (Jeff Ronne).
#
# This is a handy replacement for ".widget cget" that requires neither tk4
......@@ -27,7 +32,6 @@ proc cget { w option } {
proc vfix { var } {
global $var
if [ catch {eval concat $$var} ] {
puts stdout "WARNING - broken Config.in! $var was not declared!"
set $var 0
}
}
......@@ -428,8 +432,15 @@ ${var}:\\
proc wrapup {w } {
catch {destroy $w}
toplevel $w -class Dialog
message $w.m -width 400 -aspect 300 -text \
"The Linux kernel should now be configured for your setup. Check the top-level Makefile for additional configuration, and do a 'make dep ; make clean' if you want to be sure all the files are correctly re-made." -relief raised
global CONFIG_MODVERSIONS; vfix CONFIG_MODVERSIONS
if { ([file exists .hdepend] != 1) || ($CONFIG_MODVERSIONS == 1) } then {
message $w.m -width 400 -aspect 300 -relief raised -text \
"End of Linux kernel configuration. Check the top-level Makefile for additional configuration. Next, you must run 'make dep'."
} else {
message $w.m -width 400 -aspect 300 -relief raised -text \
"End of Linux kernel configuration. Check the top-level Makefile for additional configuration. Next, you may 'make bzImage', 'make bzdisk', or 'make bzlilo.'"
}
label $w.bm -bitmap info
pack $w.bm $w.m -pady 10 -side top -padx 10
wm title $w "Kernel build instructions"
......
......@@ -157,6 +157,14 @@ dialog_checklist (const char *title, const char *prompt, int height, int width,
wattrset (dialog, dialog_attr);
waddch (dialog, ACS_RTEE);
if (title != NULL && strlen(title) >= width-2 ) {
/* truncate long title -- mec */
char * title2 = malloc(width-2+1);
memcpy( title2, title, width-2 );
title2[width-2] = '\0';
title = title2;
}
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
......
......@@ -69,6 +69,14 @@ dialog_inputbox (const char *title, const char *prompt, int height, int width,
wattrset (dialog, dialog_attr);
waddch (dialog, ACS_RTEE);
if (title != NULL && strlen(title) >= width-2 ) {
/* truncate long title -- mec */
char * title2 = malloc(width-2+1);
memcpy( title2, title, width-2 );
title2[width-2] = '\0';
title = title2;
}
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
......
......@@ -189,6 +189,14 @@ dialog_menu (const char *title, const char *prompt, int height, int width,
wbkgdset (dialog, dialog_attr & A_COLOR);
waddch (dialog, ACS_RTEE);
if (title != NULL && strlen(title) >= width-2 ) {
/* truncate long title -- mec */
char * title2 = malloc(width-2+1);
memcpy( title2, title, width-2 );
title2[width-2] = '\0';
title = title2;
}
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
......
......@@ -43,6 +43,14 @@ dialog_msgbox (const char *title, const char *prompt, int height, int width,
draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr);
if (title != NULL && strlen(title) >= width-2 ) {
/* truncate long title -- mec */
char * title2 = malloc(width-2+1);
memcpy( title2, title, width-2 );
title2[width-2] = '\0';
title = title2;
}
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
......
......@@ -106,6 +106,14 @@ dialog_textbox (const char *title, const char *file, int height, int width)
wbkgdset (dialog, dialog_attr & A_COLOR);
waddch (dialog, ACS_RTEE);
if (title != NULL && strlen(title) >= width-2 ) {
/* truncate long title -- mec */
char * title2 = malloc(width-2+1);
memcpy( title2, title, width-2 );
title2[width-2] = '\0';
title = title2;
}
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
......
......@@ -63,6 +63,14 @@ dialog_yesno (const char *title, const char *prompt, int height, int width)
wattrset (dialog, dialog_attr);
waddch (dialog, ACS_RTEE);
if (title != NULL && strlen(title) >= width-2 ) {
/* truncate long title -- mec */
char * title2 = malloc(width-2+1);
memcpy( title2, title, width-2 );
title2[width-2] = '\0';
title = title2;
}
if (title != NULL) {
wattrset (dialog, title_attr);
mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
......
......@@ -89,6 +89,9 @@
* drives/net/Config.in and other places.
* - Fix menu line wraparound at 128 menus (some fool used a 'char' for
* a counter).
*
* 23 January 1999, Michael Elizabeth Chastain <mec@shout.net>
* - Remove bug-compatible code.
*/
#include <stdio.h>
......@@ -749,11 +752,9 @@ void dump_tk_script( struct kconfig * scfg )
break;
case token_endmenu:
#if ! defined(BUG_COMPATIBLE)
/* flatten menus with proper scoping */
if ( --menu_depth < 0 )
{ fprintf( stderr, "unmatched endmenu\n" ); exit( 1 ); }
#endif
break;
case token_bool:
......
......@@ -26,6 +26,9 @@
* every architecture and comparing it character-for-character against
* the output of the old tkparse.
*
* 23 January 1999, Michael Elizabeth Chastain, <mec@shout.net>
* - Remove bug-compatible code.
*
* TO DO:
* - xconfig is at the end of its life cycle. Contact <mec@shout.net> if
* you are interested in working on the replacement.
......@@ -434,25 +437,14 @@ static void tokenize_line( const char * pnt )
case token_define_bool:
pnt = get_string( pnt, &cfg->optionname );
#if ! defined(BUG_COMPATIBLE)
while ( *pnt == ' ' || *pnt == '\t' )
pnt++;
#endif
if ( *pnt == 'n' || *pnt == 'N' ) cfg->value = "0";
else if ( *pnt == 'y' || *pnt == 'Y' ) cfg->value = "1";
else if ( *pnt == 'm' || *pnt == 'M' ) cfg->value = "2";
else
{
#if ! defined(BUG_COMPATIBLE)
syntax_error( "unknown define_bool value" );
#else
/*
* This ought to give the same output as printf'ing
* through the null pointer ... I don't want to be
* SIGSEGV compatible!
*/
cfg->value = "(null)";
#endif
}
break;
......@@ -558,12 +550,7 @@ static void do_source( const char * filename )
if ( infile == NULL )
{
sprintf( buffer, "unable to open %s", filename );
#if defined(BUG_COMPATIBLE)
fprintf( stderr, "%s\n", buffer );
return;
#else
syntax_error( buffer );
#endif
}
/* push the new file name and line number */
......
......@@ -2,14 +2,6 @@
* tkparse.h
*/
/*
* Define this symbol to generate exactly the same output, byte for byte,
* as the previous version of xconfig. I need to do this to make sure I
* I don't break anything in my moby edit. -- mec
*/
#define BUG_COMPATIBLE
/*
* Token types (mostly statement types).
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment