Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
6caf23d5
Commit
6caf23d5
authored
Nov 23, 2007
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import 1.3.52
parent
85ed1260
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
497 additions
and
183 deletions
+497
-183
Documentation/Configure.help
Documentation/Configure.help
+70
-13
Makefile
Makefile
+14
-2
arch/alpha/config.in
arch/alpha/config.in
+8
-4
arch/alpha/defconfig
arch/alpha/defconfig
+6
-5
arch/i386/config.in
arch/i386/config.in
+8
-4
arch/i386/defconfig
arch/i386/defconfig
+8
-5
drivers/block/ide-cd.c
drivers/block/ide-cd.c
+150
-80
drivers/block/ide.h
drivers/block/ide.h
+46
-1
drivers/net/net_init.c
drivers/net/net_init.c
+2
-0
drivers/pci/pci.c
drivers/pci/pci.c
+11
-0
drivers/scsi/scsi.c
drivers/scsi/scsi.c
+6
-0
drivers/scsi/sg.c
drivers/scsi/sg.c
+12
-1
drivers/scsi/sr.c
drivers/scsi/sr.c
+2
-0
fs/buffer.c
fs/buffer.c
+6
-0
fs/exec.c
fs/exec.c
+3
-1
fs/namei.c
fs/namei.c
+4
-13
fs/open.c
fs/open.c
+12
-6
fs/proc/Makefile
fs/proc/Makefile
+6
-1
fs/proc/array.c
fs/proc/array.c
+8
-4
fs/proc/inode.c
fs/proc/inode.c
+3
-0
fs/proc/root.c
fs/proc/root.c
+11
-4
fs/proc/scsi.c
fs/proc/scsi.c
+3
-3
fs/super.c
fs/super.c
+2
-0
include/linux/fs.h
include/linux/fs.h
+1
-1
include/linux/pci.h
include/linux/pci.h
+17
-3
init/main.c
init/main.c
+2
-0
kernel/Makefile
kernel/Makefile
+3
-0
kernel/ksyms.c
kernel/ksyms.c
+5
-6
kernel/module.c
kernel/module.c
+33
-0
mm/swap.c
mm/swap.c
+2
-2
net/ipv4/tcp.c
net/ipv4/tcp.c
+1
-2
scripts/Configure
scripts/Configure
+32
-22
No files found.
Documentation/Configure.help
View file @
6caf23d5
...
...
@@ -317,13 +317,20 @@ CONFIG_M486
not sure, say N; This option will make the kernel use some
instructions that are only available on 486+ machines.
Enable loadable module support
CONFIG_MODULES
Kernel modules are small pieces of compiled code which can be
inserted in or removed from the running kernel, using the
programs insmod and rmmod. This is described in the file
Documentation/modules.txt. Modules can be device drivers, file
systems, binary executable formats, and so on. If you think that
you may want to make use of modules with this kernel in the future,
then say Y here.
Set version information on all symbols for modules
CONFIG_MODVERSIONS
Kernel modules are pieces of code which can be inserted in or
removed from the running kernel, using the programs insmod and
rmmod. This is described in the file
Documentation/modules.txt. Usually, modules have to be recompiled
whenever you switch to a new kernel. Enabling this option allows you
Usually, modules have to be recompiled whenever you
switch to a new kernel. Enabling this option allows you
to keep using the same modules even after compiling a new kernel;
this requires the program modprobe. All the software needed for
module support is in the modules package in
...
...
@@ -813,14 +820,16 @@ CONFIG_SCSI_U14_34F
Future Domain 16xx SCSI support
CONFIG_SCSI_FUTURE_DOMAIN
This is support for an SCSI host adaptor. It is explained in section
3.7 of the SCSI-HOWTO, available via ftp (user: anonymous) at
sunsite.unc.edu:/pub/Linux/docs/HOWTO. If it doesn't work out of
the box, you may have to change some settings in
drivers/scsi/fdomain.h. This driver is also available as a module (
= code which can be inserted in and removed from the running kernel
whenever you want). If you want to compile it as a module, say M
here and read Documentation/modules.txt.
This is support for Future Domain's 16-bit SCSI host adaptors
(TMC-1660/1680, TMC-1650/1670, TMC-3260) and other adaptors based on the
Future Domain chipsets (Quantum ISA-200S, ISA-250MG; and at least one IBM
board). It is explained in section 3.7 of the SCSI-HOWTO, available via
ftp (user: anonymous) at sunsite.unc.edu:/pub/Linux/docs/HOWTO. If it
doesn't work out of the box, you may have to change some settings in
drivers/scsi/fdomain.h. This driver is also available as a module ( =
code which can be inserted in and removed from the running kernel
whenever you want). If you want to compile it as a module, say M here and
read Documentation/modules.txt.
Generic NCR5380 SCSI support
CONFIG_SCSI_GENERIC_NCR5380
...
...
@@ -2183,6 +2192,54 @@ CONFIG_SUN_ZS
This driver does not exist at this point, so you might as well say
N.
Advanced Power Management
CONFIG_APM
This driver provides APM support on machines with an APM-compliant 32-bit
BIOS. Specifically, the time will be reset after a USER RESUME
operation, the /proc/apm device will provide battery status information,
and ioctls are provided to put the machine in STANDBY or SUSPEND mode.
This is most useful on laptops with a compliant BIOS.
Ignore USER SUSPEND
CONFIG_APM_IGNORE_USER_SUSPEND
This option will ignore USER SUSPEND requests. On machines with a
compliant APM BIOS, this is never what you want to do. However, this is
necessary on the NEC Versa M series, which generates these when resuming
from SYSTEM SUSPEND. Enabling this on other laptops may cause the laptop
to generate a CRITICAL SUSPEND when an appropriate USER SUSPEND is
ignored -- this may prevent the APM driver from updating the system time
on a RESUME.
Enable APM features
CONFIG_APM_DO_ENABLE
Enable APM features at boot time. From page 36 of the APM BIOS
specification: "When disabled, the APM BIOS does not automatically power
manage devices, enter the Standby State, enter the Suspend State, or take
power saving steps in response to CPU Idle calls." This driver will make
CPU Idle calls when Linux is idle (unless this feature is turned off --
see below). This should always save battery power, but more complicated
APM features will be dependent on your BIOS implementation. You may need
to turn this option off if your computer hangs at boot time when using
APM support, or if it beeps continuously instead of suspending. Turn
this off if you have a NEC UltraLite Versa 33/C or a Toshiba T400CDT.
This is off by default since most machines do fine without this feature.
Do CPU IDLE calls
CONFIG_APM_CPU_IDLE
Enable calls to APM CPU Idle/CPU Busy inside the kernel's idle loop. On
some machines, this can activate improved power savings, such as a slowed
CPU clock rate, when the machine is idle. These idle call is made after
the idle loop has run for some length of time (e.g., 333 mS). On some
machines, this will cause a hang at boot time or whenever the CPU becomes
idle. (On machines with more than one CPU, this option does nothing.)
Black display
CONFIG_APM_DISPLAY_BLANK
Enable console blanking using the APM. Some laptops can use this to turn
off the LCD backlight when the VC screen blanker blanks the screen. Note
that this is only used by the VC screen blanker, and won't turn off the
backlight when using X11.
Sound card support
CONFIG_SOUND
If you have a Sound Card in your Computer, i.e. if it can say more
...
...
Makefile
View file @
6caf23d5
VERSION
=
1
PATCHLEVEL
=
3
SUBLEVEL
=
5
1
SUBLEVEL
=
5
2
ARCH
=
i386
...
...
@@ -243,7 +243,7 @@ net: dummy
$(MAKE)
linuxsubdirs
SUBDIRS
=
net
MODFLAGS
=
-DMODULE
ifdef
CONFIG_MODULES
ifdef
CONFIG_MODVERSIONS
MODFLAGS
+=
-DMODVERSIONS
-include
$(HPATH)
/linux/modversions.h
endif
...
...
@@ -273,6 +273,18 @@ modules_install:
rm
-f
.misc .allmods
;
\
)
# modules disabled....
else
modules modules_install
:
dummy
@
echo
@
echo
"The present kernel configuration has modules disabled."
@
echo
"Type 'make config' and enable loadable module support."
@
echo
"Then build a kernel with module support enabled."
@
echo
@
exit
1
endif
clean
:
archclean
rm
-f
kernel/ksyms.lst include/linux/compile.h
rm
-f
core
`
find
.
-name
'*.[oas]'
-print
`
...
...
arch/alpha/config.in
View file @
6caf23d5
...
...
@@ -9,6 +9,14 @@ unset CONFIG_CROSSCOMPILE CONFIG_NATIVE
unset CONFIG_PCI CONFIG_ALPHA_LCA CONFIG_ALPHA_APECS
unset CONFIG_ALPHA_NEED_ROUNDING_EMULATION
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Enable loadable module support' CONFIG_MODULES
if [ "$CONFIG_MODULES" = "y" ]; then
MODULES=y
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
fi
mainmenu_option next_comment
comment 'General setup'
...
...
@@ -50,10 +58,6 @@ bool 'Networking support' CONFIG_NET
bool 'System V IPC' CONFIG_SYSVIPC
tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
source drivers/block/Config.in
if [ "$CONFIG_NET" = "y" ]; then
...
...
arch/alpha/defconfig
View file @
6caf23d5
...
...
@@ -2,6 +2,12 @@
# Automatically generated make config: don't edit
#
#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
#
# General setup
#
...
...
@@ -23,11 +29,6 @@ CONFIG_NET=y
CONFIG_SYSVIPC=y
# CONFIG_BINFMT_ELF is not set
#
# Loadable module support
#
# CONFIG_MODVERSIONS is not set
#
# block devices
#
...
...
arch/i386/config.in
View file @
6caf23d5
...
...
@@ -4,6 +4,14 @@
#
mainmenu_name "Linux Kernel Configuration"
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Enable loadable module support' CONFIG_MODULES
if [ "$CONFIG_MODULES" = "y" ]; then
MODULES=y
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
fi
mainmenu_option next_comment
comment 'General setup'
...
...
@@ -24,10 +32,6 @@ fi
bool 'Use 486-specific optimizations (does NOT work on i386)' CONFIG_M486
#fi
mainmenu_option next_comment
comment 'Loadable module support'
bool 'Set version information on all symbols for modules' CONFIG_MODVERSIONS
source drivers/block/Config.in
if [ "$CONFIG_NET" = "y" ]; then
...
...
arch/i386/defconfig
View file @
6caf23d5
...
...
@@ -2,6 +2,12 @@
# Automatically generated make config: don't edit
#
#
# Loadable module support
#
CONFIG_MODULES=y
# CONFIG_MODVERSIONS is not set
#
# General setup
#
...
...
@@ -15,11 +21,6 @@ CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
CONFIG_M486=y
#
# Loadable module support
#
# CONFIG_MODVERSIONS is not set
#
# block devices
#
...
...
@@ -98,6 +99,7 @@ CONFIG_EL3=y
#
# Filesystems
#
# CONFIG_QUOTA is not set
CONFIG_MINIX_FS=y
# CONFIG_EXT_FS is not set
CONFIG_EXT2_FS=y
...
...
@@ -124,6 +126,7 @@ CONFIG_ISO9660_FS=y
# CONFIG_ATIXL_BUSMOUSE is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_APM is not set
# CONFIG_WATCHDOG is not set
#
# Sound
...
...
drivers/block/ide-cd.c
View file @
6caf23d5
...
...
@@ -71,8 +71,14 @@
* Fix transfers with odd bytelengths.
* 3.03 Oct 27, 1995 -- Some Creative drives have an id of just `CD'.
* `DCI-2S10' drives are broken too.
* 3.04 Nov 20, 1995 -- So are Vert
r
os drives.
* 3.04 Nov 20, 1995 -- So are Vertos drives.
* 3.05 Dec 1, 1995 -- Changes to go with overhaul of ide.c and ide-tape.c
* 3.06 Dec 16, 1995 -- Add support needed for partitions.
* More workarounds for Vertos bugs (based on patches
* from Holger Dietze <dietze@aix520.informatik.uni-leipzig.de>).
* Try to eliminate byteorder assumptions.
* Use atapi_cdrom_subchnl struct definition.
* Add STANDARD_ATAPI compilation option.
*
* NOTE: Direct audio reads will only work on some types of drive.
* So far, i've received reports of success for Sony and Toshiba drives.
...
...
@@ -100,10 +106,13 @@
#include <linux/cdrom.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/byteorder.h>
#define _IDE_CD_C
/* used in blk.h */
#include "ide.h"
/* Turn this on to have the driver print out the meanings of the
ATAPI error codes. This will use up additional kernel-space
memory, though. */
...
...
@@ -112,6 +121,18 @@
#define VERBOSE_IDE_CD_ERRORS 0
#endif
/* Turning this on will remove code to work around various nonstandard
ATAPI implementations. If you know your drive follows the standard,
this will give you a slightly smaller kernel. */
#ifndef STANDARD_ATAPI
#define STANDARD_ATAPI 0
#endif
/************************************************************************/
#define SECTOR_SIZE 512
#define SECTOR_BITS 9
#define SECTORS_PER_FRAME (CD_FRAMESIZE / SECTOR_SIZE)
...
...
@@ -159,13 +180,17 @@
struct
ide_cd_config_flags
{
unsigned
drq_interrupt
:
1
;
/* Device sends an interrupt when ready
for a packet command. */
unsigned
no_doorlock
:
1
;
/* Drive cannot lock the door. */
#if ! STANDARD_ATAPI
unsigned
no_playaudio12
:
1
;
/* The PLAYAUDIO12 command is not supported. */
unsigned
no_lba_toc
:
1
;
/* Drive cannot return TOC info in LBA format. */
unsigned
msf_as_bcd
:
1
;
/* Drive uses BCD in PLAYAUDIO_MSF. */
unsigned
no_doorlock
:
1
;
/* Drive cannot lock the door. */
unsigned
playmsf_uses_bcd
:
1
;
/* Drive uses BCD in PLAYAUDIO_MSF. */
unsigned
old_readcd
:
1
;
/* Drive uses old READ CD opcode. */
unsigned
reserved
:
2
;
unsigned
vertos_lossage
:
1
;
/* Drive is a Vertos 300,
and likes to speak BCD. */
#endif
/* not STANDARD_ATAPI */
unsigned
reserved
:
1
;
};
#define CDROM_CONFIG_FLAGS(drive) ((struct ide_cd_config_flags *)&((drive)->bios_sect))
...
...
@@ -1123,19 +1148,7 @@ static void cdrom_start_read_continuation (ide_drive_t *drive)
pc
.
c
[
0
]
=
READ_10
;
pc
.
c
[
7
]
=
(
nframes
>>
8
);
pc
.
c
[
8
]
=
(
nframes
&
0xff
);
/* Write the sector address into the command image. */
{
union
{
struct
{
unsigned
char
b0
,
b1
,
b2
,
b3
;}
b
;
struct
{
unsigned
long
l0
;}
l
;
}
conv
;
conv
.
l
.
l0
=
frame
;
pc
.
c
[
2
]
=
conv
.
b
.
b3
;
pc
.
c
[
3
]
=
conv
.
b
.
b2
;
pc
.
c
[
4
]
=
conv
.
b
.
b1
;
pc
.
c
[
5
]
=
conv
.
b
.
b0
;
}
*
(
int
*
)(
&
pc
.
c
[
2
])
=
htonl
(
frame
);
/* Send the command to the drive and return. */
(
void
)
cdrom_transfer_packet_command
(
drive
,
pc
.
c
,
sizeof
(
pc
.
c
),
...
...
@@ -1149,6 +1162,15 @@ static void cdrom_start_read_continuation (ide_drive_t *drive)
static
void
cdrom_start_read
(
ide_drive_t
*
drive
,
unsigned
int
block
)
{
struct
request
*
rq
=
HWGROUP
(
drive
)
->
rq
;
int
minor
=
MINOR
(
rq
->
rq_dev
);
/* If the request is relative to a partition, fix it up to refer to the
absolute address. */
if
((
minor
&
PARTN_MASK
)
!=
0
)
{
rq
->
sector
=
block
;
minor
&=
~
PARTN_MASK
;
rq
->
rq_dev
=
MKDEV
(
MAJOR
(
rq
->
rq_dev
),
minor
);
}
/* We may be retrying this request after an error.
Fix up any weirdness which might be present in the request packet. */
...
...
@@ -1439,34 +1461,20 @@ void ide_do_rw_cdrom (ide_drive_t *drive, unsigned long block)
* can also be NULL, in which case no sense information is returned.
*/
static
inline
void
byte_swap_word
(
unsigned
short
*
x
)
{
char
*
c
=
(
char
*
)
x
;
char
d
=
c
[
0
];
c
[
0
]
=
c
[
1
];
c
[
1
]
=
d
;
}
static
inline
void
byte_swap_long
(
unsigned
*
x
)
#if ! STANDARD_ATAPI
static
int
bin2bcd
(
int
x
)
{
char
*
c
=
(
char
*
)
x
;
char
d
=
c
[
0
];
c
[
0
]
=
c
[
3
];
c
[
3
]
=
d
;
d
=
c
[
1
];
c
[
1
]
=
c
[
2
];
c
[
2
]
=
d
;
return
(
x
%
10
)
|
((
x
/
10
)
<<
4
);
}
static
int
b
in2bcd
(
int
x
)
int
b
cd2bin
(
int
x
)
{
return
(
x
%
10
)
|
((
x
/
10
)
<<
4
);
return
(
x
>>
4
)
*
10
+
(
x
&
0x0f
);
}
#endif
/* not STANDARD_ATAPI */
static
inline
...
...
@@ -1616,8 +1624,7 @@ cdrom_read_capacity (ide_drive_t *drive, unsigned *capacity,
stat
=
cdrom_queue_packet_command
(
drive
,
&
pc
);
if
(
stat
==
0
)
{
byte_swap_long
(
&
capbuf
.
lba
);
*
capacity
=
capbuf
.
lba
;
*
capacity
=
ntohl
(
capbuf
.
lba
);
}
return
stat
;
...
...
@@ -1680,8 +1687,12 @@ cdrom_read_toc (ide_drive_t *drive,
if
(
CDROM_STATE_FLAGS
(
drive
)
->
toc_valid
)
return
0
;
#if STANDARD_ATAPI
msf_flag
=
0
;
#else
/* not STANDARD_ATAPI */
/* Some drives can't return TOC data in LBA format. */
msf_flag
=
(
CDROM_CONFIG_FLAGS
(
drive
)
->
no_lba_toc
);
#endif
/* not STANDARD_ATAPI */
/* First read just the header, so we know how long the TOC is. */
stat
=
cdrom_read_tocentry
(
drive
,
0
,
msf_flag
,
0
,
(
char
*
)
&
toc
->
hdr
,
...
...
@@ -1690,6 +1701,15 @@ cdrom_read_toc (ide_drive_t *drive,
reqbuf
);
if
(
stat
)
return
stat
;
#if ! STANDARD_ATAPI
if
(
CDROM_CONFIG_FLAGS
(
drive
)
->
vertos_lossage
)
{
toc
->
hdr
.
first_track
=
bcd2bin
(
toc
->
hdr
.
first_track
);
toc
->
hdr
.
last_track
=
bcd2bin
(
toc
->
hdr
.
last_track
);
/* hopefully the length is not BCD, too ;-| */
}
#endif
/* not STANDARD_ATAPI */
ntracks
=
toc
->
hdr
.
last_track
-
toc
->
hdr
.
first_track
+
1
;
if
(
ntracks
<=
0
)
return
-
EIO
;
if
(
ntracks
>
MAX_TRACKS
)
ntracks
=
MAX_TRACKS
;
...
...
@@ -1700,16 +1720,36 @@ cdrom_read_toc (ide_drive_t *drive,
(
ntracks
+
1
)
*
sizeof
(
struct
atapi_toc_entry
),
reqbuf
);
if
(
stat
)
return
stat
;
byte_swap_word
(
&
toc
->
hdr
.
toc_length
);
toc
->
hdr
.
toc_length
=
ntohs
(
toc
->
hdr
.
toc_length
);
#if ! STANDARD_ATAPI
if
(
CDROM_CONFIG_FLAGS
(
drive
)
->
vertos_lossage
)
{
toc
->
hdr
.
first_track
=
bcd2bin
(
toc
->
hdr
.
first_track
);
toc
->
hdr
.
last_track
=
bcd2bin
(
toc
->
hdr
.
last_track
);
/* hopefully the length is not BCD, too ;-| */
}
#endif
/* not STANDARD_ATAPI */
for
(
i
=
0
;
i
<=
ntracks
;
i
++
)
{
#if ! STANDARD_ATAPI
if
(
msf_flag
)
{
byte
*
adr
=
(
byte
*
)
&
(
toc
->
ent
[
i
].
lba
);
toc
->
ent
[
i
].
lba
=
msf_to_lba
(
adr
[
1
],
adr
[
2
],
adr
[
3
]);
if
(
CDROM_CONFIG_FLAGS
(
drive
)
->
vertos_lossage
)
{
toc
->
ent
[
i
].
track
=
bcd2bin
(
toc
->
ent
[
i
].
track
);
toc
->
ent
[
i
].
addr
.
msf
.
m
=
bcd2bin
(
toc
->
ent
[
i
].
addr
.
msf
.
m
);
toc
->
ent
[
i
].
addr
.
msf
.
s
=
bcd2bin
(
toc
->
ent
[
i
].
addr
.
msf
.
s
);
toc
->
ent
[
i
].
addr
.
msf
.
f
=
bcd2bin
(
toc
->
ent
[
i
].
addr
.
msf
.
f
);
}
toc
->
ent
[
i
].
addr
.
lba
=
msf_to_lba
(
toc
->
ent
[
i
].
addr
.
msf
.
m
,
toc
->
ent
[
i
].
addr
.
msf
.
s
,
toc
->
ent
[
i
].
addr
.
msf
.
f
);
}
else
byte_swap_long
(
&
toc
->
ent
[
i
].
lba
);
#endif
/* not STANDARD_ATAPI */
toc
->
ent
[
i
].
addr
.
lba
=
ntohl
(
toc
->
ent
[
i
].
addr
.
lba
);
}
/* Read the multisession information. */
...
...
@@ -1717,16 +1757,15 @@ cdrom_read_toc (ide_drive_t *drive,
(
char
*
)
&
ms_tmp
,
sizeof
(
ms_tmp
),
reqbuf
);
if
(
stat
)
return
stat
;
#if ! STANDARD_ATAPI
if
(
msf_flag
)
{
byte
*
adr
=
(
byte
*
)
&
(
ms_tmp
.
ent
.
lba
);
toc
->
last_session_lba
=
msf_to_lba
(
adr
[
1
],
adr
[
2
],
adr
[
3
]);
}
toc
->
last_session_lba
=
msf_to_lba
(
ms_tmp
.
ent
.
addr
.
msf
.
m
,
ms_tmp
.
ent
.
addr
.
msf
.
s
,
ms_tmp
.
ent
.
addr
.
msf
.
f
);
else
{
byte_swap_long
(
&
ms_tmp
.
ent
.
lba
);
toc
->
last_session_lba
=
ms_tmp
.
ent
.
lba
;
}
#endif
/* not STANDARD_ATAPI */
toc
->
last_session_lba
=
ntohl
(
ms_tmp
.
ent
.
addr
.
lba
);
toc
->
xa_flag
=
(
ms_tmp
.
hdr
.
first_track
!=
ms_tmp
.
hdr
.
last_track
);
/* Now try to get the total cdrom capacity. */
...
...
@@ -1816,15 +1855,14 @@ cdrom_play_lba_range_play12 (ide_drive_t *drive, int lba_start, int lba_end,
pc
.
sense_data
=
reqbuf
;
pc
.
c
[
0
]
=
SCMD_PLAYAUDIO12
;
*
(
int
*
)(
&
pc
.
c
[
2
])
=
lba_start
;
*
(
int
*
)(
&
pc
.
c
[
6
])
=
lba_end
-
lba_start
;
byte_swap_long
((
int
*
)(
&
pc
.
c
[
2
]));
byte_swap_long
((
int
*
)(
&
pc
.
c
[
6
]));
*
(
int
*
)(
&
pc
.
c
[
2
])
=
htonl
(
lba_start
);
*
(
int
*
)(
&
pc
.
c
[
6
])
=
htonl
(
lba_end
-
lba_start
);
return
cdrom_queue_packet_command
(
drive
,
&
pc
);
}
#if ! STANDARD_ATAPI
static
int
cdrom_play_lba_range_msf
(
ide_drive_t
*
drive
,
int
lba_start
,
int
lba_end
,
struct
atapi_request_sense
*
reqbuf
)
...
...
@@ -1838,7 +1876,7 @@ cdrom_play_lba_range_msf (ide_drive_t *drive, int lba_start, int lba_end,
lba_to_msf
(
lba_start
,
&
pc
.
c
[
3
],
&
pc
.
c
[
4
],
&
pc
.
c
[
5
]);
lba_to_msf
(
lba_end
-
1
,
&
pc
.
c
[
6
],
&
pc
.
c
[
7
],
&
pc
.
c
[
8
]);
if
(
CDROM_CONFIG_FLAGS
(
drive
)
->
msf_a
s_bcd
)
if
(
CDROM_CONFIG_FLAGS
(
drive
)
->
playmsf_use
s_bcd
)
{
pc
.
c
[
3
]
=
bin2bcd
(
pc
.
c
[
3
]);
pc
.
c
[
4
]
=
bin2bcd
(
pc
.
c
[
4
]);
...
...
@@ -1850,6 +1888,7 @@ cdrom_play_lba_range_msf (ide_drive_t *drive, int lba_start, int lba_end,
return
cdrom_queue_packet_command
(
drive
,
&
pc
);
}
#endif
/* not STANDARD_ATAPI */
/* Play audio starting at LBA LBA_START and finishing with the
...
...
@@ -1869,9 +1908,11 @@ cdrom_play_lba_range (ide_drive_t *drive, int lba_start, int lba_end,
great. Otherwise, if the drive reports an illegal command code,
try PLAYAUDIO_MSF using the NEC 260-style bcd parameters. */
#if ! STANDARD_ATAPI
if
(
CDROM_CONFIG_FLAGS
(
drive
)
->
no_playaudio12
)
return
cdrom_play_lba_range_msf
(
drive
,
lba_start
,
lba_end
,
reqbuf
);
else
#endif
/* not STANDARD_ATAPI */
{
int
stat
;
struct
atapi_request_sense
my_reqbuf
;
...
...
@@ -1882,6 +1923,7 @@ cdrom_play_lba_range (ide_drive_t *drive, int lba_start, int lba_end,
stat
=
cdrom_play_lba_range_play12
(
drive
,
lba_start
,
lba_end
,
reqbuf
);
if
(
stat
==
0
)
return
0
;
#if ! STANDARD_ATAPI
/* It failed. Try to find out why. */
if
(
reqbuf
->
sense_key
==
ILLEGAL_REQUEST
&&
reqbuf
->
asc
==
0x20
)
{
...
...
@@ -1890,9 +1932,10 @@ cdrom_play_lba_range (ide_drive_t *drive, int lba_start, int lba_end,
printk
(
"%s: Drive does not support PLAYAUDIO12; "
"trying PLAYAUDIO_MSF
\n
"
,
drive
->
name
);
CDROM_CONFIG_FLAGS
(
drive
)
->
no_playaudio12
=
1
;
CDROM_CONFIG_FLAGS
(
drive
)
->
msf_a
s_bcd
=
1
;
CDROM_CONFIG_FLAGS
(
drive
)
->
playmsf_use
s_bcd
=
1
;
return
cdrom_play_lba_range_msf
(
drive
,
lba_start
,
lba_end
,
reqbuf
);
}
#endif
/* not STANDARD_ATAPI */
/* Failed for some other reason. Give up. */
return
stat
;
...
...
@@ -1946,19 +1989,21 @@ cdrom_read_block (ide_drive_t *drive, int format, int lba,
pc
.
buffer
=
buf
;
pc
.
buflen
=
buflen
;
#if ! STANDARD_ATAPI
if
(
CDROM_CONFIG_FLAGS
(
drive
)
->
old_readcd
)
pc
.
c
[
0
]
=
0xd4
;
else
#endif
/* not STANDARD_ATAPI */
pc
.
c
[
0
]
=
READ_CD
;
pc
.
c
[
1
]
=
(
format
<<
2
);
*
(
int
*
)(
&
pc
.
c
[
2
])
=
lba
;
byte_swap_long
((
int
*
)(
&
pc
.
c
[
2
]));
*
(
int
*
)(
&
pc
.
c
[
2
])
=
htonl
(
lba
);
pc
.
c
[
8
]
=
1
;
/* one block */
pc
.
c
[
9
]
=
0x10
;
stat
=
cdrom_queue_packet_command
(
drive
,
&
pc
);
#if ! STANDARD_ATAPI
/* If the drive doesn't recognize the READ CD opcode, retry the command
with an older opcode for that command. */
if
(
stat
&&
reqbuf
->
sense_key
==
ILLEGAL_REQUEST
&&
reqbuf
->
asc
==
0x20
&&
...
...
@@ -1969,6 +2014,7 @@ cdrom_read_block (ide_drive_t *drive, int format, int lba,
CDROM_CONFIG_FLAGS
(
drive
)
->
old_readcd
=
1
;
return
cdrom_read_block
(
drive
,
format
,
lba
,
buf
,
buflen
,
reqbuf
);
}
#endif
/* not STANDARD_ATAPI */
return
stat
;
}
...
...
@@ -2056,8 +2102,8 @@ int ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode,
if
(
stat
)
return
stat
;
if
(
ti
.
cdti_trk1
!=
CDROM_LEADOUT
)
++
last_toc
;
lba_start
=
first_toc
->
lba
;
lba_end
=
last_toc
->
lba
;
lba_start
=
first_toc
->
addr
.
lba
;
lba_end
=
last_toc
->
addr
.
lba
;
if
(
lba_end
<=
lba_start
)
return
-
EINVAL
;
...
...
@@ -2108,13 +2154,13 @@ int ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode,
if
(
tocentry
.
cdte_format
==
CDROM_MSF
)
{
/* convert to MSF */
lba_to_msf
(
toce
->
lba
,
lba_to_msf
(
toce
->
addr
.
lba
,
&
tocentry
.
cdte_addr
.
msf
.
minute
,
&
tocentry
.
cdte_addr
.
msf
.
second
,
&
tocentry
.
cdte_addr
.
msf
.
frame
);
}
else
tocentry
.
cdte_addr
.
lba
=
toce
->
lba
;
tocentry
.
cdte_addr
.
lba
=
toce
->
addr
.
lba
;
memcpy_tofs
((
void
*
)
arg
,
&
tocentry
,
sizeof
(
tocentry
));
...
...
@@ -2123,7 +2169,7 @@ int ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode,
case
CDROMSUBCHNL
:
{
char
buffer
[
16
]
;
struct
atapi_cdrom_subchnl
scbuf
;
int
stat
,
abs_lba
,
rel_lba
;
struct
cdrom_subchnl
subchnl
;
...
...
@@ -2134,13 +2180,27 @@ int ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode,
memcpy_fromfs
(
&
subchnl
,
(
void
*
)
arg
,
sizeof
(
subchnl
));
stat
=
cdrom_read_subchannel
(
drive
,
buffer
,
sizeof
(
buffer
),
NULL
);
stat
=
cdrom_read_subchannel
(
drive
,
(
char
*
)
&
scbuf
,
sizeof
(
scbuf
),
NULL
);
if
(
stat
)
return
stat
;
abs_lba
=
*
(
int
*
)
&
buffer
[
8
];
rel_lba
=
*
(
int
*
)
&
buffer
[
12
];
byte_swap_long
(
&
abs_lba
);
byte_swap_long
(
&
rel_lba
);
#if ! STANDARD_ATAPI
if
(
CDROM_CONFIG_FLAGS
(
drive
)
->
vertos_lossage
)
{
abs_lba
=
msf_to_lba
(
bcd2bin
(
scbuf
.
acdsc_absaddr
.
msf
.
minute
),
bcd2bin
(
scbuf
.
acdsc_absaddr
.
msf
.
second
),
bcd2bin
(
scbuf
.
acdsc_absaddr
.
msf
.
frame
));
rel_lba
=
msf_to_lba
(
bcd2bin
(
scbuf
.
acdsc_reladdr
.
msf
.
minute
),
bcd2bin
(
scbuf
.
acdsc_reladdr
.
msf
.
second
),
bcd2bin
(
scbuf
.
acdsc_reladdr
.
msf
.
frame
));
scbuf
.
acdsc_trk
=
bcd2bin
(
scbuf
.
acdsc_trk
);
}
else
#endif
/* not STANDARD_ATAPI */
{
abs_lba
=
ntohl
(
scbuf
.
acdsc_absaddr
.
lba
);
rel_lba
=
ntohl
(
scbuf
.
acdsc_reladdr
.
lba
);
}
if
(
subchnl
.
cdsc_format
==
CDROM_MSF
)
{
...
...
@@ -2159,10 +2219,10 @@ int ide_cdrom_ioctl (ide_drive_t *drive, struct inode *inode,
subchnl
.
cdsc_reladdr
.
lba
=
rel_lba
;
}
subchnl
.
cdsc_audiostatus
=
buffer
[
1
]
;
subchnl
.
cdsc_ctrl
=
buffer
[
5
]
&
0xf
;
subchnl
.
cdsc_trk
=
buffer
[
6
]
;
subchnl
.
cdsc_ind
=
buffer
[
7
]
;
subchnl
.
cdsc_audiostatus
=
scbuf
.
acdsc_audiostatus
;
subchnl
.
cdsc_ctrl
=
scbuf
.
acdsc_ctrl
;
subchnl
.
cdsc_trk
=
scbuf
.
acdsc_trk
;
subchnl
.
cdsc_ind
=
scbuf
.
acdsc_ind
;
memcpy_tofs
((
void
*
)
arg
,
&
subchnl
,
sizeof
(
subchnl
));
...
...
@@ -2517,12 +2577,15 @@ void ide_cdrom_setup (ide_drive_t *drive)
CDROM_STATE_FLAGS
(
drive
)
->
eject_on_close
=
0
;
CDROM_CONFIG_FLAGS
(
drive
)
->
no_doorlock
=
0
;
CDROM_CONFIG_FLAGS
(
drive
)
->
drq_interrupt
=
((
drive
->
id
->
config
&
0x0060
)
==
0x20
);
#if ! STANDARD_ATAPI
CDROM_CONFIG_FLAGS
(
drive
)
->
no_playaudio12
=
0
;
CDROM_CONFIG_FLAGS
(
drive
)
->
old_readcd
=
0
;
CDROM_CONFIG_FLAGS
(
drive
)
->
no_lba_toc
=
0
;
CDROM_CONFIG_FLAGS
(
drive
)
->
msf_as_bcd
=
0
;
CDROM_CONFIG_FLAGS
(
drive
)
->
drq_interrupt
=
((
drive
->
id
->
config
&
0x0060
)
==
0x20
);
CDROM_CONFIG_FLAGS
(
drive
)
->
playmsf_uses_bcd
=
0
;
CDROM_CONFIG_FLAGS
(
drive
)
->
vertos_lossage
=
0
;
/* Accommodate some broken drives... */
if
(
strcmp
(
drive
->
id
->
model
,
"CD220E"
)
==
0
||
...
...
@@ -2546,11 +2609,18 @@ void ide_cdrom_setup (ide_drive_t *drive)
CDROM_CONFIG_FLAGS
(
drive
)
->
no_playaudio12
=
1
;
}
else
if
(
strcmp
(
drive
->
id
->
model
,
"V003S0DS"
)
==
0
||
/* Vertros */
strcmp
(
drive
->
id
->
model
,
"0V300SSD"
)
==
0
||
strcmp
(
drive
->
id
->
model
,
"V004E0DT"
)
==
0
||
else
if
(
strcmp
(
drive
->
id
->
model
,
"V003S0DS"
)
==
0
||
/* Vertos */
strcmp
(
drive
->
id
->
model
,
"0V300SSD"
)
==
0
)
{
CDROM_CONFIG_FLAGS
(
drive
)
->
vertos_lossage
=
1
;
CDROM_CONFIG_FLAGS
(
drive
)
->
playmsf_uses_bcd
=
1
;
CDROM_CONFIG_FLAGS
(
drive
)
->
no_lba_toc
=
1
;
}
else
if
(
strcmp
(
drive
->
id
->
model
,
"V004E0DT"
)
==
0
||
strcmp
(
drive
->
id
->
model
,
"0V400ETD"
)
==
0
)
CDROM_CONFIG_FLAGS
(
drive
)
->
no_lba_toc
=
1
;
#endif
/* not STANDARD_ATAPI */
drive
->
cdrom_info
.
toc
=
NULL
;
drive
->
cdrom_info
.
sector_buffer
=
NULL
;
...
...
drivers/block/ide.h
View file @
6caf23d5
...
...
@@ -198,7 +198,15 @@ struct atapi_toc_entry {
unsigned
adr
:
4
;
byte
track
;
byte
reserved2
;
unsigned
lba
;
union
{
unsigned
lba
;
struct
{
byte
reserved3
;
byte
m
;
byte
s
;
byte
f
;
}
msf
;
}
addr
;
};
struct
atapi_toc
{
...
...
@@ -209,6 +217,43 @@ struct atapi_toc {
struct
atapi_toc_entry
ent
[
MAX_TRACKS
+
1
];
/* One extra for the leadout. */
};
/* This structure is annoyingly close to, but not identical with,
the cdrom_subchnl structure from cdrom.h. */
struct
atapi_cdrom_subchnl
{
u_char
acdsc_reserved
;
u_char
acdsc_audiostatus
;
u_short
acdsc_length
;
u_char
acdsc_format
;
u_char
acdsc_adr
:
4
;
u_char
acdsc_ctrl
:
4
;
u_char
acdsc_trk
;
u_char
acdsc_ind
;
union
{
struct
{
u_char
minute
;
u_char
second
;
u_char
frame
;
}
msf
;
int
lba
;
}
acdsc_absaddr
;
union
{
struct
{
u_char
minute
;
u_char
second
;
u_char
frame
;
}
msf
;
int
lba
;
}
acdsc_reladdr
;
};
/* Extra per-device info for cdrom drives. */
struct
cdrom_info
{
...
...
drivers/net/net_init.c
View file @
6caf23d5
...
...
@@ -237,6 +237,7 @@ int ether_config(struct device *dev, struct ifmap *map)
return
0
;
}
#ifdef CONFIG_MODULES
int
register_netdev
(
struct
device
*
dev
)
{
struct
device
*
d
=
dev_base
;
...
...
@@ -356,6 +357,7 @@ void unregister_netdev(struct device *dev)
restore_flags
(
flags
);
}
#endif
/* CONFIG_MODULES */
...
...
drivers/pci/pci.c
View file @
6caf23d5
...
...
@@ -69,9 +69,11 @@ struct pci_dev_info dev_info[] = {
DEVICE
(
CIRRUS
,
CIRRUS_5430
,
"GD 5430"
),
DEVICE
(
CIRRUS
,
CIRRUS_5434_4
,
"GD 5434"
),
DEVICE
(
CIRRUS
,
CIRRUS_5434_8
,
"GD 5434"
),
DEVICE
(
CIRRUS
,
CIRRUS_5436
,
"GD 5436"
),
DEVICE
(
CIRRUS
,
CIRRUS_6729
,
"CL 6729"
),
DEVICE
(
CIRRUS
,
CIRRUS_7542
,
"CL 7542"
),
DEVICE
(
CIRRUS
,
CIRRUS_7543
,
"CL 7543"
),
DEVICE
(
WD
,
WD_7197
,
"WD 7197"
),
DEVICE
(
AMD
,
AMD_LANCE
,
"79C970"
),
DEVICE
(
AMD
,
AMD_SCSI
,
"53C974"
),
DEVICE
(
TRIDENT
,
TRIDENT_9420
,
"TG 9420"
),
...
...
@@ -83,6 +85,7 @@ struct pci_dev_info dev_info[] = {
DEVICE
(
MATROX
,
MATROX_MGA_IMP
,
"MGA Impression"
),
DEVICE
(
CT
,
CT_65545
,
"65545"
),
DEVICE
(
FD
,
FD_36C70
,
"TMC-18C30"
),
DEVICE
(
SI
,
SI_6202
,
"6202"
),
DEVICE
(
SI
,
SI_503
,
"85C503"
),
DEVICE
(
SI
,
SI_501
,
"85C501"
),
DEVICE
(
SI
,
SI_496
,
"85C496"
),
...
...
@@ -103,10 +106,13 @@ struct pci_dev_info dev_info[] = {
DEVICE
(
N9
,
N9_I128
,
"Imagine 128"
),
DEVICE
(
UMC
,
UMC_UM8673F
,
"UM8673F"
),
BRIDGE
(
UMC
,
UMC_UM8891A
,
"UM8891A"
,
0x01
),
DEVICE
(
UMC
,
UMC_UM8886BF
,
"UM8886BF"
),
DEVICE
(
UMC
,
UMC_UM8886A
,
"UM8886A"
),
BRIDGE
(
UMC
,
UMC_UM8881F
,
"UM8881F"
,
0x02
),
DEVICE
(
UMC
,
UMC_UM8886F
,
"UM8886F"
),
DEVICE
(
UMC
,
UMC_UM9017F
,
"UM9017F"
),
DEVICE
(
UMC
,
UMC_UM8886N
,
"UM8886N"
),
DEVICE
(
UMC
,
UMC_UM8891N
,
"UM8891N"
),
DEVICE
(
X
,
X_AGX016
,
"ITT AGX016"
),
DEVICE
(
QLOGIC
,
QLOGIC_ISP1020
,
"ISP1020"
),
DEVICE
(
QLOGIC
,
QLOGIC_ISP1022
,
"ISP1022"
),
...
...
@@ -126,6 +132,7 @@ struct pci_dev_info dev_info[] = {
DEVICE
(
AL
,
AL_M1449
,
"M1449"
),
DEVICE
(
AL
,
AL_M1451
,
"M1451"
),
DEVICE
(
AL
,
AL_M1461
,
"M1461"
),
DEVICE
(
AL
,
AL_M1489
,
"M1489"
),
DEVICE
(
AL
,
AL_M4803
,
"M4803"
),
DEVICE
(
ASP
,
ASP_ABP940
,
"ABP940"
),
DEVICE
(
IMS
,
IMS_8849
,
"8849"
),
...
...
@@ -139,6 +146,7 @@ struct pci_dev_info dev_info[] = {
DEVICE
(
EF
,
EF_ATM_ASIC
,
"155P-MF1 (ASIC)"
),
DEVICE
(
IMAGINGTECH
,
IMAGINGTECH_ICPCI
,
"MVC IC-PCI"
),
DEVICE
(
PLX
,
PLX_9060
,
"PCI9060 i960 bridge"
),
DEVICE
(
ALLIANCE
,
ALLIANCE_PROMOTIO
,
"Promotion-6410"
),
DEVICE
(
ALLIANCE
,
ALLIANCE_PROVIDEO
,
"Provideo"
),
DEVICE
(
MUTECH
,
MUTECH_MV1000
,
"MV-1000"
),
DEVICE
(
ZEITNET
,
ZEITNET_1221
,
"1221"
),
...
...
@@ -388,6 +396,7 @@ const char *pci_strvendor(unsigned int vendor)
case
PCI_VENDOR_ID_DEC
:
return
"DEC"
;
case
PCI_VENDOR_ID_CIRRUS
:
return
"Cirrus Logic"
;
case
PCI_VENDOR_ID_IBM
:
return
"IBM"
;
case
PCI_VENDOR_ID_WD
:
return
"Western Digital"
;
case
PCI_VENDOR_ID_AMD
:
return
"AMD"
;
case
PCI_VENDOR_ID_TRIDENT
:
return
"Trident"
;
case
PCI_VENDOR_ID_AI
:
return
"Acer Incorporated"
;
...
...
@@ -407,6 +416,7 @@ const char *pci_strvendor(unsigned int vendor)
case
PCI_VENDOR_ID_QLOGIC
:
return
"Q Logic"
;
case
PCI_VENDOR_ID_LEADTEK
:
return
"Leadtek Research"
;
case
PCI_VENDOR_ID_CONTAQ
:
return
"Contaq"
;
case
PCI_VENDOR_ID_FOREX
:
return
"Forex"
;
case
PCI_VENDOR_ID_OLICOM
:
return
"Olicom"
;
case
PCI_VENDOR_ID_CMD
:
return
"CMD"
;
case
PCI_VENDOR_ID_VISION
:
return
"Vision"
;
...
...
@@ -418,6 +428,7 @@ const char *pci_strvendor(unsigned int vendor)
case
PCI_VENDOR_ID_ASP
:
return
"Advanced System Products"
;
case
PCI_VENDOR_ID_IMS
:
return
"IMS"
;
case
PCI_VENDOR_ID_TEKRAM2
:
return
"Tekram"
;
case
PCI_VENDOR_ID_AMCC
:
return
"AMCC"
;
case
PCI_VENDOR_ID_REALTEK
:
return
"Realtek"
;
case
PCI_VENDOR_ID_VIA
:
return
"VIA Technologies"
;
case
PCI_VENDOR_ID_VORTEX
:
return
"VORTEX"
;
...
...
drivers/scsi/scsi.c
View file @
6caf23d5
...
...
@@ -2147,8 +2147,10 @@ static int update_timeout(Scsi_Cmnd * SCset, int timeout)
#define MALLOC_PAGEBITS 12
#ifdef CONFIG_MODULES
static
int
scsi_register_host
(
Scsi_Host_Template
*
);
static
void
scsi_unregister_host
(
Scsi_Host_Template
*
);
#endif
void
*
scsi_malloc
(
unsigned
int
len
)
{
...
...
@@ -2638,6 +2640,8 @@ static void resize_dma_pool(void)
restore_flags
(
flags
);
}
#ifdef CONFIG_MODULES
/* a big #ifdef block... */
/*
* This entry point should be called by a loadable module if it is trying
* add a low level scsi driver to the system.
...
...
@@ -3044,6 +3048,8 @@ void scsi_unregister_module(int module_type, void * ptr)
return
;
}
#endif
/* CONFIG_MODULES */
#ifdef DEBUG_TIMEOUT
static
void
scsi_dump_status
(
void
)
...
...
drivers/scsi/sg.c
View file @
6caf23d5
...
...
@@ -5,6 +5,9 @@
* Development Sponsored by Killy Corp. NY NY
*
* Borrows code from st driver.
*
* Version from 1.3.51 modified by Rick Richardson to fix problem in
* detecting whether its a send or a recieve style command (see sg_write)
*/
#include <linux/module.h>
...
...
@@ -341,10 +344,18 @@ static int sg_write(struct inode *inode,struct file *filp,const char *buf,int co
/*
* fix input size, and see if we are sending data.
*
* Mod by Rick Richardson (rick@dgii.com):
* The original test to see if its a SEND/REC was:
* if( device->header.pack_len > device->header.reply_len )
* I haven't a clue why the author thought this would work. Instead,
* I've changed it to see if there is any additional data in this
* packet beyond the length of the SCSI command itself.
*/
device
->
header
.
pack_len
=
count
;
buf
+=
sizeof
(
struct
sg_header
);
if
(
device
->
header
.
pack_len
>
device
->
header
.
reply_len
)
size
=
COMMAND_SIZE
(
get_user
(
buf
))
+
sizeof
(
struct
sg_header
);
if
(
device
->
header
.
pack_len
>
size
)
{
bsize
=
device
->
header
.
pack_len
;
direction
=
SG_SEND
;
...
...
drivers/scsi/sr.c
View file @
6caf23d5
...
...
@@ -1021,6 +1021,8 @@ static void get_sectorsize(int i){
scsi_CDs
[
i
].
sector_size
=
(
buffer
[
4
]
<<
24
)
|
(
buffer
[
5
]
<<
16
)
|
(
buffer
[
6
]
<<
8
)
|
buffer
[
7
];
if
(
scsi_CDs
[
i
].
sector_size
==
0
)
scsi_CDs
[
i
].
sector_size
=
2048
;
/* Work around bug/feature in HP 4020i CD-Recorder... */
if
(
scsi_CDs
[
i
].
sector_size
==
2340
)
scsi_CDs
[
i
].
sector_size
=
2048
;
if
(
scsi_CDs
[
i
].
sector_size
!=
2048
&&
scsi_CDs
[
i
].
sector_size
!=
512
)
{
printk
(
"scd%d : unsupported sector size %d.
\n
"
,
...
...
fs/buffer.c
View file @
6caf23d5
...
...
@@ -1042,6 +1042,10 @@ int bread_page(unsigned long address, kdev_t dev, int b[], int size)
}
tmp
=
get_hash_table
(
dev
,
block
,
size
);
if
(
tmp
)
{
if
(
!
buffer_uptodate
(
tmp
))
{
ll_rw_block
(
READ
,
1
,
&
tmp
);
wait_on_buffer
(
tmp
);
}
memcpy
(
next
->
b_data
,
tmp
->
b_data
,
size
);
brelse
(
tmp
);
continue
;
...
...
@@ -1789,6 +1793,8 @@ int bdflush(void * unused) {
in a few more things so "top" and /proc/2/{exe,root,cwd}
display semi-sane things. Not real crucial though... */
current
->
session
=
1
;
current
->
pgrp
=
1
;
sprintf
(
current
->
comm
,
"kernel bdflush"
);
for
(;;)
{
...
...
fs/exec.c
View file @
6caf23d5
...
...
@@ -55,7 +55,7 @@ extern void dump_thread(struct pt_regs *, struct user *);
/*
* Here are the actual binaries that will be accepted:
* add more with "register_binfmt()"..
* add more with "register_binfmt()"
if using modules.
..
*/
extern
struct
linux_binfmt
elf_format
;
...
...
@@ -69,6 +69,7 @@ static struct linux_binfmt aout_format = {
static
struct
linux_binfmt
*
formats
=
&
aout_format
;
#ifdef CONFIG_MODULES
int
register_binfmt
(
struct
linux_binfmt
*
fmt
)
{
struct
linux_binfmt
**
tmp
=
&
formats
;
...
...
@@ -100,6 +101,7 @@ int unregister_binfmt(struct linux_binfmt * fmt)
}
return
-
EINVAL
;
}
#endif
/* CONFIG_MODULES */
int
open_inode
(
struct
inode
*
inode
,
int
mode
)
{
...
...
fs/namei.c
View file @
6caf23d5
...
...
@@ -416,28 +416,19 @@ int open_namei(const char * pathname, int flag, int mode,
return
-
EPERM
;
}
if
(
flag
&
O_TRUNC
)
{
struct
iattr
newattrs
;
if
((
error
=
get_write_access
(
inode
)))
{
iput
(
inode
);
return
error
;
}
if
(
inode
->
i_sb
&&
inode
->
i_sb
->
dq_op
)
inode
->
i_sb
->
dq_op
->
initialize
(
inode
,
-
1
);
newattrs
.
ia_size
=
0
;
newattrs
.
ia_valid
=
ATTR_SIZE
;
if
((
error
=
notify_change
(
inode
,
&
newattrs
)))
{
put_write_access
(
inode
);
error
=
do_truncate
(
inode
,
0
)
;
put_write_access
(
inode
);
if
(
error
)
{
iput
(
inode
);
return
error
;
}
down
(
&
inode
->
i_sem
);
inode
->
i_size
=
0
;
if
(
inode
->
i_op
&&
inode
->
i_op
->
truncate
)
inode
->
i_op
->
truncate
(
inode
);
up
(
&
inode
->
i_sem
);
inode
->
i_dirt
=
1
;
put_write_access
(
inode
);
}
else
if
(
flag
&
FMODE_WRITE
)
if
(
inode
->
i_sb
&&
inode
->
i_sb
->
dq_op
)
...
...
fs/open.c
View file @
6caf23d5
...
...
@@ -61,21 +61,27 @@ asmlinkage int sys_fstatfs(unsigned int fd, struct statfs * buf)
return
0
;
}
static
int
do_truncate
(
struct
inode
*
inode
,
unsigned
long
length
)
int
do_truncate
(
struct
inode
*
inode
,
unsigned
long
length
)
{
int
error
;
struct
iattr
newattrs
;
newattrs
.
ia_size
=
length
;
newattrs
.
ia_ctime
=
newattrs
.
ia_mtime
=
CURRENT_TIME
;
newattrs
.
ia_valid
=
ATTR_SIZE
|
ATTR_CTIME
|
ATTR_MTIME
;
error
=
notify_change
(
inode
,
&
newattrs
);
if
(
error
)
return
error
;
/* truncate virtual mappings of this file */
down
(
&
inode
->
i_sem
);
vmtruncate
(
inode
,
length
);
inode
->
i_size
=
newattrs
.
ia_size
=
length
;
inode
->
i_size
=
length
;
inode
->
i_dirt
=
1
;
if
(
inode
->
i_op
&&
inode
->
i_op
->
truncate
)
inode
->
i_op
->
truncate
(
inode
);
up
(
&
inode
->
i_sem
);
newattrs
.
ia_ctime
=
newattrs
.
ia_mtime
=
CURRENT_TIME
;
newattrs
.
ia_valid
=
ATTR_SIZE
|
ATTR_CTIME
|
ATTR_MTIME
;
inode
->
i_dirt
=
1
;
return
notify_change
(
inode
,
&
newattrs
);
return
0
;
}
asmlinkage
int
sys_truncate
(
const
char
*
path
,
unsigned
long
length
)
...
...
fs/proc/Makefile
View file @
6caf23d5
...
...
@@ -8,7 +8,12 @@
# Note 2! The CFLAGS definitions are now in the main makefile...
O_TARGET
:=
proc.o
O_OBJS
:=
inode.o root.o base.o mem.o link.o fd.o array.o kmsg.o net.o
scsi.o
O_OBJS
:=
inode.o root.o base.o mem.o link.o fd.o array.o kmsg.o net.o
M_OBJS
:=
$(O_TARGET)
# For either CONFIG_SCSI=y or CONFIG_SCSI=m
ifdef
CONFIG_SCSI
O_OBJS
+=
scsi.o
endif
include
$(TOPDIR)/Rules.make
fs/proc/array.c
View file @
6caf23d5
...
...
@@ -770,10 +770,12 @@ static int read_maps (int pid, struct file * file, char * buf, int count)
return
destptr
-
buf
;
}
#ifdef CONFIG_MODULES
extern
int
get_module_list
(
char
*
);
extern
int
get_ksyms_list
(
char
*
,
char
**
,
off_t
,
int
);
#endif
extern
int
get_device_list
(
char
*
);
extern
int
get_filesystem_list
(
char
*
);
extern
int
get_ksyms_list
(
char
*
,
char
**
,
off_t
,
int
);
extern
int
get_irq_list
(
char
*
);
extern
int
get_dma_list
(
char
*
);
extern
int
get_cpuinfo
(
char
*
);
...
...
@@ -807,9 +809,14 @@ static int get_root_array(char * page, int type, char **start, off_t offset, int
return
get_malloc
(
page
);
#endif
#ifdef CONFIG_MODULES
case
PROC_MODULES
:
return
get_module_list
(
page
);
case
PROC_KSYMS
:
return
get_ksyms_list
(
page
,
start
,
offset
,
length
);
#endif
case
PROC_STAT
:
return
get_kstat
(
page
);
...
...
@@ -822,9 +829,6 @@ static int get_root_array(char * page, int type, char **start, off_t offset, int
case
PROC_FILESYSTEMS
:
return
get_filesystem_list
(
page
);
case
PROC_KSYMS
:
return
get_ksyms_list
(
page
,
start
,
offset
,
length
);
case
PROC_DMA
:
return
get_dma_list
(
page
);
...
...
fs/proc/inode.c
View file @
6caf23d5
...
...
@@ -12,6 +12,7 @@
#include <linux/stat.h>
#include <linux/locks.h>
#include <linux/limits.h>
#include <linux/config.h>
#include <asm/system.h>
#include <asm/segment.h>
...
...
@@ -170,11 +171,13 @@ void proc_read_inode(struct inode * inode)
case
PROC_NET
:
inode
->
i_nlink
=
2
;
break
;
#ifdef CONFIG_SCSI
case
PROC_SCSI
:
inode
->
i_mode
=
S_IFDIR
|
S_IRUGO
|
S_IXUGO
;
inode
->
i_nlink
=
2
;
inode
->
i_op
=
&
proc_scsi_inode_operations
;
break
;
#endif
case
PROC_KCORE
:
inode
->
i_mode
=
S_IFREG
|
S_IRUSR
;
inode
->
i_op
=
&
proc_kcore_inode_operations
;
...
...
fs/proc/root.c
View file @
6caf23d5
...
...
@@ -131,6 +131,7 @@ struct proc_dir_entry proc_net = {
NULL
,
NULL
};
#ifdef CONFIG_SCSI
struct
proc_dir_entry
proc_scsi
=
{
PROC_SCSI
,
4
,
"scsi"
,
S_IFDIR
|
S_IRUGO
|
S_IXUGO
,
2
,
0
,
0
,
...
...
@@ -138,6 +139,7 @@ struct proc_dir_entry proc_scsi = {
NULL
,
NULL
,
NULL
,
&
proc_root
,
NULL
};
#endif
int
proc_register
(
struct
proc_dir_entry
*
dir
,
struct
proc_dir_entry
*
dp
)
{
...
...
@@ -258,7 +260,9 @@ void proc_root_init(void)
});
proc_register
(
&
proc_root
,
&
proc_net
);
#ifdef CONFIG_SCSI
proc_register
(
&
proc_root
,
&
proc_scsi
);
#endif
#ifdef CONFIG_DEBUG_MALLOC
proc_register
(
&
proc_root
,
&
(
struct
proc_dir_entry
)
{
...
...
@@ -270,10 +274,17 @@ void proc_root_init(void)
PROC_KCORE
,
5
,
"kcore"
,
S_IFREG
|
S_IRUSR
,
1
,
0
,
0
,
});
#ifdef CONFIG_MODULES
proc_register
(
&
proc_root
,
&
(
struct
proc_dir_entry
)
{
PROC_MODULES
,
7
,
"modules"
,
S_IFREG
|
S_IRUGO
,
1
,
0
,
0
,
});
proc_register
(
&
proc_root
,
&
(
struct
proc_dir_entry
)
{
PROC_KSYMS
,
5
,
"ksyms"
,
S_IFREG
|
S_IRUGO
,
1
,
0
,
0
,
});
#endif
proc_register
(
&
proc_root
,
&
(
struct
proc_dir_entry
)
{
PROC_STAT
,
4
,
"stat"
,
S_IFREG
|
S_IRUGO
,
1
,
0
,
0
,
...
...
@@ -290,10 +301,6 @@ void proc_root_init(void)
PROC_FILESYSTEMS
,
11
,
"filesystems"
,
S_IFREG
|
S_IRUGO
,
1
,
0
,
0
,
});
proc_register
(
&
proc_root
,
&
(
struct
proc_dir_entry
)
{
PROC_KSYMS
,
5
,
"ksyms"
,
S_IFREG
|
S_IRUGO
,
1
,
0
,
0
,
});
proc_register
(
&
proc_root
,
&
(
struct
proc_dir_entry
)
{
PROC_DMA
,
3
,
"dma"
,
S_IFREG
|
S_IRUGO
,
1
,
0
,
0
,
...
...
fs/proc/scsi.c
View file @
6caf23d5
...
...
@@ -38,9 +38,9 @@ static int proc_scsilseek(struct inode *, struct file *, off_t, int);
extern
void
build_proc_dir_hba_entries
(
uint
);
/* the *_get_info() functions are in the respective scsi driver code */
extern
int
(
*
dispatch_scsi_info_ptr
)(
int
,
char
*
,
char
**
,
off_t
,
int
,
int
);
int
(
*
dispatch_scsi_info_ptr
)
(
int
ino
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
inout
)
=
0
;
static
struct
file_operations
proc_scsi_operations
=
{
proc_scsilseek
,
/* lseek */
proc_readscsi
,
/* read */
...
...
fs/super.c
View file @
6caf23d5
...
...
@@ -159,6 +159,7 @@ int register_filesystem(struct file_system_type * fs)
return
0
;
}
#ifdef CONFIG_MODULES
int
unregister_filesystem
(
struct
file_system_type
*
fs
)
{
struct
file_system_type
**
tmp
;
...
...
@@ -174,6 +175,7 @@ int unregister_filesystem(struct file_system_type * fs)
}
return
-
EINVAL
;
}
#endif
static
int
fs_index
(
const
char
*
__name
)
{
...
...
include/linux/fs.h
View file @
6caf23d5
...
...
@@ -450,7 +450,7 @@ extern void kill_fasync(struct fasync_struct *fa, int sig);
extern
int
getname
(
const
char
*
filename
,
char
**
result
);
extern
void
putname
(
char
*
name
);
extern
int
do_truncate
(
struct
inode
*
,
unsigned
long
);
extern
int
register_blkdev
(
unsigned
int
,
const
char
*
,
struct
file_operations
*
);
extern
int
unregister_blkdev
(
unsigned
int
major
,
const
char
*
name
);
extern
int
blkdev_open
(
struct
inode
*
inode
,
struct
file
*
filp
);
...
...
include/linux/pci.h
View file @
6caf23d5
...
...
@@ -259,15 +259,19 @@
#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014
#define PCI_VENDOR_ID_CIRRUS 0x1013
#define PCI_DEVICE_ID_CIRRUS_5430 0x00A0
#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00A4
#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00A8
#define PCI_DEVICE_ID_CIRRUS_5430 0x00a0
#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00a4
#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00a8
#define PCI_DEVICE_ID_CIRRUS_5436 0x00ac
#define PCI_DEVICE_ID_CIRRUS_6729 0x1100
#define PCI_DEVICE_ID_CIRRUS_7542 0x1200
#define PCI_DEVICE_ID_CIRRUS_7543 0x1202
#define PCI_VENDOR_ID_IBM 0x1014
#define PCI_VENDOR_ID_WD 0x101c
#define PCI_DEVICE_ID_WD_7197 0x3296
#define PCI_VENDOR_ID_AMD 0x1022
#define PCI_DEVICE_ID_AMD_LANCE 0x2000
#define PCI_DEVICE_ID_AMD_SCSI 0x2020
...
...
@@ -292,6 +296,7 @@
#define PCI_DEVICE_ID_FD_36C70 0x0000
#define PCI_VENDOR_ID_SI 0x1039
#define PCI_DEVICE_ID_SI_6202 0x0002
#define PCI_DEVICE_ID_SI_503 0x0008
#define PCI_DEVICE_ID_SI_501 0x0406
#define PCI_DEVICE_ID_SI_496 0x0496
...
...
@@ -328,10 +333,13 @@
#define PCI_VENDOR_ID_UMC 0x1060
#define PCI_DEVICE_ID_UMC_UM8673F 0x0101
#define PCI_DEVICE_ID_UMC_UM8891A 0x0891
#define PCI_DEVICE_ID_UMC_UM8886BF 0x673a
#define PCI_DEVICE_ID_UMC_UM8886A 0x886a
#define PCI_DEVICE_ID_UMC_UM8881F 0x8881
#define PCI_DEVICE_ID_UMC_UM8886F 0x8886
#define PCI_DEVICE_ID_UMC_UM9017F 0x9017
#define PCI_DEVICE_ID_UMC_UM8886N 0xe886
#define PCI_DEVICE_ID_UMC_UM8891N 0xe891
#define PCI_VENDOR_ID_X 0x1061
#define PCI_DEVICE_ID_X_AGX016 0x0001
...
...
@@ -346,6 +354,8 @@
#define PCI_VENDOR_ID_CONTAQ 0x1080
#define PCI_DEVICE_ID_CONTAQ_82C599 0x0600
#define PCI_VENDOR_ID_FOREX 0x1083
#define PCI_VENDOR_ID_OLICOM 0x108d
#define PCI_VENDOR_ID_CMD 0x1095
...
...
@@ -375,6 +385,7 @@
#define PCI_DEVICE_ID_AL_M1449 0x1449
#define PCI_DEVICE_ID_AL_M1451 0x1451
#define PCI_DEVICE_ID_AL_M1461 0x1461
#define PCI_DEVICE_ID_AL_M1489 0x1489
#define PCI_DEVICE_ID_AL_M4803 0x5215
#define PCI_VENDOR_ID_ASP 0x10cd
...
...
@@ -386,6 +397,8 @@
#define PCI_VENDOR_ID_TEKRAM2 0x10e1
#define PCI_DEVICE_ID_TEKRAM2_690c 0x690c
#define PCI_VENDOR_ID_AMCC 0x10e8
#define PCI_VENDOR_ID_REALTEK 0x10ec
#define PCI_DEVICE_ID_REALTEK_8029 0x8029
...
...
@@ -408,6 +421,7 @@
#define PCI_DEVICE_ID_PLX_9060 0x0001
#define PCI_VENDOR_ID_ALLIANCE 0x1142
#define PCI_DEVICE_ID_ALLIANCE_PROMOTIO 0x3210
#define PCI_DEVICE_ID_ALLIANCE_PROVIDEO 0x6422
#define PCI_VENDOR_ID_MUTECH 0x1159
...
...
init/main.c
View file @
6caf23d5
...
...
@@ -594,7 +594,9 @@ asmlinkage void start_kernel(void)
sched_init
();
time_init
();
parse_options
(
command_line
);
#ifdef CONFIG_MODULES
init_modules
();
#endif
#ifdef CONFIG_PROFILE
if
(
!
prof_shift
)
#ifdef CONFIG_PROFILE_SHIFT
...
...
kernel/Makefile
View file @
6caf23d5
...
...
@@ -14,7 +14,10 @@ O_TARGET := kernel.o
O_OBJS
=
sched.o dma.o fork.o exec_domain.o panic.o printk.o sys.o
\
module.o exit.o signal.o itimer.o info.o time.o softirq.o
\
resource.o
ifeq
($(CONFIG_MODULES),y)
OX_OBJS
=
ksyms.o
endif
include
$(TOPDIR)/Rules.make
...
...
kernel/ksyms.c
View file @
6caf23d5
...
...
@@ -37,6 +37,7 @@
#include <linux/minix_fs.h>
#include <linux/ext2_fs.h>
#include <linux/random.h>
#include <linux/mount.h>
extern
unsigned
char
aux_device_present
,
kbd_read_mask
;
...
...
@@ -79,6 +80,7 @@ extern void __remqu (void);
#include <net/udp.h>
#include <net/tcp.h>
#include <net/route.h>
#include <linux/net_alias.h>
#if defined(CONFIG_PPP) || defined(CONFIG_SLIP)
#include "../drivers/net/slhc.h"
#endif
...
...
@@ -122,15 +124,12 @@ extern void *sys_call_table;
#include "../drivers/scsi/scsi_ioctl.h"
#include "../drivers/scsi/hosts.h"
#include "../drivers/scsi/constants.h"
#include "../drivers/scsi/sd.h"
#include <linux/scsicam.h>
extern
int
generic_proc_info
(
char
*
,
char
**
,
off_t
,
int
,
int
,
int
);
#endif
int
(
*
dispatch_scsi_info_ptr
)
(
int
ino
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
inode
,
int
func
)
=
0
;
/* Dirty hack */
extern
int
sys_tz
;
extern
int
request_dma
(
unsigned
int
dmanr
,
char
*
deviceID
);
extern
void
free_dma
(
unsigned
int
dmanr
);
...
...
@@ -500,7 +499,6 @@ struct symbol_table symbol_table = {
X
(
kernel_scsi_ioctl
),
X
(
need_isa_buffer
),
X
(
request_queueable
),
X
(
dispatch_scsi_info_ptr
),
X
(
generic_proc_info
),
X
(
scsi_devices
),
X
(
gendisk_head
),
/* Needed for sd.c */
...
...
@@ -515,7 +513,6 @@ struct symbol_table symbol_table = {
*/
X
(
gendisk_head
),
X
(
resetup_one_dev
),
X
(
dispatch_scsi_info_ptr
),
#endif
/* Added to make file system as module */
X
(
set_writetime
),
...
...
@@ -563,8 +560,10 @@ struct symbol_table symbol_table = {
X
(
proc_unregister
),
X
(
in_group_p
),
X
(
generate_cluster
),
#ifdef CONFIG_SCSI
X
(
proc_scsi
),
X
(
proc_scsi_inode_operations
),
#endif
X
(
proc_net_inode_operations
),
X
(
proc_net
),
#endif
...
...
kernel/module.c
View file @
6caf23d5
...
...
@@ -6,6 +6,7 @@
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/malloc.h>
#include <linux/config.h>
/*
* Originally by Anonymous (as far as I know...)
* Linux version by Bas Laarhoven <bas@vimec.nl>
...
...
@@ -38,8 +39,13 @@
* On 1-Aug-95: <Matti.Aarnio@utu.fi> altered code to use same style as
* do /proc/net/XXX "files". Namely allow more than 4kB
* (or what the block size if) output.
*
* - Use dummy syscall functions for users who disable all
* module support. Similar to kernel/sys.c (Paul Gortmaker)
*/
#ifdef CONFIG_MODULES
/* a *big* #ifdef block... */
#ifdef DEBUG_MODULE
#define PRINTK(a) printk a
#else
...
...
@@ -781,3 +787,30 @@ register_symtab(struct symbol_table *intab)
return
0
;
}
#else
/* CONFIG_MODULES */
/* Dummy syscalls for people who don't want modules */
asmlinkage
unsigned
long
sys_create_module
(
void
)
{
return
-
ENOSYS
;
}
asmlinkage
int
sys_init_module
(
void
)
{
return
-
ENOSYS
;
}
asmlinkage
int
sys_delete_module
(
void
)
{
return
-
ENOSYS
;
}
asmlinkage
int
sys_get_kernel_syms
(
void
)
{
return
-
ENOSYS
;
}
#endif
/* CONFIG_MODULES */
mm/swap.c
View file @
6caf23d5
...
...
@@ -709,8 +709,8 @@ static inline void add_mem_queue(struct mem_list * head, struct mem_list * entry
static
inline
void
remove_mem_queue
(
struct
mem_list
*
head
,
struct
mem_list
*
entry
)
{
entry
->
next
->
prev
=
entry
->
prev
;
entry
->
prev
->
next
=
entry
->
next
;
struct
mem_list
*
next
=
entry
->
next
;
(
next
->
prev
=
entry
->
prev
)
->
next
=
next
;
}
/*
...
...
net/ipv4/tcp.c
View file @
6caf23d5
...
...
@@ -5334,8 +5334,7 @@ static void tcp_write_wakeup(struct sock *sk)
* Find the first data byte.
*/
tcp_data_start
=
skb
->
ip_hdr
+
((
iph
->
ihl
+
th
->
doff
)
<<
2
);
tcp_data_start
=
(
char
*
)
th
+
(
th
->
doff
<<
2
);
/*
* Add it to our new buffer
...
...
scripts/Configure
View file @
6caf23d5
...
...
@@ -22,6 +22,9 @@
#
# 301195 (boldt@math.ucsb.edu) - added help text support
#
# 281295 Paul Gortmaker - make tri_state functions collapse to boolean
# if module support is not enabled.
#
#
# Make sure we're really running bash.
...
...
@@ -137,7 +140,8 @@ function define_bool () {
function
bool
()
{
def
=
$(
eval echo
"
\$
{
$2
:-'n'}"
)
case
"
$def
"
in
"y"
)
defprompt
=
"Y/n/?"
"y"
|
"m"
)
defprompt
=
"Y/n/?"
def
=
"y"
;;
"n"
)
defprompt
=
"N/y/?"
;;
...
...
@@ -161,28 +165,32 @@ function bool () {
# tristate question define
#
function
tristate
()
{
def
=
$(
eval echo
"
\$
{
$2
:-'n'}"
)
case
"
$def
"
in
"y"
)
defprompt
=
"Y/m/n/?"
;;
"m"
)
defprompt
=
"M/n/y/?"
;;
"n"
)
defprompt
=
"N/y/m/?"
;;
esac
while
:
;
do
readln
"
$1
(
$2
) [
$defprompt
] "
"
$def
"
case
"
$ans
"
in
[
yY]
|
[
yY]es
)
define_bool
"
$2
"
"y"
break
;;
[
nN]
|
[
nN]o
)
define_bool
"
$2
"
"n"
break
;;
[
mM]
)
define_bool
"
$2
"
"m"
break
;;
*
)
help
"
$2
"
;;
if
[
"
$MODULES
"
!=
"y"
]
;
then
bool
"
$1
"
"
$2
"
else
def
=
$(
eval echo
"
\$
{
$2
:-'n'}"
)
case
"
$def
"
in
"y"
)
defprompt
=
"Y/m/n/?"
;;
"m"
)
defprompt
=
"M/n/y/?"
;;
"n"
)
defprompt
=
"N/y/m/?"
;;
esac
done
while
:
;
do
readln
"
$1
(
$2
) [
$defprompt
] "
"
$def
"
case
"
$ans
"
in
[
yY]
|
[
yY]es
)
define_bool
"
$2
"
"y"
break
;;
[
nN]
|
[
nN]o
)
define_bool
"
$2
"
"n"
break
;;
[
mM]
)
define_bool
"
$2
"
"m"
break
;;
*
)
help
"
$2
"
;;
esac
done
fi
}
#
...
...
@@ -200,6 +208,7 @@ function dep_tristate () {
if
[
"
$3
"
!=
"m"
]
;
then
tristate
"
$1
"
"
$2
"
else
if
[
"
$MODULES
"
=
"y"
]
;
then
case
"
$def
"
in
"y"
|
"m"
)
defprompt
=
"M/n/?"
def
=
"m"
...
...
@@ -226,6 +235,7 @@ function dep_tristate () {
;;
esac
done
fi
fi
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment