diff -u --recursive --new-file v1.1.62/linux/CREDITS linux/CREDITS --- v1.1.62/linux/CREDITS Wed Nov 9 14:56:33 1994 +++ linux/CREDITS Mon Nov 14 08:43:31 1994 @@ -11,6 +11,16 @@ E: almesber@bernina.ethz.ch D: dosfs, LILO, some fd features, various other hacks here and there +N: Derek Atkins +E: warlord@MIT.EDU +D: Linux-AFS Port, random kernel hacker, +D: VFS fixes (new notify_change in particular) +D: Moving all VFS access checks into the file systems +S: MIT Room E15-341 +S: 20 Ames St. +S: Cambridge, Massachusetts 02139 +S: USA + N: John Aycock E: aycock@cpsc.ucalgary.ca D: Adaptec 274x driver @@ -148,6 +158,12 @@ E: davison@borland.com D: Second extended file system co-designer +N: Terry Dawson +E: terryd@extro.ucc.su.oz.au +E: vk2ktj@gw.vk2ktj.ampr.org (Amateur Radio use only) +D: NET-2-HOWTO author. +D: RADIOLINUX Amateur Radio software for Linux list collator. + N: Todd J. Derr E: tjd@cs.pitt.edu D: maintainer of dual-monitor patches for 1.0+ @@ -296,13 +312,14 @@ S: USA N: Nick Holloway -E: alfie@dcs.warwick.ac.uk +E: Nick.Holloway@alfie.demon.co.uk +E: Nick.Holloway@parallax.co.uk D: Small patches for kernel, libc -D: Makedev -S: Department of Computer Science -S: University of Warwick +D: MAKEDEV +S: 15 Duke Street +S: Chapelfields S: Coventry -S: CV4 7AL +S: CV5 8BZ S: United Kingdom N: Ron Holt @@ -391,6 +408,13 @@ S: 38100 Grenoble S: France +N: Harald Koenig +E: koenig@tat.physik.uni-tuebingen.de +D: XFree86 (S3), DCF77, some kernel hacks and fixes +S: Koenigsberger Str. 90 +S: D-72336 Balingen +S: Germany + N: Rudolf Koenig E: rfkoenig@immd4.informatik.uni-erlangen.de D: The Linux Support Team Erlangen @@ -409,6 +433,13 @@ S: Doncaster VIC 3108 S: Australia +N: Hans Lermen +E: lermen@elserv.ffm.fgan.de +D: Author of the LOADLIN Linux loader +S: Am Muehlenweg 38 +S: D53424 Remagen +S: Germany + N: Mark Lord E: mlord@bnr.ca E: mlord@achilles.net @@ -819,7 +850,6 @@ N: Eric Youngdale E: eric@aib.com -E: ericy@cais.com D: General kernel hacker D: SCSI iso9660 and ELF S: 17 Canterbury Square #101 diff -u --recursive --new-file v1.1.62/linux/Makefile linux/Makefile --- v1.1.62/linux/Makefile Wed Nov 9 14:56:33 1994 +++ linux/Makefile Wed Nov 9 16:14:02 1994 @@ -1,6 +1,6 @@ VERSION = 1 PATCHLEVEL = 1 -SUBLEVEL = 62 +SUBLEVEL = 63 ARCH = i386 @@ -132,7 +132,11 @@ tools/version.h: $(CONFIGURE) Makefile @./makever.sh @echo \#define UTS_RELEASE \"$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)\" > tools/version.h - @echo \#define UTS_VERSION \"\#`cat .version` `date`\" >> tools/version.h + @if [ -f .name ]; then \ + echo \#define UTS_VERSION \"\#`cat .version`-`cat .name` `date`\"; \ + else \ + echo \#define UTS_VERSION \"\#`cat .version` `date`\"; \ + fi >> tools/version.h @echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> tools/version.h @echo \#define LINUX_COMPILE_BY \"`whoami`\" >> tools/version.h @echo \#define LINUX_COMPILE_HOST \"`hostname`\" >> tools/version.h diff -u --recursive --new-file v1.1.62/linux/arch/i386/Makefile linux/arch/i386/Makefile --- v1.1.62/linux/arch/i386/Makefile Wed Aug 17 09:38:43 1994 +++ linux/arch/i386/Makefile Wed Nov 9 14:33:43 1994 @@ -12,7 +12,7 @@ LD86 =ld86 -0 AS =as LD =ld -HOSTCC =gcc +HOSTCC =gcc -I$(TOPDIR)/include CC =gcc -D__KERNEL__ -I$(TOPDIR)/include MAKE =make CPP =$(CC) -E diff -u --recursive --new-file v1.1.62/linux/drivers/block/README.sbpcd linux/drivers/block/README.sbpcd --- v1.1.62/linux/drivers/block/README.sbpcd Thu Nov 3 17:53:27 1994 +++ linux/drivers/block/README.sbpcd Tue Nov 8 08:16:59 1994 @@ -1,4 +1,4 @@ -This README belongs to release 2.7 or newer of the SoundBlaster Pro +This README belongs to release 2.8 or newer of the SoundBlaster Pro (Matsushita, Kotobuki, Panasonic, CreativeLabs) CD-ROM driver for Linux. The driver is able to drive the whole family of "traditional" IDE-style (that @@ -6,6 +6,9 @@ Kotobuki, Panasonic drives, sometimes labelled as "CreativeLabs". The well-known drives are CR-521, CR-522, CR-523, CR-562, CR-563. +The Longshine LCS-7260 is a double-speed drive which uses the "old" +Matsushita command set. It should be fully supported soon, too. + There exists an "IBM External ISA CD-ROM Drive" which in fact is a CR-562 with a special controller board. This drive is supported (the interface is of the "LaserMate" type), and it is possibly the best buy today (cheaper than @@ -20,21 +23,22 @@ It will work with the soundcard interfaces (SB Pro, SB 16, Galaxy, SoundFX, ...) and/or with the "no-sound" cards (Panasonic CI-101P, LaserMate, -WDH-7001C, older Aztech cards, ...). +WDH-7001C, Longshine LCS-6853, older Aztech cards, ...). It should work too now with the "configurable" interface "Sequoia S-1000", which is found on the Spea Media FX sound card. I still need feedback about this. The interface type has to get configured in /usr/include/linux/sbpcd.h, -because the behavior is different. +because the behavior of some sound card interfaces is different. The driver respects different drive firmware releases - my old drive is a 2.11, but it should work with "old" drives <2.01 ... >3.00 and with "new" drives (which count the releases around 0.75 or 1.00). Up to 4 drives per interface card, and up to 4 interface cards are supported. -CR-52x ("old") and CR-56x ("new") drives can be mixed, but the CR-521 ones are -hard-wired to drive ID 0. The drives have to use different drive IDs, and each -drive has to get a unique minor number (0...3), corresponding to it's drive ID. +CR-52x ("old"), CR-56x ("new") and LCS drives can be mixed, but the CR-521 +ones are hard-wired to drive ID 0. The drives have to use different drive IDs, +and each drive has to get a unique minor number (0...3), corresponding to it's +drive ID. The drive IDs may be selected freely from 0 to 3 - they do not have to be in consecutive order. diff -u --recursive --new-file v1.1.62/linux/drivers/block/sbpcd.c linux/drivers/block/sbpcd.c --- v1.1.62/linux/drivers/block/sbpcd.c Thu Nov 3 17:53:28 1994 +++ linux/drivers/block/sbpcd.c Tue Nov 8 08:17:00 1994 @@ -4,8 +4,10 @@ * SoundBlaster ("Pro" or "16 ASP" or compatible) cards * and for "no-sound" interfaces like Lasermate and the * Panasonic CI-101P. + * Also for the Longshine LCS-7260 drive. + * Also for the IBM "External ISA CD-Rom" drive. * - * NOTE: This is release 2.7. + * NOTE: This is release 2.8. * It works with my SbPro & drive CR-521 V2.11 from 2/92 * and with the new CR-562-B V0.75 on a "naked" Panasonic * CI-101P interface. And vice versa. @@ -132,6 +134,19 @@ * 0 disables, 1 enables auto-ejecting. Useful to keep the tray in * during shutdown. * + * 2.8 Added first support (still BETA, I need feedback or a drive) for + * the Longshine LCS-7260 drives. They appear as double-speed drives + * using the "old" command scheme, extended by tray control and door + * lock functions. + * Found (and fixed preliminary) a flaw with some multisession CDs: we + * have to re-direct not only the accesses to frame 16 (the isofs + * routines drive it up to max. 100), but also those to the continuation + * (repetition) frames (as far as they exist - currently set fix as + * 16..20). + * Changed default of the "JUKEBOX" define. If you use this default, + * your tray will eject if you try to mount without a disk in. Next + * mount command will insert the tray - so, just insert a disk. ;-) + * * TODO * * disk change detection @@ -207,7 +222,7 @@ #include "blk.h" -#define VERSION "2.7 Eberhard Moenkeberg " +#define VERSION "2.8 Eberhard Moenkeberg " #define SBPCD_DEBUG @@ -223,7 +238,7 @@ /* * still testing around... */ -#define JUKEBOX 0 /* tray control: eject tray if no disk is in */ +#define JUKEBOX 1 /* tray control: eject tray if no disk is in */ #define EJECT 1 /* tray control: eject tray after last use */ #define LONG_TIMING 0 /* test against timeouts with "gold" CDs on CR-521 */ #define MANY_SESSION 0 /* this will conflict with "true" multi-session! */ @@ -441,8 +456,9 @@ /*==========================================================================*/ -static u_char drive_family[]="CR-5"; -static u_char drive_vendor[]="MATSHITA"; +static u_char drive_family[]="CR-5"; /* Panasonic CR-56x */ +static u_char lcs_family[]="LCS-"; /* Longshine LCS-7260 */ +static u_char drive_vendor[]="MATSHITA"; /* Matsushita CR-52x */ static u_int response_count=0; static u_int flags_cmd_out; @@ -509,6 +525,7 @@ u_char f_multisession; u_int lba_multi; + u_int last_redirect; u_char audio_state; u_int pos_audio_start; @@ -1065,16 +1082,21 @@ DPRINTF((DBG_SPI,"SBPCD: SpinUp.\n")); DriveStruct[d].in_SpinUp = 1; clr_cmdbuf(); - if (!new_drive) + if (old_drive) { drvcmd[0]=0x05; flags_cmd_out=f_putcmd|f_respo2|f_lopsta|f_getsta|f_ResponseStatus|f_obey_p_check|f_bit1; } - else + else if (new_drive) { drvcmd[0]=0x02; flags_cmd_out=f_putcmd|f_respo2|f_ResponseStatus|f_obey_p_check; } + else /* lcs_drive */ + { + drvcmd[0]=0x0D; + flags_cmd_out=f_putcmd|f_respo2|f_lopsta|f_getsta|f_ResponseStatus|f_obey_p_check|f_bit1; + } response_count=0; i=cmd_out(); DriveStruct[d].in_SpinUp = 0; @@ -1085,11 +1107,21 @@ { int i; - if (!new_drive) return (-3); + if (old_drive) return (-3); clr_cmdbuf(); - drvcmd[0]=0x06; - flags_cmd_out=f_putcmd|f_respo2|f_ResponseStatus|f_obey_p_check; - response_count=0; + if (new_drive) + { + drvcmd[0]=0x06; + flags_cmd_out=f_putcmd|f_respo2|f_ResponseStatus|f_obey_p_check; + response_count=0; + } + else /* lcs_drive */ + { + drvcmd[0]=0x0D; + drvcmd[1]=1; + flags_cmd_out=f_putcmd|f_respo2|f_ResponseStatus|f_obey_p_check; + response_count=0; + } i=cmd_out(); return (i); } @@ -1165,7 +1197,18 @@ drvcmd[6]=value1; flags_cmd_out=f_putcmd|f_ResponseStatus|f_obey_p_check; } - else + else if (lcs_drive) + { + if ((volume0==0)||(channel0!=0)) control0 |= 0x80; + if ((volume1==0)||(channel1!=1)) control0 |= 0x40; + if (volume0|volume1) value0=0x80; + drvcmd[0]=0x84; + drvcmd[1]=0x03; + drvcmd[4]=control0; + drvcmd[5]=value0; + flags_cmd_out=f_putcmd|f_getsta|f_ResponseStatus|f_obey_p_check; + } + else /* old_drive, different firmware levels */ { if (DriveStruct[d].drv_type>=drv_300) { @@ -1336,13 +1379,23 @@ { int i; - if (!new_drive) return (0); + if (old_drive) return (0); DPRINTF((DBG_LCK,"SBPCD: yy_LockDoor: %d (drive %d)\n", lock, d)); clr_cmdbuf(); - drvcmd[0]=0x0C; - if (lock==1) drvcmd[1]=0x01; - flags_cmd_out=f_putcmd|f_ResponseStatus|f_obey_p_check; - response_count=0; + if (new_drive) + { + drvcmd[0]=0x0C; + if (lock==1) drvcmd[1]=0x01; + flags_cmd_out=f_putcmd|f_ResponseStatus|f_obey_p_check; + response_count=0; + } + else /* lcs_drive */ + { + drvcmd[0]=0x0E; + if (lock==1) drvcmd[1]=0x01; + flags_cmd_out=f_putcmd|f_ResponseStatus|f_obey_p_check; + response_count=0; + } i=cmd_out(); return (i); } @@ -1533,7 +1586,16 @@ chan0 >>= 1; chan1 >>= 1; } - else + else if (lcs_drive) + { + chan0=0; + chan1=1; + vol0=vol1=infobuf[1]; + switches=infobuf[0]; + if ((switches&0x80)!=0) chan0=1; + if ((switches&0x40)!=0) chan1=0; + } + else /* old_drive, different firmware levels */ { chan0=0; chan1=1; @@ -1783,7 +1845,6 @@ { int i; - DriveStruct[d].diskstate_flags &= ~multisession_bit; DriveStruct[d].f_multisession=0; clr_cmdbuf(); if (new_drive) @@ -1801,9 +1862,38 @@ DriveStruct[d].f_multisession=1; DriveStruct[d].lba_multi=msf2blk(make32(make16(0,infobuf[1]), make16(infobuf[2],infobuf[3]))); + DriveStruct[d].last_redirect=20; + /* preliminary - has to get adjusted the following way: + * look at the first byte of frames 17 ff. until 0xFF is seen + * the frame before this one is the last continuation frame + */ + } + } + else if (lcs_drive) + { + drvcmd[0]=0x8C; + drvcmd[1]=3; + drvcmd[2]=1; + response_count=8; + flags_cmd_out=f_putcmd|f_ResponseStatus|f_obey_p_check; + i=cmd_out(); + if (i<0) return (i); + DPRINTF((DBG_MUL,"SBPCD: MultiSession Info: %02X %02X %02X %02X %02X %02X %02X %02X\n", + infobuf[0], infobuf[1], infobuf[2], infobuf[3], + infobuf[4], infobuf[5], infobuf[6], infobuf[7])); + DriveStruct[d].lba_multi=msf2blk(make32(make16(0,infobuf[5]), + make16(infobuf[6],infobuf[7]))); + if (DriveStruct[d].lba_multi>200) + { + DPRINTF((DBG_MUL,"SBPCD: MultiSession base: %06X\n", DriveStruct[d].lba_multi)); + DriveStruct[d].f_multisession=1; + DriveStruct[d].last_redirect=20; + /* preliminary - has to get adjusted the following way: + * look at the first byte of frames 17 ff. until 0xFF is seen; + * the frame before this one is the last repetition frame. + */ } } - DriveStruct[d].diskstate_flags |= multisession_bit; return (0); } /*==========================================================================*/ @@ -1905,6 +1995,7 @@ for (i=0;i<12;i++) DPRINTF((DBG_INI,"%c",infobuf[i])); DPRINTF((DBG_INI,"\"\n")); + DriveStruct[d].drv_type=0; for (i=0;i<4;i++) if (infobuf[i]!=drive_family[i]) break; if (i==4) { @@ -1914,35 +2005,54 @@ DriveStruct[d].drive_model[3]='x'; DriveStruct[d].drv_type=drv_new; } - else + if (!DriveStruct[d].drv_type) { for (i=0;i<8;i++) if (infobuf[i]!=drive_vendor[i]) break; - if (i!=8) + if (i==8) { - DPRINTF((DBG_INI,"SBPCD: check_version: error.\n")); - return (-1); + DriveStruct[d].drive_model[0]='2'; + DriveStruct[d].drive_model[1]='x'; + DriveStruct[d].drive_model[2]='-'; + DriveStruct[d].drive_model[3]='x'; + DriveStruct[d].drv_type=drv_old; } - DriveStruct[d].drive_model[0]='2'; - DriveStruct[d].drive_model[1]='x'; - DriveStruct[d].drive_model[2]='-'; - DriveStruct[d].drive_model[3]='x'; - DriveStruct[d].drv_type=drv_old; } - for (j=0;j<4;j++) DriveStruct[d].firmware_version[j]=infobuf[i+j]; - j = (DriveStruct[d].firmware_version[0] & 0x0F) * 100 + - (DriveStruct[d].firmware_version[2] & 0x0F) *10 + - (DriveStruct[d].firmware_version[3] & 0x0F); - if (new_drive) + if (!DriveStruct[d].drv_type) { - if (j<100) DriveStruct[d].drv_type=drv_099; - else DriveStruct[d].drv_type=drv_100; + for (i=0;i<4;i++) if (infobuf[i]!=lcs_family[i]) break; + if (i==4) + { + DriveStruct[d].drive_model[0]=infobuf[i++]; + DriveStruct[d].drive_model[1]=infobuf[i++]; + DriveStruct[d].drive_model[2]=infobuf[i++]; + DriveStruct[d].drive_model[3]=infobuf[i++]; + DriveStruct[d].drv_type=drv_lcs; + } + } + if (!DriveStruct[d].drv_type) + { + DPRINTF((DBG_INI,"SBPCD: check_version: error.\n")); + return (-1); + } + if (lcs_drive) DriveStruct[d].drv_type=drv_260; /* still needs a closer look */ + else + { + for (j=0;j<4;j++) DriveStruct[d].firmware_version[j]=infobuf[i+j]; + j = (DriveStruct[d].firmware_version[0] & 0x0F) * 100 + + (DriveStruct[d].firmware_version[2] & 0x0F) *10 + + (DriveStruct[d].firmware_version[3] & 0x0F); + if (new_drive) + { + if (j<100) DriveStruct[d].drv_type=drv_099; + else DriveStruct[d].drv_type=drv_100; + } + else if (j<200) DriveStruct[d].drv_type=drv_199; + else if (j<201) DriveStruct[d].drv_type=drv_200; + else if (j<210) DriveStruct[d].drv_type=drv_201; + else if (j<211) DriveStruct[d].drv_type=drv_210; + else if (j<300) DriveStruct[d].drv_type=drv_211; + else DriveStruct[d].drv_type=drv_300; } - else if (j<200) DriveStruct[d].drv_type=drv_199; - else if (j<201) DriveStruct[d].drv_type=drv_200; - else if (j<210) DriveStruct[d].drv_type=drv_201; - else if (j<211) DriveStruct[d].drv_type=drv_210; - else if (j<300) DriveStruct[d].drv_type=drv_211; - else DriveStruct[d].drv_type=drv_300; DPRINTF((DBG_INI,"SBPCD: check_version done.\n")); return (0); } @@ -2317,30 +2427,47 @@ return (0); } /*==========================================================================*/ -static int xx_PlayAudioMSF(int pos_audio_start,int pos_audio_end) +static int xx_PlayAudio(int pos_audio_start,int pos_audio_end) { - int i; + int i, n; if (DriveStruct[d].audio_state==audio_playing) return (-EINVAL); clr_cmdbuf(); - if (new_drive) + if (lcs_drive) { - drvcmd[0]=0x0E; - flags_cmd_out = f_putcmd | f_respo2 | f_ResponseStatus | - f_obey_p_check | f_wait_if_busy; + drvcmd[0]=0x0A; + i=msf2blk(pos_audio_start); + n=msf2blk(pos_audio_end)+1-i; + drvcmd[1]=(i>>16)&0x00FF; + drvcmd[2]=(i>>8)&0x00FF; + drvcmd[3]=i&0x00FF; + drvcmd[4]=(n>>16)&0x00FF; + drvcmd[5]=(n>>8)&0x00FF; + drvcmd[6]=n&0x00FF; + flags_cmd_out = f_putcmd | f_respo2 | f_lopsta | f_getsta | + f_ResponseStatus | f_obey_p_check | f_wait_if_busy; } else { - drvcmd[0]=0x0B; - flags_cmd_out = f_putcmd | f_respo2 | f_lopsta | f_getsta | - f_ResponseStatus | f_obey_p_check | f_wait_if_busy; + if (new_drive) + { + drvcmd[0]=0x0E; + flags_cmd_out = f_putcmd | f_respo2 | f_ResponseStatus | + f_obey_p_check | f_wait_if_busy; + } + else /* old_drive */ + { + drvcmd[0]=0x0B; + flags_cmd_out = f_putcmd | f_respo2 | f_lopsta | f_getsta | + f_ResponseStatus | f_obey_p_check | f_wait_if_busy; + } + drvcmd[1]=(pos_audio_start>>16)&0x00FF; + drvcmd[2]=(pos_audio_start>>8)&0x00FF; + drvcmd[3]=pos_audio_start&0x00FF; + drvcmd[4]=(pos_audio_end>>16)&0x00FF; + drvcmd[5]=(pos_audio_end>>8)&0x00FF; + drvcmd[6]=pos_audio_end&0x00FF; } - drvcmd[1]=(pos_audio_start>>16)&0x00FF; - drvcmd[2]=(pos_audio_start>>8)&0x00FF; - drvcmd[3]=pos_audio_start&0x00FF; - drvcmd[4]=(pos_audio_end>>16)&0x00FF; - drvcmd[5]=(pos_audio_end>>8)&0x00FF; - drvcmd[6]=pos_audio_end&0x00FF; response_count=0; i=cmd_out(); return (i); @@ -2490,8 +2617,8 @@ msf.cdmsf_frame1; DPRINTF((DBG_IOX,"SBPCD: ioctl: CDROMPLAYMSF %08X %08X\n", DriveStruct[d].pos_audio_start,DriveStruct[d].pos_audio_end)); - i=xx_PlayAudioMSF(DriveStruct[d].pos_audio_start,DriveStruct[d].pos_audio_end); - DPRINTF((DBG_IOC,"SBPCD: ioctl: xx_PlayAudioMSF returns %d\n",i)); + i=xx_PlayAudio(DriveStruct[d].pos_audio_start,DriveStruct[d].pos_audio_end); + DPRINTF((DBG_IOC,"SBPCD: ioctl: xx_PlayAudio returns %d\n",i)); #if 0 if (i<0) return (-EIO); #endif 0 @@ -2521,7 +2648,7 @@ if (ti.cdti_trk1>DriveStruct[d].n_last_track) ti.cdti_trk1=DriveStruct[d].n_last_track; DriveStruct[d].pos_audio_start=DriveStruct[d].TocBuffer[ti.cdti_trk0].address; DriveStruct[d].pos_audio_end=DriveStruct[d].TocBuffer[ti.cdti_trk1+1].address; - i=xx_PlayAudioMSF(DriveStruct[d].pos_audio_start,DriveStruct[d].pos_audio_end); + i=xx_PlayAudio(DriveStruct[d].pos_audio_start,DriveStruct[d].pos_audio_end); #if 0 if (i<0) return (-EIO); #endif 0 @@ -2575,17 +2702,15 @@ case CDROMEJECT: DPRINTF((DBG_IOC,"SBPCD: ioctl: CDROMEJECT entered.\n")); - if (!new_drive) return (0); -#if WORKMAN - DriveStruct[d].CD_changed=0xFF; - DriveStruct[d].diskstate_flags=0; -#endif WORKMAN + if (old_drive) return (0); do i=yy_LockDoor(0); while (i!=0); DriveStruct[d].open_count=0; /* to get it locked next time again */ i=yy_SpinDown(); DPRINTF((DBG_IOX,"SBPCD: ioctl: yy_SpinDown returned %d.\n", i)); if (i<0) return (-EIO); + DriveStruct[d].CD_changed=0xFF; + DriveStruct[d].diskstate_flags=0; DriveStruct[d].audio_state=0; return (0); @@ -3008,7 +3133,7 @@ { #if MANY_SESSION DPRINTF((DBG_MUL,"SBPCD: read MSF %08X\n", blk2msf(block))); - if ( (DriveStruct[d].f_multisession) && (multisession_valid) ) + if (DriveStruct[d].f_multisession) { DPRINTF((DBG_MUL,"SBPCD: ManySession: use %08X for %08X (msf)\n", blk2msf(DriveStruct[d].lba_multi+block), @@ -3016,13 +3141,14 @@ block=DriveStruct[d].lba_multi+block; } #else - if ( (block==16) && (DriveStruct[d].f_multisession) && (multisession_valid) ) - { - DPRINTF((DBG_MUL,"SBPCD: MultiSession: use %08X for %08X (msf)\n", - blk2msf(DriveStruct[d].lba_multi+16), - blk2msf(block))); - block=DriveStruct[d].lba_multi+block; - } + if ((block<=DriveStruct[d].last_redirect) + && (DriveStruct[d].f_multisession)) + { + DPRINTF((DBG_MUL,"SBPCD: MultiSession: use %08X for %08X (msf)\n", + blk2msf(DriveStruct[d].lba_multi+block), + blk2msf(block))); + block=DriveStruct[d].lba_multi+block; + } #endif MANY_SESSION } diff -u --recursive --new-file v1.1.62/linux/drivers/char/console.c linux/drivers/char/console.c --- v1.1.62/linux/drivers/char/console.c Thu Oct 13 14:07:05 1994 +++ linux/drivers/char/console.c Thu Nov 10 13:17:20 1994 @@ -741,23 +741,29 @@ static void lf(int currcons) { - if (y+1top) { + /* don't scroll if below top of scrolling region, or + * if above scrolling region + */ + if (y == top) + scrdown(currcons,top,bottom); + else if (y > 0) { y--; pos -= video_size_row; - return; - } else - scrdown(currcons,top,bottom); + } need_wrap = 0; } diff -u --recursive --new-file v1.1.62/linux/drivers/char/keyboard.c linux/drivers/char/keyboard.c --- v1.1.62/linux/drivers/char/keyboard.c Fri Oct 21 17:04:12 1994 +++ linux/drivers/char/keyboard.c Wed Nov 9 14:38:18 1994 @@ -193,38 +193,100 @@ } /* - * Translation of escaped scancodes to keysyms. - * This should be user-settable. + * Translation of escaped scancodes to keycodes. + * This is now user-settable. + * The keycodes 1-88,96-111,119 are fairly standard, and + * should probably not be changed - changing might confuse X. + * X also interprets scancode 0x5d (KEY_Begin). + * + * For 1-88 keycode equals scancode. */ -#define E0_BASE 96 -#define E0_KPENTER (E0_BASE+0) -#define E0_RCTRL (E0_BASE+1) -#define E0_KPSLASH (E0_BASE+2) -#define E0_PRSCR (E0_BASE+3) -#define E0_RALT (E0_BASE+4) -#define E0_BREAK (E0_BASE+5) /* (control-pause) */ -#define E0_HOME (E0_BASE+6) -#define E0_UP (E0_BASE+7) -#define E0_PGUP (E0_BASE+8) -#define E0_LEFT (E0_BASE+9) -#define E0_RIGHT (E0_BASE+10) -#define E0_END (E0_BASE+11) -#define E0_DOWN (E0_BASE+12) -#define E0_PGDN (E0_BASE+13) -#define E0_INS (E0_BASE+14) -#define E0_DEL (E0_BASE+15) +#define E0_KPENTER 96 +#define E0_RCTRL 97 +#define E0_KPSLASH 98 +#define E0_PRSCR 99 +#define E0_RALT 100 +#define E0_BREAK 101 /* (control-pause) */ +#define E0_HOME 102 +#define E0_UP 103 +#define E0_PGUP 104 +#define E0_LEFT 105 +#define E0_RIGHT 106 +#define E0_END 107 +#define E0_DOWN 108 +#define E0_PGDN 109 +#define E0_INS 110 +#define E0_DEL 111 + +#define E1_PAUSE 119 + +/* + * The keycodes below are randomly located in 89-95,112-118,120-127. + * They could be thrown away (and all occurrences below replaced by 0), + * but that would force many users to use the `setkeycodes' utility, where + * they needed not before. It does not matter that there are duplicates, as + * long as no duplication occurs for any single keyboard. + */ +#define SC_LIM 89 + +#define FOCUS_PF1 85 /* actual code! */ +#define FOCUS_PF2 89 +#define FOCUS_PF3 90 +#define FOCUS_PF4 91 +#define FOCUS_PF5 92 +#define FOCUS_PF6 93 +#define FOCUS_PF7 94 +#define FOCUS_PF8 95 +#define FOCUS_PF9 120 +#define FOCUS_PF10 121 +#define FOCUS_PF11 122 +#define FOCUS_PF12 123 + +#define JAP_86 124 +/* tfj@olivia.ping.dk: + * The four keys are located over the numeric keypad, and are + * labelled A1-A4. It's an rc930 keyboard, from + * Regnecentralen/RC International, Now ICL. + * Scancodes: 59, 5a, 5b, 5c. + */ +#define RGN1 124 +#define RGN2 125 +#define RGN3 126 +#define RGN4 127 + +static unsigned char high_keys[128 - SC_LIM] = { + RGN1, RGN2, RGN3, RGN4, 0, 0, 0, /* 0x59-0x5f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60-0x67 */ + 0, 0, 0, 0, 0, FOCUS_PF11, 0, FOCUS_PF12, /* 0x68-0x6f */ + 0, 0, 0, FOCUS_PF2, FOCUS_PF9, 0, 0, FOCUS_PF3, /* 0x70-0x77 */ + FOCUS_PF4, FOCUS_PF5, FOCUS_PF6, FOCUS_PF7, /* 0x78-0x7b */ + FOCUS_PF8, JAP_86, FOCUS_PF10, 0 /* 0x7c-0x7f */ +}; + /* BTC */ -#define E0_MACRO (E0_BASE+16) +#define E0_MACRO 112 /* LK450 */ -#define E0_F13 (E0_BASE+17) -#define E0_F14 (E0_BASE+18) -#define E0_HELP (E0_BASE+19) -#define E0_DO (E0_BASE+20) -#define E0_F17 (E0_BASE+21) -#define E0_KPMINPLUS (E0_BASE+22) - -#define E1_PAUSE (E0_BASE+23) /* 119 */ +#define E0_F13 113 +#define E0_F14 114 +#define E0_HELP 115 +#define E0_DO 116 +#define E0_F17 117 +#define E0_KPMINPLUS 118 +/* + * My OmniKey generates e0 4c for the "OMNI" key and the + * right alt key does nada. [kkoller@nyx10.cs.du.edu] + */ +#define E0_OK 124 +/* + * New microsoft keyboard is rumoured to have + * e0 5b (left window button), e0 5c (right window button), + * e0 5d (menu button). [or: LBANNER, RBANNER, RMENU] + * [or: Windows_L, Windows_R, TaskMan] + */ +#define E0_MSLW 125 +#define E0_MSRW 126 +#define E0_MSTM 127 static unsigned char e0_keys[128] = { 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00-0x07 */ @@ -236,47 +298,33 @@ 0, 0, 0, 0, 0, E0_KPSLASH, 0, E0_PRSCR, /* 0x30-0x37 */ E0_RALT, 0, 0, 0, 0, E0_F13, E0_F14, E0_HELP, /* 0x38-0x3f */ E0_DO, E0_F17, 0, 0, 0, 0, E0_BREAK, E0_HOME, /* 0x40-0x47 */ - E0_UP, E0_PGUP, 0, E0_LEFT, 0, E0_RIGHT, E0_KPMINPLUS, E0_END,/* 0x48-0x4f */ + E0_UP, E0_PGUP, 0, E0_LEFT, E0_OK, E0_RIGHT, E0_KPMINPLUS, E0_END,/* 0x48-0x4f */ E0_DOWN, E0_PGDN, E0_INS, E0_DEL, 0, 0, 0, 0, /* 0x50-0x57 */ - 0, 0, 0, 0, 0, 0, 0, 0, /* 0x58-0x5f */ + 0, 0, 0, E0_MSLW, E0_MSRW, E0_MSTM, 0, 0, /* 0x58-0x5f */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60-0x67 */ 0, 0, 0, 0, 0, 0, 0, E0_MACRO, /* 0x68-0x6f */ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70-0x77 */ 0, 0, 0, 0, 0, 0, 0, 0 /* 0x78-0x7f */ }; -/* kludge to stay below 128 - next time someone comes with a strange - keyboard, key codes will have to become 2 (or 4) bytes. */ -/* Owners of a FOCUS 9000 can assign F1,F2-F8,F9-F12 to 85,89-95,120-123 */ -/* Owners of a certain Japanese keyboard can use 89 and 124 */ -/* Owners of a certain Brazilian keyboard can use 89 and 121 */ -/* Note: MEDIUMRAW mode will change, and all keycodes above 89 will change; - this is only a temporary solution */ - -#define SC_LIM 89 - -#define FOCUS_PF1 85 /* actual code! */ -#define FOCUS_PF2 89 -#define FOCUS_PF3 90 -#define FOCUS_PF4 91 -#define FOCUS_PF5 92 -#define FOCUS_PF6 93 -#define FOCUS_PF7 94 -#define FOCUS_PF8 95 -#define FOCUS_PF9 (E1_PAUSE + 1) -#define FOCUS_PF10 (E1_PAUSE + 2) -#define FOCUS_PF11 (E1_PAUSE + 3) -#define FOCUS_PF12 (E1_PAUSE + 4) /* 123 */ -#define JAP_86 (E1_PAUSE + 5) /* 124 */ - -static unsigned char high_keys[128 - SC_LIM] = { - 0, 0, 0, 0, 0, 0, 0, /* 0x59-0x5f */ - 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60-0x67 */ - 0, 0, 0, 0, 0, FOCUS_PF11, 0, FOCUS_PF12, /* 0x68-0x6f */ - 0, 0, 0, FOCUS_PF2, FOCUS_PF9, 0, 0, FOCUS_PF3, /* 0x70-0x77 */ - FOCUS_PF4, FOCUS_PF5, FOCUS_PF6, FOCUS_PF7, /* 0x78-0x7b */ - FOCUS_PF8, JAP_86, FOCUS_PF10, 0 /* 0x7c-0x7f */ -}; +int setkeycode(unsigned int scancode, unsigned int keycode) +{ + if (scancode < SC_LIM || scancode > 255 || keycode > 127) + return -EINVAL; + if (scancode < 128) + high_keys[scancode - SC_LIM] = keycode; + else + e0_keys[scancode - 128] = keycode; + return 0; +} + +int getkeycode(unsigned int scancode) +{ + return + (scancode < SC_LIM || scancode > 255) ? -EINVAL : + (scancode < 128) ? high_keys[scancode - SC_LIM] : + e0_keys[scancode - 128]; +} static void keyboard_interrupt(int int_pt_regs) { diff -u --recursive --new-file v1.1.62/linux/drivers/char/vt.c linux/drivers/char/vt.c --- v1.1.62/linux/drivers/char/vt.c Thu Oct 13 14:07:08 1994 +++ linux/drivers/char/vt.c Wed Nov 9 14:38:18 1994 @@ -46,6 +46,8 @@ asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on); +extern int getkeycode(unsigned int scancode); +extern int setkeycode(unsigned int scancode, unsigned int keycode); extern void compute_shiftstate(void); extern void change_console(unsigned int new_console); extern void complete_change_console(unsigned int new_console); @@ -284,6 +286,36 @@ put_fs_long(ucval, (unsigned long *) arg); } return i; + + case KDGETKEYCODE: + { + struct kbkeycode * const a = (struct kbkeycode *)arg; + unsigned int sc; + int kc; + + i = verify_area(VERIFY_WRITE, (void *)a, sizeof(struct kbkeycode)); + if (i) + return i; + sc = get_fs_long((int *) &a->scancode); + kc = getkeycode(sc); + if (kc < 0) + return kc; + put_fs_long(kc, (int *) &a->keycode); + return 0; + } + + case KDSETKEYCODE: + { + struct kbkeycode * const a = (struct kbkeycode *)arg; + unsigned int sc, kc; + + i = verify_area(VERIFY_READ, (void *)a, sizeof(struct kbkeycode)); + if (i) + return i; + sc = get_fs_long((int *) &a->scancode); + kc = get_fs_long((int *) &a->keycode); + return setkeycode(sc, kc); + } case KDGKBENT: { diff -u --recursive --new-file v1.1.62/linux/drivers/net/hp-plus.c linux/drivers/net/hp-plus.c --- v1.1.62/linux/drivers/net/hp-plus.c Sun Oct 9 19:28:48 1994 +++ linux/drivers/net/hp-plus.c Mon Nov 14 07:14:10 1994 @@ -43,7 +43,7 @@ /* A zero-terminated list of I/O addresses to be probed. */ static unsigned int hpplus_portlist[] = -{0x200, 0x240, 0x280, 0x2C0, 0x300, 0x320, 0x340, 0} +{0x200, 0x240, 0x280, 0x2C0, 0x300, 0x320, 0x340, 0}; /* The HP EtherTwist chip implementation is a fairly routine DP8390 diff -u --recursive --new-file v1.1.62/linux/drivers/net/slip.c linux/drivers/net/slip.c --- v1.1.62/linux/drivers/net/slip.c Thu Aug 11 20:38:51 1994 +++ linux/drivers/net/slip.c Mon Nov 14 12:04:03 1994 @@ -1010,12 +1010,12 @@ if (already++ == 0) { printk("SLIP: version %s (%d channels)\n", SLIP_VERSION, SL_NRUNIT); -#ifdef CONFIG_INET +#ifdef SL_COMPRESSED printk("CSLIP: code copyright 1989 Regents of the University of California\n"); -#endif +#endif #ifdef CONFIG_AX25 printk("AX25: KISS encapsulation enabled\n"); -#endif +#endif /* Fill in our LDISC request block. */ memset(&sl_ldisc, 0, sizeof(sl_ldisc)); sl_ldisc.magic = TTY_LDISC_MAGIC; diff -u --recursive --new-file v1.1.62/linux/drivers/scsi/aha1740.c linux/drivers/scsi/aha1740.c --- v1.1.62/linux/drivers/scsi/aha1740.c Fri Aug 19 08:54:03 1994 +++ linux/drivers/scsi/aha1740.c Mon Nov 14 08:59:18 1994 @@ -196,6 +196,12 @@ ((ulong) inb(MBOXIN2) <<16) + ((ulong) inb(MBOXIN3) <<24) ); outb(G2CNTRL_HRDY,G2CNTRL); /* Host Ready -> Mailbox in complete */ + if (!ecbptr) + { + printk("Aha1740 null ecbptr in interrupt (%x,%x,%x,%d)\n", + inb(G2STAT),adapstat,inb(G2INTST),number_serviced++); + continue; + } SCtmp = ecbptr->SCpnt; if (SCtmp->host_scribble) scsi_free(SCtmp->host_scribble, 512); diff -u --recursive --new-file v1.1.62/linux/drivers/scsi/hosts.c linux/drivers/scsi/hosts.c --- v1.1.62/linux/drivers/scsi/hosts.c Wed Nov 2 12:03:46 1994 +++ linux/drivers/scsi/hosts.c Mon Nov 14 08:42:48 1994 @@ -227,9 +227,10 @@ printk("Register %x %x: %d\n", retval, retval->hostt, j); #endif - /* The next three are the default values which can be overridden + /* The next four are the default values which can be overridden if need be */ retval->this_id = tpnt->this_id; + retval->can_queue = tpnt->can_queue; retval->sg_tablesize = tpnt->sg_tablesize; retval->unchecked_isa_dma = tpnt->unchecked_isa_dma; diff -u --recursive --new-file v1.1.62/linux/drivers/scsi/hosts.h linux/drivers/scsi/hosts.h --- v1.1.62/linux/drivers/scsi/hosts.h Fri Aug 19 08:54:04 1994 +++ linux/drivers/scsi/hosts.h Mon Nov 14 08:42:48 1994 @@ -243,6 +243,7 @@ */ int this_id; + int can_queue; short unsigned int sg_tablesize; unsigned unchecked_isa_dma:1; /* diff -u --recursive --new-file v1.1.62/linux/drivers/scsi/scsi.c linux/drivers/scsi/scsi.c --- v1.1.62/linux/drivers/scsi/scsi.c Wed Nov 9 14:56:34 1994 +++ linux/drivers/scsi/scsi.c Mon Nov 14 08:42:48 1994 @@ -580,8 +580,8 @@ if (!SCpnt) return NULL; - if (device->host->hostt->can_queue - && device->host->host_busy >= device->host->hostt->can_queue) return NULL; + if (device->host->can_queue + && device->host->host_busy >= device->host->can_queue) return NULL; if (req) { memcpy(&SCpnt->request, req, sizeof(struct request)); @@ -766,7 +766,7 @@ "bufflen = %d, done = %08x)\n", SCpnt->host->host_no, SCpnt->target, SCpnt->cmnd, SCpnt->buffer, SCpnt->bufflen, SCpnt->done); #endif - if (host->hostt->can_queue) + if (host->can_queue) { #ifdef DEBUG printk("queuecommand : routine at %08x\n", @@ -860,7 +860,7 @@ if (!host) { - panic ("Invalid or not present host. %d\n", host->host_no); + panic ("Invalid or not present host.\n"); } @@ -876,12 +876,12 @@ while (1==1){ cli(); - if (host->hostt->can_queue - && host->host_busy >= host->hostt->can_queue) + if (host->can_queue + && host->host_busy >= host->can_queue) { sti(); SCSI_SLEEP(&host->host_wait, - (host->host_busy >= host->hostt->can_queue)); + (host->host_busy >= host->can_queue)); } else { host->host_busy++; sti(); diff -u --recursive --new-file v1.1.62/linux/drivers/scsi/scsicam.c linux/drivers/scsi/scsicam.c --- v1.1.62/linux/drivers/scsi/scsicam.c Thu Aug 11 20:38:52 1994 +++ linux/drivers/scsi/scsicam.c Tue Nov 8 08:19:17 1994 @@ -41,7 +41,7 @@ int ret_code; int size = disk->capacity; - if (!(bh = bread(dev,0,1024))) + if (!(bh = bread(dev & ~0xf,0,1024))) return -1; #ifdef DEBUG diff -u --recursive --new-file v1.1.62/linux/drivers/scsi/sd.c linux/drivers/scsi/sd.c --- v1.1.62/linux/drivers/scsi/sd.c Wed Oct 12 14:57:29 1994 +++ linux/drivers/scsi/sd.c Wed Nov 9 14:38:27 1994 @@ -444,6 +444,24 @@ printk("sd%c : real dev = /dev/sd%c, block = %d\n", 'a' + MINOR(SCpnt->request.dev), dev, block); #endif + /* + * If we have a 1K hardware sectorsize, prevent access to single + * 512 byte sectors. In theory we could handle this - in fact + * the scsi cdrom driver must be able to handle this because + * we typically use 1K blocksizes, and cdroms typically have + * 2K hardware sectorsizes. Of course, things are simpler + * with the cdrom, since it is read-only. For performance + * reasons, the filesystems should be able to handle this + * and not force the scsi disk driver to use bounce buffers + * for this. + */ + if (rscsi_disks[dev].sector_size == 1024) + if((block & 1) || (SCpnt->request.nr_sectors & 1)) { + printk("sd.c:Bad block number requested"); + SCpnt = end_scsi_request(SCpnt, 0, SCpnt->request.nr_sectors); + goto repeat; + } + switch (SCpnt->request.cmd) { case WRITE : diff -u --recursive --new-file v1.1.62/linux/fs/buffer.c linux/fs/buffer.c --- v1.1.62/linux/fs/buffer.c Sat Oct 22 16:06:53 1994 +++ linux/fs/buffer.c Mon Nov 14 06:59:55 1994 @@ -56,7 +56,6 @@ int nr_free[NR_SIZES] = {0,}; int buffermem = 0; int nr_buffer_heads = 0; -static int min_free_pages = 20; /* nr free pages needed before buffer grows */ extern int *blksize_size[]; /* Here is the parameter block for the bdflush process. */ @@ -518,7 +517,7 @@ /* We are going to try and locate this much memory */ needed =bdf_prm.b_un.nrefill * size; - while (nr_free_pages > min_free_pages && needed > 0 && + while (nr_free_pages > min_free_pages*2 && needed > 0 && grow_buffers(GFP_BUFFER, size)) { needed -= PAGE_SIZE; } @@ -1572,7 +1571,7 @@ if(retval) return retval; }; - if (nr_free_pages > min_free_pages) + if (nr_free_pages > min_free_pages*2) return try_to_generate_cluster(dev, b[0], size); else return reassign_cluster(dev, b[0], size); @@ -1591,13 +1590,11 @@ int isize = BUFSIZE_INDEX(BLOCK_SIZE); if (high_memory >= 4*1024*1024) { - min_free_pages = 200; if(high_memory >= 16*1024*1024) nr_hash = 16381; else nr_hash = 4093; } else { - min_free_pages = 20; nr_hash = 997; }; diff -u --recursive --new-file v1.1.62/linux/fs/exec.c linux/fs/exec.c --- v1.1.62/linux/fs/exec.c Wed Nov 9 14:56:35 1994 +++ linux/fs/exec.c Wed Nov 9 14:30:16 1994 @@ -365,16 +365,26 @@ /* * count() counts the number of arguments/envelopes + * + * We also do some limited EFAULT checking: this isn't complete, but + * it does cover most cases. I'll have to do this correctly some day.. */ static int count(char ** argv) { - int i=0; - char ** tmp; + int error, i = 0; + char ** tmp, *p; - if ((tmp = argv) != 0) - while (get_fs_long((unsigned long *) (tmp++))) + error = verify_area(VERIFY_READ, argv, sizeof(char *)); + if (error) + return error; + if ((tmp = argv) != 0) { + while ((p = (char *) get_fs_long((unsigned long *) (tmp++))) != NULL) { i++; - + error = verify_area(VERIFY_READ, p, 1); + if (error) + return error; + } + } return i; } @@ -601,8 +611,10 @@ if (retval) return retval; bprm.filename = filename; - bprm.argc = count(argv); - bprm.envc = count(envp); + if ((bprm.argc = count(argv)) < 0) + return bprm.argc; + if ((bprm.envc = count(envp)) < 0) + return bprm.envc; restart_interp: if (!S_ISREG(bprm.inode->i_mode)) { /* must be regular file */ diff -u --recursive --new-file v1.1.62/linux/fs/inode.c linux/fs/inode.c --- v1.1.62/linux/fs/inode.c Wed Nov 2 12:03:46 1994 +++ linux/fs/inode.c Mon Nov 14 08:44:21 1994 @@ -258,6 +258,15 @@ attr->ia_mode &= ~S_ISGID; } + /* Check for setting the inode time */ + if ((attr->ia_valid & ATTR_ATIME_SET) && + ((current->fsuid != inode->i_uid) && !fsuser())) + return -EPERM; + if ((attr->ia_valid & ATTR_MTIME_SET) && + ((current->fsuid != inode->i_uid) && !fsuser())) + return -EPERM; + + return 0; } diff -u --recursive --new-file v1.1.62/linux/fs/isofs/dir.c linux/fs/isofs/dir.c --- v1.1.62/linux/fs/isofs/dir.c Wed Oct 19 10:23:18 1994 +++ linux/fs/isofs/dir.c Mon Nov 14 08:43:58 1994 @@ -72,6 +72,7 @@ void * cpnt = NULL; unsigned int old_offset; int dlen, rrflag; + int high_sierra = 0; char * dpnt, *dpnt1; struct iso_directory_record * de; @@ -125,6 +126,7 @@ unsigned int frag1; frag1 = bufsize - old_offset; cpnt = kmalloc(*((unsigned char *) de),GFP_KERNEL); + if (!cpnt) return 0; memcpy(cpnt, bh->b_data + old_offset, frag1); de = (struct iso_directory_record *) ((char *)cpnt); brelse(bh); @@ -156,8 +158,7 @@ put_fs_byte('.',dirent->d_name+1); i = 2; dpnt = ".."; - if((inode->i_sb->u.isofs_sb.s_firstdatazone - << bufbits) != inode->i_ino) + if((inode->i_sb->u.isofs_sb.s_firstdatazone) != inode->i_ino) inode_number = inode->u.isofs_i.i_backlink; else inode_number = inode->i_ino; @@ -178,6 +179,15 @@ is no Rock Ridge NM field. */ else { + /* Do not report hidden or associated files */ + high_sierra = inode->i_sb->u.isofs_sb.s_high_sierra; + if (de->flags[-high_sierra] & 5) { + if (cpnt) { + kfree(cpnt); + cpnt = NULL; + }; + continue; + } dlen = de->name_len[0]; dpnt = de->name; i = dlen; @@ -196,6 +206,7 @@ if(inode->i_sb->u.isofs_sb.s_mapping == 'n') { dpnt1 = dpnt; dpnt = kmalloc(dlen, GFP_KERNEL); + if (!dpnt) goto out; for (i = 0; i < dlen && i < NAME_MAX; i++) { if (!(c = dpnt1[i])) break; if (c >= 'A' && c <= 'Z') c |= 0x20; /* lower case */ diff -u --recursive --new-file v1.1.62/linux/fs/isofs/file.c linux/fs/isofs/file.c --- v1.1.62/linux/fs/isofs/file.c Wed Aug 10 19:26:27 1994 +++ linux/fs/isofs/file.c Mon Nov 14 08:44:21 1994 @@ -146,7 +146,8 @@ return 0; read = 0; block = filp->f_pos >> ISOFS_BUFFER_BITS(inode); - offset = filp->f_pos & (ISOFS_BUFFER_SIZE(inode)-1); + offset = (inode->u.isofs_i.i_first_extent + filp->f_pos) + & (ISOFS_BUFFER_SIZE(inode)-1); blocks = (left + offset + ISOFS_BUFFER_SIZE(inode) - 1) / ISOFS_BUFFER_SIZE(inode); bhb = bhe = buflist; diff -u --recursive --new-file v1.1.62/linux/fs/isofs/inode.c linux/fs/isofs/inode.c --- v1.1.62/linux/fs/isofs/inode.c Wed Nov 2 12:03:46 1994 +++ linux/fs/isofs/inode.c Mon Nov 14 08:43:50 1994 @@ -245,8 +245,22 @@ s->u.isofs_sb.s_ninodes = 0; /* No way to figure this out easily */ - s->u.isofs_sb.s_firstdatazone = isonum_733( rootp->extent) << - (ISOFS_BLOCK_BITS - blocksize_bits); + /* RDE: convert log zone size to bit shift */ + + switch (s -> u.isofs_sb.s_log_zone_size) + { case 512: s -> u.isofs_sb.s_log_zone_size = 9; break; + case 1024: s -> u.isofs_sb.s_log_zone_size = 10; break; + case 2048: s -> u.isofs_sb.s_log_zone_size = 11; break; + + default: + printk("Bad logical zone size %d\n", s -> u.isofs_sb.s_log_zone_size = 10); + goto out; + } + + /* RDE: data zone now byte offset! */ + + s->u.isofs_sb.s_firstdatazone = (isonum_733( rootp->extent) + << s -> u.isofs_sb.s_log_zone_size); s->s_magic = ISOFS_SUPER_MAGIC; /* The CDROM is read-only, has no nodes (devices) on it, and since @@ -256,19 +270,14 @@ s->s_flags |= MS_RDONLY /* | MS_NODEV | MS_NOSUID */; - if(s->u.isofs_sb.s_log_zone_size != (1 << ISOFS_BLOCK_BITS)) { - printk("1 <u.isofs_sb.s_max_size, s->u.isofs_sb.s_log_zone_size); printk("First datazone:%ld Root inode number %d\n", - s->u.isofs_sb.s_firstdatazone, - isonum_733 (rootp->extent) << ISOFS_BLOCK_BITS); + s->u.isofs_sb.s_firstdatazone >> s -> u.isofs_sb.s_log_zone_size, + isonum_733 (rootp->extent) << s -> u.isofs_sb.s_log_zone_size); if(high_sierra) printk("Disc in High Sierra format.\n"); unlock_super(s); /* set up enough so that it can read an inode */ @@ -283,7 +292,7 @@ s->u.isofs_sb.s_gid = opt.gid; s->s_blocksize = opt.blocksize; s->s_blocksize_bits = blocksize_bits; - s->s_mounted = iget(s, isonum_733 (rootp->extent) << ISOFS_BLOCK_BITS); + s->s_mounted = iget(s, isonum_733 (rootp->extent) << s -> u.isofs_sb.s_log_zone_size); unlock_super(s); if (!(s->s_mounted)) { @@ -320,7 +329,7 @@ printk("_isofs_bmap: block<0"); return 0; } - return inode->u.isofs_i.i_first_extent + block; + return (inode->u.isofs_i.i_first_extent >> ISOFS_BUFFER_BITS(inode)) + block; } void isofs_read_inode(struct inode * inode) @@ -425,10 +434,12 @@ /* I have no idea what other flag bits are used for, so we will flag it for now */ +#ifdef DEBUG if((raw_inode->flags[-high_sierra] & ~2)!= 0){ printk("Unusual flag settings for ISO file (%ld %x).\n", inode->i_ino, raw_inode->flags[-high_sierra]); } +#endif #ifdef DEBUG printk("Get inode %d: %d %d: %d\n",inode->i_ino, block, @@ -438,10 +449,9 @@ inode->i_mtime = inode->i_atime = inode->i_ctime = iso_date(raw_inode->date, high_sierra); - inode->u.isofs_i.i_first_extent = - (isonum_733 (raw_inode->extent) + - isonum_711 (raw_inode->ext_attr_length)) << - (ISOFS_BLOCK_BITS - ISOFS_BUFFER_BITS(inode)); + 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; inode->u.isofs_i.i_backlink = 0xffffffff; /* Will be used for previous directory */ switch (inode->i_sb->u.isofs_sb.s_conversion){ @@ -625,6 +635,7 @@ unsigned int frag1; frag1 = bufsize - old_offset; cpnt = kmalloc(*((unsigned char *) de),GFP_KERNEL); + if (!cpnt) return -1; memcpy(cpnt, bh->b_data + old_offset, frag1); de = (struct iso_directory_record *) ((char *)cpnt); brelse(bh); diff -u --recursive --new-file v1.1.62/linux/fs/isofs/namei.c linux/fs/isofs/namei.c --- v1.1.62/linux/fs/isofs/namei.c Mon Oct 24 15:56:20 1994 +++ linux/fs/isofs/namei.c Mon Nov 14 08:44:07 1994 @@ -69,6 +69,7 @@ unsigned int old_offset; unsigned int backlink; int dlen, rrflag, match; + int high_sierra = 0; char * dpnt; struct iso_directory_record * de; char c; @@ -114,6 +115,7 @@ unsigned int frag1; frag1 = bufsize - old_offset; cpnt = kmalloc(*((unsigned char *) de),GFP_KERNEL); + if (!cpnt) return 0; memcpy(cpnt, bh->b_data + old_offset, frag1); de = (struct iso_directory_record *) cpnt; @@ -139,17 +141,26 @@ if (de->name[0]==1 && de->name_len[0]==1) { #if 0 printk("Doing .. (%d %d)", - dir->i_sb->s_firstdatazone << bufbits, + dir->i_sb->s_firstdatazone, dir->i_ino); #endif - if((dir->i_sb->u.isofs_sb.s_firstdatazone - << bufbits) != dir->i_ino) - inode_number = dir->u.isofs_i.i_backlink; + if((dir->i_sb->u.isofs_sb.s_firstdatazone) != dir->i_ino) + inode_number = dir->u.isofs_i.i_backlink; else inode_number = dir->i_ino; backlink = 0; } + /* Do not report hidden or associated files */ + high_sierra = dir->i_sb->u.isofs_sb.s_high_sierra; + if (de->flags[-high_sierra] & 5) { + if (cpnt) { + kfree(cpnt); + cpnt = NULL; + }; + continue; + } + dlen = de->name_len[0]; dpnt = de->name; /* Now convert the filename in the buffer to lower case */ diff -u --recursive --new-file v1.1.62/linux/fs/isofs/rock.c linux/fs/isofs/rock.c --- v1.1.62/linux/fs/isofs/rock.c Wed Aug 10 19:26:27 1994 +++ linux/fs/isofs/rock.c Mon Nov 14 08:44:14 1994 @@ -56,6 +56,7 @@ int block, offset, offset1; \ struct buffer_head * bh; \ buffer = kmalloc(cont_size,GFP_KERNEL); \ + if (!buffer) goto out; \ block = cont_extent; \ offset = cont_offset; \ offset1 = 0; \ @@ -214,6 +215,7 @@ deallocate the mem fairly soon after control is returned */ + if (!retname) goto out; *retname = 0; /* Zero length string */ retnamlen = 0; }; @@ -467,6 +469,7 @@ while (slen > 1){ if (!rpnt){ rpnt = (char *) kmalloc (inode->i_size +1, GFP_KERNEL); + if (!rpnt) goto out; *rpnt = 0; }; rootflag = 0; diff -u --recursive --new-file v1.1.62/linux/fs/msdos/file.c linux/fs/msdos/file.c --- v1.1.62/linux/fs/msdos/file.c Wed Nov 9 14:56:35 1994 +++ linux/fs/msdos/file.c Wed Nov 9 14:20:56 1994 @@ -56,6 +56,44 @@ NULL /* smap */ }; +#define MSDOS_PREFETCH 32 +struct msdos_pre { + int file_sector;/* Next sector to read in the prefetch table */ + /* This is relative to the file, not the disk */ + struct buffer_head *bhlist[MSDOS_PREFETCH]; /* All buffers needed */ + int nblist; /* Number of buffers in bhlist */ + int nolist; /* index in bhlist */ +}; +/* + Order the prefetch of more sectors. +*/ +static void msdos_prefetch ( + struct inode *inode, + struct msdos_pre *pre, + int nb) /* How many must be prefetch at once */ +{ + struct buffer_head *bhreq[MSDOS_PREFETCH]; /* Buffers not */ + /* already read */ + int nbreq=0; /* Number of buffers in bhreq */ + int i; + for (i=0; ifile_sector); + if (sector != 0){ + struct buffer_head *bh; + PRINTK (("fsector2 %d -> %d\n",pre->file_sector-1,sector)); + pre->file_sector++; + bh = getblk(inode->i_dev,sector,SECTOR_SIZE); + if (bh == NULL) break; + pre->bhlist[pre->nblist++] = bh; + if (!bh->b_uptodate) bhreq[nbreq++] = bh; + }else{ + break; + } + } + if (nbreq > 0) ll_rw_block (READ,nbreq,bhreq); + for (i=pre->nblist; ibhlist[i] = NULL; +} + /* Read a file into user space */ @@ -66,17 +104,9 @@ int count) { char *start; - int left,offset,size,cnt; - #define MSDOS_PREFETCH 48 - struct { - int file_sector;/* Next sector to read in the prefetch table */ - /* This is relative to the file, not the disk */ - struct buffer_head *bhlist[MSDOS_PREFETCH]; /* All buffers needed */ - int nblist; /* Number of buffers in bhlist */ - int nolist; /* index in bhlist */ - int fetched_max; /* End of pre fetch area */ - }pre; + int left; int i; + struct msdos_pre pre; if (!inode) { @@ -100,9 +130,6 @@ */ PRINTK (("#### ino %ld pos %ld size %ld count %d\n",inode->i_ino,filp->f_pos,inode->i_size,count)); { - struct buffer_head *bhreq[MSDOS_PREFETCH]; /* Buffers not */ - /* already read */ - int nbreq; /* Number of buffers in bhreq */ /* We must prefetch complete block, so we must take in account the offset in the first block. @@ -112,53 +139,36 @@ pre.file_sector = filp->f_pos >> SECTOR_BITS; to_reada = count_max / SECTOR_SIZE; if (count_max & (SECTOR_SIZE-1)) to_reada++; - if (filp->f_reada){ - int min_read = read_ahead[MAJOR(inode->i_dev)]; - if (min_read > to_reada) to_reada = min_read; + if (filp->f_reada || !MSDOS_I(inode)->i_binary){ + /* Doing a read ahead on ascii file make sure we always */ + /* pre read enough, since we don't know how many blocks */ + /* we really need */ + int ahead = read_ahead[MAJOR(inode->i_dev)]; + if (ahead == 0) ahead = 8; + to_reada += ahead; } if (to_reada > MSDOS_PREFETCH) to_reada = MSDOS_PREFETCH; - nbreq = pre.nblist = 0; - for (i=0; i %d\n",pre.file_sector-1,sector)); - bh = getblk(inode->i_dev,sector,SECTOR_SIZE); - if (bh == NULL) break; - pre.bhlist[pre.nblist++] = bh; - if (!bh->b_uptodate){ - bhreq[nbreq++] = bh; - } - } - pre.fetched_max = pre.file_sector * SECTOR_SIZE; - if (nbreq > 0) ll_rw_block (READ,nbreq,bhreq); + pre.nblist = 0; + msdos_prefetch (inode,&pre,to_reada); } start = buf; pre.nolist = 0; + PRINTK (("count %d ahead %d nblist %d\n",count,read_ahead[MAJOR(inode->i_dev)],pre.nblist)); while ((left = MIN(inode->i_size-filp->f_pos,count-(buf-start))) > 0){ struct buffer_head *bh = pre.bhlist[pre.nolist]; char *data; + int size,offset; if (bh == NULL) break; - PRINTK (("file_read pos %ld nblist %d %d %d\n",filp->f_pos,pre.nblist,pre.fetched,count)); pre.bhlist[pre.nolist] = NULL; - if (left + filp->f_pos > pre.fetched_max){ - int sector; - if ((sector = msdos_smap(inode,pre.file_sector++))){ - struct buffer_head *bhreq[1]; - PRINTK (("fsector2 %d -> %d\n",pre.file_sector-1,sector)); - bhreq[0] = getblk(inode->i_dev,sector,SECTOR_SIZE); - if (bhreq[0] == NULL) break; - pre.bhlist[pre.nolist] = bhreq[0]; - if (!bhreq[0]->b_uptodate) - ll_rw_block (READ,1,bhreq); - pre.fetched_max += SECTOR_SIZE; - }else{ - /* Stop prefetching further, we have reached eof */ - pre.fetched_max = 2000000000l; - } - } pre.nolist++; - if (pre.nolist >= pre.nblist) pre.nolist = 0; + if (pre.nolist == MSDOS_PREFETCH/2){ + memcpy (pre.bhlist,pre.bhlist+MSDOS_PREFETCH/2 + ,(MSDOS_PREFETCH/2)*sizeof(pre.bhlist[0])); + pre.nblist -= MSDOS_PREFETCH/2; + msdos_prefetch (inode,&pre,MSDOS_PREFETCH/2); + pre.nolist = 0; + } + PRINTK (("file_read pos %ld nblist %d %d %d\n",filp->f_pos,pre.nblist,pre.fetched,count)); wait_on_buffer(bh); if (!bh->b_uptodate){ /* read error ? */ @@ -167,31 +177,28 @@ } offset = filp->f_pos & (SECTOR_SIZE-1); filp->f_pos += (size = MIN(SECTOR_SIZE-offset,left)); - data = bh->b_data; + data = bh->b_data + offset; if (MSDOS_I(inode)->i_binary) { - memcpy_tofs(buf,data+offset,size); + memcpy_tofs(buf,data,size); buf += size; - } - else for (cnt = size; cnt; cnt--) { - char ch; - if ((ch = *((char *) data+offset++)) == '\r') - size--; - else { - if (ch != 26) put_fs_byte(ch,buf++); - else { - filp->f_pos = inode->i_size; - brelse(bh); - break; - } + }else{ + int cnt; + for (cnt = size; cnt; cnt--) { + char ch = *data++; + if (ch == 26){ + filp->f_pos = inode->i_size; + break; + }else if (ch != '\r'){ + put_fs_byte(ch,buf++); } } + } brelse(bh); } PRINTK (("--- %d -> %d\n",count,(int)(buf-start))); for (i=0; ii_atime = CURRENT_TIME; + if (!IS_RDONLY(inode)) inode->i_atime = CURRENT_TIME; PRINTK (("file_read ret %d\n",(buf-start))); filp->f_reada = 1; /* Will be reset if a lseek is done */ return buf-start; diff -u --recursive --new-file v1.1.62/linux/fs/open.c linux/fs/open.c --- v1.1.62/linux/fs/open.c Wed Nov 9 14:56:35 1994 +++ linux/fs/open.c Mon Nov 14 08:44:21 1994 @@ -135,6 +135,7 @@ struct inode * inode; long actime,modtime; int error; + unsigned int flags = 0; struct iattr newattrs; error = namei(filename,&inode); @@ -144,17 +145,14 @@ iput(inode); return -EROFS; } + /* Don't worry, the checks are done in inode_change_ok() */ if (times) { - if ((current->fsuid != inode->i_uid) && !fsuser()) { - iput(inode); - return -EPERM; - } actime = get_fs_long((unsigned long *) ×->actime); modtime = get_fs_long((unsigned long *) ×->modtime); newattrs.ia_ctime = CURRENT_TIME; + flags = ATTR_ATIME_SET | ATTR_MTIME_SET; } else { - if ((current->fsuid != inode->i_uid) && - !permission(inode,MAY_WRITE)) { + if (!permission(inode,MAY_WRITE)) { iput(inode); return -EACCES; } @@ -162,7 +160,7 @@ } newattrs.ia_atime = actime; newattrs.ia_mtime = modtime; - newattrs.ia_valid = ATTR_CTIME | ATTR_MTIME | ATTR_ATIME; + newattrs.ia_valid = ATTR_CTIME | ATTR_MTIME | ATTR_ATIME | flags; inode->i_dirt = 1; error = notify_change(inode, &newattrs); iput(inode); diff -u --recursive --new-file v1.1.62/linux/fs/stat.c linux/fs/stat.c --- v1.1.62/linux/fs/stat.c Mon May 2 18:34:29 1994 +++ linux/fs/stat.c Tue Nov 8 09:04:46 1994 @@ -26,6 +26,8 @@ tmp.st_gid = inode->i_gid; tmp.st_rdev = inode->i_rdev; tmp.st_size = inode->i_size; + if (inode->i_pipe) + tmp.st_size = PIPE_SIZE(*inode); tmp.st_atime = inode->i_atime; tmp.st_mtime = inode->i_mtime; tmp.st_ctime = inode->i_ctime; @@ -46,6 +48,8 @@ tmp.st_gid = inode->i_gid; tmp.st_rdev = inode->i_rdev; tmp.st_size = inode->i_size; + if (inode->i_pipe) + tmp.st_size = PIPE_SIZE(*inode); tmp.st_atime = inode->i_atime; tmp.st_mtime = inode->i_mtime; tmp.st_ctime = inode->i_ctime; diff -u --recursive --new-file v1.1.62/linux/include/linux/fs.h linux/include/linux/fs.h --- v1.1.62/linux/include/linux/fs.h Wed Nov 9 14:56:36 1994 +++ linux/include/linux/fs.h Mon Nov 14 08:44:21 1994 @@ -178,6 +178,8 @@ #define ATTR_ATIME 16 #define ATTR_MTIME 32 #define ATTR_CTIME 64 +#define ATTR_ATIME_SET 128 +#define ATTR_MTIME_SET 256 /* * This is the Inode Attributes structure, used for notify_change(). It diff -u --recursive --new-file v1.1.62/linux/include/linux/ioctl.h linux/include/linux/ioctl.h --- v1.1.62/linux/include/linux/ioctl.h Wed Dec 1 14:44:15 1993 +++ linux/include/linux/ioctl.h Tue Nov 8 14:12:00 1994 @@ -23,9 +23,15 @@ #define IOC_INOUT (IOC_IN | IOC_OUT) /* both */ #define IOCSIZE_MASK 0x3fff0000 /* size (max 16k-1 bytes) */ #define IOCSIZE_SHIFT 16 /* how to get the size */ +#define IOCSIZE_MAX ((PAGE_SIZE-1)&(IOCSIZE_MASK >> IOC_SHIFT)) #define IOCCMD_MASK 0x0000ffff /* command code */ #define IOCCMD_SHIFT 0 +#define IOCPARM_MASK IOCCMD_MASK +#define IOCPARM_SHIFT IOCCMD_SHIFT +#define IOC_SIZE(cmd) (((cmd) & IOCSIZE_MASK) >> IOCSIZE_SHIFT) +#define IOCBASECMD(cmd) ((cmd) & ~IOOCPARM_MASK +#define IOCGROUP(cmd) (((cmd) >> 8) & 0xFF) /* _IO(magic, subcode); size field is zero and the * subcode determines the command. diff -u --recursive --new-file v1.1.62/linux/include/linux/kd.h linux/include/linux/kd.h --- v1.1.62/linux/include/linux/kd.h Thu Oct 13 14:07:09 1994 +++ linux/include/linux/kd.h Wed Nov 9 14:38:18 1994 @@ -1,110 +1,12 @@ #ifndef _LINUX_KD_H #define _LINUX_KD_H +#include /* 0x4B is 'K', to avoid collision with termios and vt */ -#define SWAPMONO 0x4B00 /* use mca as output device */ -#define SWAPCGA 0x4B01 /* use cga as output device */ -#define SWAPEGA 0x4B02 /* use ega as output device */ -#define SWAPVGA 0x4B03 /* use vga as output device */ -#define CONS_CURRENT 0x4B04 /* return current output device */ -#define MONO 0x01 -#define CGA 0x02 -#define EGA 0x03 - -#define SW_B40x25 0x4B05 /* 40x25 mono text (cga/ega) */ -#define SW_C40x25 0x4B06 /* 40x24 color text (cga/ega) */ -#define SW_B80x25 0x4B07 /* 80x25 mono text (cga/ega) */ -#define SW_C80x25 0x4B08 /* 80x25 color text (cga/ega) */ -#define SW_BG320 0x4B09 /* 320x200 mono graphics (cga/ega) */ -#define SW_CG320 0x4B0A /* 320x200 color graphics (cga/ega) */ -#define SW_BG640 0x4B0B /* 640x200 mono graphics (cga/ega) */ -#define SW_CG320_D 0x4B0C /* 320x200 graphics (ega mode d) */ -#define SW_CG640_E 0x4B0D /* 640x200 graphics (ega mode e) */ -#define SW_EGAMONOAPA 0x4B0E /* 640x350 graphics (ega mode f) */ -#define SW_ENH_MONOAPA2 0x4B0F /* 640x350 graphics extd mem (ega mode f*) */ -#define SW_CG640x350 0x4B10 /* 640x350 graphics (ega mode 10) */ -#define SW_ENH_CG640 0x4B11 /* 640x350 graphics extd mem (ega mode 10*) */ -#define SW_EGAMONO80x25 0x4B12 /* 80x25 mono text (ega mode 7) */ -#define SW_ENHB40x25 0x4B13 /* enhanced 40x25 mono text (ega) */ -#define SW_ENHC40x25 0x4B14 /* enhanced 40x25 color text (ega) */ -#define SW_ENHB80x25 0x4B15 /* enhanced 80x25 mono text (ega) */ -#define SW_ENHC80x25 0x4B16 /* enhanced 80x25 color text (ega) */ -#define SW_ENHB80x43 0x4B17 /* enhanced 80x43 mono text (ega) */ -#define SW_ENHC80x43 0x4B18 /* enhanced 80x43 color text (ega) */ -#define SW_MCAMODE 0x4B19 /* reinit mca */ -#define SW_ATT640 0x4B1A /* 640x400 16color */ -/* should add more vga modes, etc */ - -#define CONS_GET 0x4B1B /* get current display mode */ -#define M_B40x25 0 /* 40x25 mono (cga/ega) */ -#define M_C40x25 1 /* 40x25 color (cga/ega) */ -#define M_B80x25 2 /* 80x25 mono (cga/ega) */ -#define M_C80x25 3 /* 80x25 color (cga/ega) */ -#define M_BG320 4 /* 320x200 mono (cga/ega) */ -#define M_CG320 5 /* 320x200 color (cga/ega) */ -#define M_BG640 6 /* 640x200 mono (cga/ega) */ -#define M_EGAMONO80x25 7 /* 80x25 mono (ega) */ -#define M_CG320_D 13 /* ega mode d */ -#define M_CG640_E 14 /* ega mode e */ -#define M_EFAMONOAPA 15 /* ega mode f */ -#define M_CG640x350 16 /* ega mode 10 */ -#define M_ENHMONOAPA2 17 /* ega mode f with ext mem */ -#define M_ENH_CG640 18 /* ega mode 10* */ -#define M_ENH_B40x25 19 /* ega enh 40x25 mono */ -#define M_ENH_C40x25 20 /* ega enh 40x25 color */ -#define M_ENH_B80x25 21 /* ega enh 80x25 mono */ -#define M_ENH_C80x25 22 /* ega enh 80x25 color */ -#define M_ENH_B80x43 0x70 /* ega enh 80x43 mono */ -#define M_ENH_C80x43 0x71 /* ega enh 80x43 color */ -#define M_MCA_MODE 0xff /* monochrome adapter mode */ -#define MCA_GET 0x4B1C /* get mca display mode */ -#define CGA_GET 0x4B1D /* get cga display mode */ -#define EGA_GET 0x4B1E /* get ega display mode */ - -#define MAPCONS 0x4B1F /* map current video mem into address space */ -#define MAPMONO 0x4B20 /* map mca video mem into address space */ -#define MAPCGA 0x4B21 /* map cga video mem into address space */ -#define MAPEGA 0x4B22 /* map ega video mem into address space */ -#define MAPVGA 0x4B23 /* map vga video mem into address space */ - -struct port_io_struc { - char dir; /* direction in vs out */ - unsigned short port; - char data; -}; -#define IN_ON_PORT 0x00 -#define OUT_ON_PORT 0x01 -struct port_io_arg { - struct port_io_struc args[4]; -}; -#define MCAIO 0x4B24 /* i/o to mca video board */ -#define CGAIO 0x4B25 /* i/o to cga video board */ -#define EGAIO 0x4B26 /* i/o to ega video board */ -#define VGAIO 0x4B27 /* i/o to vga video board */ - -#define GIO_FONT8x8 0x4B28 /* gets current 8x8 font used */ -#define PIO_FONT8x8 0x4B29 /* use supplied 8x8 font */ -#define GIO_FONT8x14 0x4B2A /* gets current 8x14 font used */ -#define PIO_FONT8x14 0x4B2B /* use supplied 8x14 font */ -#define GIO_FONT8x16 0x4B2C /* gets current 8x16 font used */ -#define PIO_FONT8x16 0x4B2D /* use supplied 8x16 font */ - #define GIO_FONT 0x4B60 /* gets font in expanded form */ #define PIO_FONT 0x4B61 /* use font in expanded form */ -#define MKDIOADDR 32 /* io bitmap size from */ -struct kd_disparam { - long type; /* type of display */ - char *addr; /* display mem address */ - ushort ioaddr[MKDIOADDR]; /* valid i/o addresses */ -}; -#define KDDISPTYPE 0x4B2E /* gets display info */ -#define KD_MONO 0x01 -#define KD_HERCULES 0x02 -#define KD_CGA 0x03 -#define KD_EGA 0x04 - #define KIOCSOUND 0x4B2F /* start sound generation (0 for off) */ #define KDMKTONE 0x4B30 /* generate tone */ @@ -116,7 +18,7 @@ #define KDGKBTYPE 0x4B33 /* get keyboard type */ #define KB_84 0x01 -#define KB_101 0x02 +#define KB_101 0x02 /* this is what we always answer */ #define KB_OTHER 0x03 #define KDADDIO 0x4B34 /* add i/o port as valid */ @@ -124,42 +26,37 @@ #define KDENABIO 0x4B36 /* enable i/o to video board */ #define KDDISABIO 0x4B37 /* disable i/o to video board */ -struct kd_quemode { - int qsize; /* desired # elem in queue */ - int signo; /* signal to send when queue not empty */ - char *qaddr; /* user virt addr of queue */ -}; -#define KDQUEMODE 0x4B38 /* enable/disable special queue mode */ - -#define KDSBORDER 0x4B39 /* set screen boarder in ega text mode */ - #define KDSETMODE 0x4B3A /* set text/graphics mode */ #define KD_TEXT 0x00 #define KD_GRAPHICS 0x01 -#define KD_TEXT0 0x02 /* ? */ -#define KD_TEXT1 0x03 /* ? */ +#define KD_TEXT0 0x02 /* obsolete */ +#define KD_TEXT1 0x03 /* obsolete */ #define KDGETMODE 0x4B3B /* get current mode */ -struct kd_memloc { - char *vaddr; /* virt addr to map to */ - char *physaddr; /* phys addr to map from */ - long length; /* number of bytes */ - long ioflg; /* enable i/o if set */ -}; #define KDMAPDISP 0x4B3C /* map display into address space */ #define KDUNMAPDISP 0x4B3D /* unmap display from address space */ -#define KDVDCTYPE 0x4B3E /* return vdc controller/display info */ - -#define KIOCINFO 0x4B3F /* tell what the device is */ - typedef char scrnmap_t; #define E_TABSZ 256 #define GIO_SCRNMAP 0x4B40 /* get screen mapping from kernel */ #define PIO_SCRNMAP 0x4B41 /* put screen mapping table in kernel */ -#define GIO_ATTR 0x4B42 /* get screen attributes */ -#define GIO_COLOR 0x4B43 /* return nonzero if display is color */ +#define GIO_UNIMAP 0x4B66 /* get unicode-to-font mapping from kernel */ +struct unipair { + u_short unicode; + u_short fontpos; +}; +struct unimapdesc { + u_short entry_ct; + struct unipair *entries; +}; +#define PIO_UNIMAP 0x4B67 /* put unicode-to-font mapping in kernel */ +#define PIO_UNIMAPCLR 0x4B68 /* clear table, possibly advise hashalgorithm */ +struct unimapinit { + u_short advised_hashsize; /* 0 if no opinion */ + u_short advised_hashstep; /* 0 if no opinion */ + u_short advised_hashlevel; /* 0 if no opinion */ +}; #define K_RAW 0x00 #define K_XLATE 0x01 @@ -209,7 +106,14 @@ #define KDGKBDIACR 0x4B4A /* read kernel accent table */ #define KDSKBDIACR 0x4B4B /* write kernel accent table */ -/* note: 0x4B60 and 0x4B61 used above for GIO_FONT and PIO_FONT - 0x4B62 and 0x4B63 used above for KDGKBMETA and KDSKBMETA */ +struct kbkeycode { + unsigned int scancode, keycode; +}; +#define KDGETKEYCODE 0x4B4C /* read kernel keycode table entry */ +#define KDSETKEYCODE 0x4B4D /* write kernel keycode table entry */ + +/* note: 0x4B00-0x4B4D all have had a value at some time; + don't reuse for the time being */ +/* note: 0x4B60-0x4B68 used above */ #endif /* _LINUX_KD_H */ diff -u --recursive --new-file v1.1.62/linux/include/linux/mm.h linux/include/linux/mm.h --- v1.1.62/linux/include/linux/mm.h Wed Nov 9 14:56:37 1994 +++ linux/include/linux/mm.h Mon Nov 14 06:54:46 1994 @@ -116,6 +116,7 @@ extern int nr_swap_pages; extern int nr_free_pages; +extern int min_free_pages; #define NR_MEM_LISTS 6 diff -u --recursive --new-file v1.1.62/linux/include/linux/pci.h linux/include/linux/pci.h --- v1.1.62/linux/include/linux/pci.h Fri Aug 19 08:56:28 1994 +++ linux/include/linux/pci.h Mon Nov 14 08:42:48 1994 @@ -120,6 +120,9 @@ #define PCI_DEVICE_ID_NCR_53C820 0x0002 #define PCI_DEVICE_ID_NCR_53C825 0x0003 +#define PCI_VENDOR_ID_ADAPTEC 0x9004 +#define PCI_DEVICE_ID_ADAPTEC_2940 0x7178 + /* PCI BIOS */ extern int pcibios_present (void); diff -u --recursive --new-file v1.1.62/linux/include/linux/sbpcd.h linux/include/linux/sbpcd.h --- v1.1.62/linux/include/linux/sbpcd.h Wed Aug 10 19:26:43 1994 +++ linux/include/linux/sbpcd.h Tue Nov 8 08:17:12 1994 @@ -135,7 +135,6 @@ #define upc_bit 0x40 #define volume_bit 0x20 #define toc_bit 0x10 -#define multisession_bit 0x08 #define cd_size_bit 0x04 #define subq_bit 0x02 #define frame_size_bit 0x01 @@ -146,7 +145,6 @@ #define upc_valid (DriveStruct[d].diskstate_flags&upc_bit) #define volume_valid (DriveStruct[d].diskstate_flags&volume_bit) #define toc_valid (DriveStruct[d].diskstate_flags&toc_bit) -#define multisession_valid (DriveStruct[d].diskstate_flags&multisession_bit) #define cd_size_valid (DriveStruct[d].diskstate_flags&cd_size_bit) #define subq_valid (DriveStruct[d].diskstate_flags&subq_bit) #define frame_size_valid (DriveStruct[d].diskstate_flags&frame_size_bit) @@ -197,21 +195,24 @@ /* * drive types (firmware versions): */ -#define drv_199 0 /* <200 */ -#define drv_200 1 /* <201 */ -#define drv_201 2 /* <210 */ -#define drv_210 3 /* <211 */ -#define drv_211 4 /* <300 */ -#define drv_300 5 /* else */ -#define drv_099 0x10 /* new, <100 */ -#define drv_100 0x11 /* new, >=100 */ -#define drv_new 0x10 /* all new drives have that bit set */ -#define drv_old 0x00 /* */ - -/* - * drv_099 and drv_100 are the "new" drives - */ -#define new_drive (DriveStruct[d].drv_type&0x10) +#define drv_old 0x10 /* CR-52x family */ +#define drv_199 0x11 /* <200 */ +#define drv_200 0x12 /* <201 */ +#define drv_201 0x13 /* <210 */ +#define drv_210 0x14 /* <211 */ +#define drv_211 0x15 /* <300 */ +#define drv_300 0x16 /* >=300 */ + +#define drv_lcs 0x20 /* Longshine family */ +#define drv_260 0x21 /* LCS-7260 */ + +#define drv_new 0x40 /* CR-56x family */ +#define drv_099 0x41 /* <100 */ +#define drv_100 0x42 /* >=100 */ + +#define old_drive (DriveStruct[d].drv_type&drv_old) +#define lcs_drive (DriveStruct[d].drv_type&drv_lcs) +#define new_drive (DriveStruct[d].drv_type&drv_new) /* * audio states: @@ -370,8 +371,9 @@ fl=0: "lba"-, =2:"msf-bcd"-coded xx-xx-xx Read XA-Data: -read: 03 ll-bb-aa nn-nn 00. (??) read nn-nn blocks of 2340 bytes, - starting at block ll-bb-aa +read: 03 xx-xx-xx nn-nn fl. (??) read nn-nn blocks of 2340 bytes, + starting at block xx-xx-xx + fl=0: "lba"-, =2:"msf-bcd"-coded xx-xx-xx Read SUB_Q: 89 fl 00 00 00 00 00. (13) r0: audio status, r4-r7: lba/msf, diff -u --recursive --new-file v1.1.62/linux/init/main.c linux/init/main.c --- v1.1.62/linux/init/main.c Wed Nov 2 12:03:47 1994 +++ linux/init/main.c Mon Nov 14 10:19:42 1994 @@ -101,7 +101,7 @@ #endif CONFIG_SBPCD #ifdef CONFIG_CDU31A extern void cdu31a_setup(char *str, int *ints); -#endif CONFIG_SBPCD +#endif CONFIG_CDU31A void ramdisk_setup(char *str, int *ints); #ifdef CONFIG_SYSVIPC @@ -328,7 +328,7 @@ for (n = 0 ; devnames[n] ; n++) { int len = strlen(devnames[n]); if (!strncmp(line,devnames[n],len)) { - ROOT_DEV = devnums[n]+simple_strtoul(line+len,NULL,16); + ROOT_DEV = devnums[n]+simple_strtoul(line+len,NULL,0); break; } } diff -u --recursive --new-file v1.1.62/linux/kernel/ksyms.c linux/kernel/ksyms.c --- v1.1.62/linux/kernel/ksyms.c Wed Nov 9 14:56:37 1994 +++ linux/kernel/ksyms.c Thu Nov 10 14:07:31 1994 @@ -160,6 +160,7 @@ X(jiffies), X(xtime), X(loops_per_sec), + X(need_resched), X(kill_proc), X(kill_pg), X(kill_sl), diff -u --recursive --new-file v1.1.62/linux/mm/swap.c linux/mm/swap.c --- v1.1.62/linux/mm/swap.c Wed Nov 9 14:56:37 1994 +++ linux/mm/swap.c Mon Nov 14 06:55:05 1994 @@ -31,7 +31,7 @@ #define SWP_OFFSET(entry) ((entry) >> PAGE_SHIFT) #define SWP_ENTRY(type,offset) (((type) << 1) | ((offset) << PAGE_SHIFT)) -static int min_free_pages = 20; +int min_free_pages = 20; static int nr_swapfiles = 0; static struct wait_queue * lock_queue = NULL; @@ -586,8 +586,7 @@ unsigned long new_order = order; \ do { struct mem_list *next = queue->next; \ if (queue != next) { \ - queue->next = next->next; \ - next->next->prev = queue; \ + (queue->next = next->next)->prev = queue; \ mark_used((unsigned long) next, new_order); \ nr_free_pages -= 1 << order; \ restore_flags(flags); \ diff -u --recursive --new-file v1.1.62/linux/net/inet/icmp.c linux/net/inet/icmp.c --- v1.1.62/linux/net/inet/icmp.c Wed Nov 9 14:56:38 1994 +++ linux/net/inet/icmp.c Mon Nov 14 08:43:18 1994 @@ -24,6 +24,8 @@ * Alan Cox : Fixed the ICMP error status of net/host unreachable * Gerhard Koerting : Fixed broadcast ping properly * Ulrich Kunitz : Fixed ICMP timestamp reply + * A.N.Kuznetsov : Multihoming fixes. + * Laco Rusnak : Multihoming fixes. * * * @@ -408,7 +410,7 @@ /* * Ship it out - free it when done */ - ip_queue_xmit((struct sock *)NULL, dev, skb2, 1); + ip_queue_xmit((struct sock *)NULL, ndev, skb2, 1); /* * Free the received frame @@ -498,7 +500,7 @@ * Ship it out - free it when done */ - ip_queue_xmit((struct sock *) NULL, dev, skb2, 1); + ip_queue_xmit((struct sock *) NULL, ndev, skb2, 1); icmp_statistics.IcmpOutTimestampReps++; kfree_skb(skb, FREE_READ); } @@ -581,7 +583,7 @@ icmphr->checksum = ip_compute_csum((unsigned char *)icmphr, len); /* Ship it out - free it when done */ - ip_queue_xmit((struct sock *)NULL, dev, skb2, 1); + ip_queue_xmit((struct sock *)NULL, ndev, skb2, 1); skb->sk = NULL; kfree_skb(skb, FREE_READ); diff -u --recursive --new-file v1.1.62/linux/net/inet/tcp.c linux/net/inet/tcp.c --- v1.1.62/linux/net/inet/tcp.c Thu Nov 3 17:53:31 1994 +++ linux/net/inet/tcp.c Mon Nov 14 08:43:31 1994 @@ -93,6 +93,7 @@ * fix a race and a signal problem with * accept() and async I/O. * Alan Cox : Relaxed the rules on tcp_sendto(). + * Yury Shevchuk : Really fixed accept() blocking problem. * * * To Fix: @@ -244,7 +245,7 @@ return NULL; do { - if(p->sk->state>=TCP_ESTABLISHED) + if(p->sk->state == TCP_ESTABLISHED || p->sk->state >= TCP_FIN_WAIT1) return p; p=p->next; } @@ -1885,7 +1886,7 @@ t1->psh = 0; t1->doff = sizeof(*t1)/4; tcp_send_check(t1, saddr, daddr, sizeof(*t1), NULL); - prot->queue_xmit(NULL, dev, buff, 1); + prot->queue_xmit(NULL, ndev, buff, 1); tcp_statistics.TcpOutSegs++; } @@ -2211,7 +2212,7 @@ ptr[3] =(newsk->mtu) & 0xff; tcp_send_check(t1, daddr, saddr, sizeof(*t1)+4, newsk); - newsk->prot->queue_xmit(newsk, dev, buff, 0); + newsk->prot->queue_xmit(newsk, ndev, buff, 0); reset_timer(newsk, TIME_WRITE , TCP_TIMEOUT_INIT); skb->sk = newsk;