Commit ba97e35a authored by Linus Torvalds's avatar Linus Torvalds

Import 1.1.60

parent c3b8d39c
......@@ -11,6 +11,13 @@ N: Werner Almesberger
E: almesber@bernina.ethz.ch
D: dosfs, LILO, some fd features, various other hacks here and there
N: John Aycock
E: aycock@cpsc.ucalgary.ca
D: Adaptec 274x driver
S: Department of Computer Science
S: University of Calgary
S: Calgary, Alberta, Canada
N: Krishna Balasubramanian
E: balasub@cis.ohio-state.edu
D: Wrote SYS V IPC (part of standard kernel since 0.99.10)
......@@ -376,6 +383,14 @@ S: 2200 Monroe Street #1509
S: Santa Clara, California 95050-3452
S: USA
N: Alain L. Knaff
E: Alain.Knaff@imag.fr
D: floppy driver
S: Appartement 310B
S: 11, rue General Mangin
S: 38100 Grenoble
S: France
N: Rudolf Koenig
E: rfkoenig@immd4.informatik.uni-erlangen.de
D: The Linux Support Team Erlangen
......
VERSION = 1
PATCHLEVEL = 1
SUBLEVEL = 59
SUBLEVEL = 60
ARCH = i386
......
......@@ -51,7 +51,9 @@ comment 'SCSI low-level drivers'
bool 'Adaptec AHA152X support' CONFIG_SCSI_AHA152X n
bool 'Adaptec AHA1542 support' CONFIG_SCSI_AHA1542 y
bool 'Adaptec AHA1740 support' CONFIG_SCSI_AHA1740 n
bool 'Adaptec AHA274X/284X support' CONFIG_SCSI_AHA274X n
bool 'BusLogic SCSI support' CONFIG_SCSI_BUSLOGIC n
bool 'UltraStor 14F/34F support' CONFIG_SCSI_U14_34F n
bool 'Future Domain 16xx SCSI support' CONFIG_SCSI_FUTURE_DOMAIN n
bool 'Generic NCR5380 SCSI support' CONFIG_SCSI_GENERIC_NCR5380 n
bool 'NCR53c7,8xx SCSI support' CONFIG_SCSI_NCR53C7xx n
......
This diff is collapsed.
Sat Oct 29 18:17:34 1994 Theodore Y. Ts'o (tytso@rt-11)
* serial.c (rs_ioctl, get_lsr_info): Added patch suggested by Arne
Riiber so that user mode programs can tell when the
transmitter shift register is empty.
Thu Oct 27 23:14:29 1994 Theodore Y. Ts'o (tytso@rt-11)
* tty_ioctl.c (wait_until_sent): Added debugging printk statements
(under the #ifdef TTY_DEBUG_WAIT_UNTL_SENT)
* serial.c (rs_interrupt, rs_interrupt_single, receive_chars,
change_speed, rs_close): rs_close now disables receiver
interrupts when closing the serial port. This allows the
serial port to close quickly when Linux and a modem (or a
mouse) are engaged in an echo war; when closing the serial
port, we now first stop listening to incoming characters,
and *then* wait for the transmit buffer to drain.
In order to make this change, the info->read_status_mask
is now used to control what bits of the line status
register are looked at in the interrupt routine in all
cases; previously it was only used in receive_chars to
select a few of the status bits.
Mon Oct 24 23:36:21 1994 Theodore Y. Ts'o (tytso@rt-11)
* serial.c (rs_close): Add a timeout to the transmitter flush
......
......@@ -373,27 +373,27 @@ static _INLINE_ void receive_chars(struct async_struct *info,
do {
ch = serial_inp(info, UART_RX);
if (*status & info->ignore_status_mask)
continue;
goto ignore_char;
if (tty->flip.count >= TTY_FLIPBUF_SIZE)
break;
tty->flip.count++;
if (*status & info->read_status_mask) {
if (*status & (UART_LSR_BI)) {
*tty->flip.flag_buf_ptr++ = TTY_BREAK;
if (info->flags & ASYNC_SAK)
do_SAK(tty);
} else if (*status & UART_LSR_PE)
*tty->flip.flag_buf_ptr++ = TTY_PARITY;
else if (*status & UART_LSR_FE)
*tty->flip.flag_buf_ptr++ = TTY_FRAME;
else if (*status & UART_LSR_OE)
*tty->flip.flag_buf_ptr++ = TTY_OVERRUN;
else
*tty->flip.flag_buf_ptr++ = 0;
} else
if (*status & (UART_LSR_BI)) {
printk("handling break....");
*tty->flip.flag_buf_ptr++ = TTY_BREAK;
if (info->flags & ASYNC_SAK)
do_SAK(tty);
} else if (*status & UART_LSR_PE)
*tty->flip.flag_buf_ptr++ = TTY_PARITY;
else if (*status & UART_LSR_FE)
*tty->flip.flag_buf_ptr++ = TTY_FRAME;
else if (*status & UART_LSR_OE)
*tty->flip.flag_buf_ptr++ = TTY_OVERRUN;
else
*tty->flip.flag_buf_ptr++ = 0;
*tty->flip.char_buf_ptr++ = ch;
} while ((*status = serial_inp(info, UART_LSR)) & UART_LSR_DR);
ignore_char:
*status = serial_inp(info, UART_LSR) & info->read_status_mask;
} while (*status & UART_LSR_DR);
queue_task_irq_off(&tty->flip.tqueue, &tq_timer);
#ifdef SERIAL_DEBUG_INTR
printk("DR...");
......@@ -525,7 +525,10 @@ static void rs_interrupt(int irq)
info->last_active = jiffies;
status = serial_inp(info, UART_LSR);
status = serial_inp(info, UART_LSR) & info->read_status_mask;
#ifdef SERIAL_DEBUG_INTR
printk("status = %x...", status);
#endif
if (status & UART_LSR_DR)
receive_chars(info, &status);
check_modem_status(info);
......@@ -545,6 +548,9 @@ static void rs_interrupt(int irq)
continue;
}
} while (end_mark != info);
#ifdef SERIAL_DEBUG_INTR
printk("end.\n");
#endif
}
/*
......@@ -565,7 +571,10 @@ static void rs_interrupt_single(int irq)
return;
do {
status = serial_inp(info, UART_LSR);
status = serial_inp(info, UART_LSR) & info->read_status_mask;
#ifdef SERIAL_DEBUG_INTR
printk("status = %x...", status);
#endif
if (status & UART_LSR_DR)
receive_chars(info, &status);
check_modem_status(info);
......@@ -579,6 +588,9 @@ static void rs_interrupt_single(int irq)
}
} while (!(serial_in(info, UART_IIR) & UART_IIR_NO_INT));
info->last_active = jiffies;
#ifdef SERIAL_DEBUG_INTR
printk("end.\n");
#endif
}
#else /* CONFIG_SERIAL_NEW_ISR */
......@@ -606,7 +618,7 @@ static void rs_interrupt(int irq)
goto next;
serial_outp(info, UART_IER, 0);
status = serial_inp(info, UART_LSR);
status = serial_inp(info, UART_LSR) & info->read_status_mask;
if (status & UART_LSR_DR) {
receive_chars(info, &status);
done = 0;
......@@ -658,7 +670,7 @@ static void rs_interrupt_single(int irq)
return;
serial_outp(info, UART_IER, 0);
status = serial_inp(info, UART_LSR);
status = serial_inp(info, UART_LSR) & info->read_status_mask;
if (status & UART_LSR_DR)
receive_chars(info, &status);
check_modem_status(info);
......@@ -1140,23 +1152,28 @@ static void change_speed(struct async_struct *info)
/*
* Set up parity check flag
*/
info->read_status_mask = UART_LSR_OE;
info->read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR;
if (I_INPCK(info->tty))
info->read_status_mask |= UART_LSR_FE | UART_LSR_PE;
if (I_BRKINT(info->tty) || I_PARMRK(info->tty))
info->read_status_mask |= UART_LSR_BI;
info->ignore_status_mask = 0;
if (I_IGNPAR(info->tty))
if (I_IGNPAR(info->tty)) {
info->ignore_status_mask |= UART_LSR_PE | UART_LSR_FE;
info->read_status_mask |= UART_LSR_PE | UART_LSR_FE;
}
if (I_IGNBRK(info->tty)) {
info->ignore_status_mask |= UART_LSR_BI;
info->read_status_mask |= UART_LSR_BI;
/*
* If we're ignore parity and break indicators, ignore
* overruns too. (For real raw support).
*/
if (I_IGNPAR(info->tty))
if (I_IGNPAR(info->tty)) {
info->ignore_status_mask |= UART_LSR_OE;
info->read_status_mask |= UART_LSR_OE;
}
}
cli();
......@@ -1462,6 +1479,31 @@ static int set_serial_info(struct async_struct * info,
return retval;
}
/*
* get_lsr_info - get line status register info
*
* Purpose: Let user call ioctl() to get info when the UART physically
* is emptied. On bus types like RS485, the transmitter must
* release the bus after transmitting. This must be done when
* the transmit shift register is empty, not be done when the
* transmit holding register is empty. This functionality
* allows RS485 driver to be written in user space.
*/
static int get_lsr_info(struct async_struct * info, unsigned int *value)
{
unsigned char status;
unsigned int result;
cli();
status = serial_in(info, UART_LSR);
sti();
result = ((status & UART_LSR_TEMT) ? TIOCSER_TEMT : 0);
put_fs_long(result,(unsigned long *) value);
return 0;
}
static int get_modem_info(struct async_struct * info, unsigned int *value)
{
unsigned char control, status;
......@@ -1678,6 +1720,14 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file,
put_fs_long(rs_wild_int_mask, (unsigned long *) arg);
return 0;
case TIOCSERGETLSR: /* Get line status register */
error = verify_area(VERIFY_WRITE, (void *) arg,
sizeof(unsigned int));
if (error)
return error;
else
return get_lsr_info(info, (unsigned int *) arg);
case TIOCSERSWILD:
if (!suser())
return -EPERM;
......@@ -1780,6 +1830,15 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
info->normal_termios = *tty->termios;
if (info->flags & ASYNC_CALLOUT_ACTIVE)
info->callout_termios = *tty->termios;
/*
* At this point we stop accepting input. To do this, we
* disable the receive line status interrupts, and tell the
* interrut driver to stop checking the data ready bit in the
* line status register.
*/
info->IER &= ~UART_IER_RLSI;
serial_out(info, UART_IER, info->IER);
info->read_status_mask &= ~UART_LSR_DR;
if (info->flags & ASYNC_INITIALIZED) {
wait_until_sent(tty, 3000); /* 30 seconds timeout */
/*
......
......@@ -24,6 +24,8 @@
#include <asm/segment.h>
#include <asm/system.h>
#undef TTY_DEBUG_WAIT_UNTIL_SENT
#undef DEBUG
#ifdef DEBUG
# define PRINTK(x) printk (x)
......@@ -42,6 +44,9 @@ void wait_until_sent(struct tty_struct * tty, int timeout)
{
struct wait_queue wait = { current, NULL };
#ifdef TTY_DEBUG_WAIT_UNTIL_SENT
printk("%s wait until sent...\n", tty_name(tty));
#endif
if (!tty->driver.chars_in_buffer ||
!tty->driver.chars_in_buffer(tty))
return;
......@@ -52,6 +57,9 @@ void wait_until_sent(struct tty_struct * tty, int timeout)
else
current->timeout = (unsigned) -1;
do {
#ifdef TTY_DEBUG_WAIT_UNTIL_SENT
printk("waiting %s...(%d)\n", tty_name(tty), tty->driver.chars_in_buffer(tty));
#endif
current->state = TASK_INTERRUPTIBLE;
if (current->signal & ~current->blocked)
break;
......
......@@ -62,11 +62,21 @@ SCSI_OBJS := $(SCSI_OBJS) aha1740.o
SCSI_SRCS := $(SCSI_SRCS) aha1740.c
endif
ifdef CONFIG_SCSI_AHA274X
SCSI_OBJS := $(SCSI_OBJS) aha274x.o
SCSI_SRCS := $(SCSI_SRCS) aha274x.c
endif
ifdef CONFIG_SCSI_BUSLOGIC
SCSI_OBJS := $(SCSI_OBJS) buslogic.o
SCSI_SRCS := $(SCSI_SRCS) buslogic.c
endif
ifdef CONFIG_SCSI_U14_34F
SCSI_OBJS := $(SCSI_OBJS) u14-34f.o
SCSI_SRCS := $(SCSI_SRCS) u14-34f.c
endif
ifdef CONFIG_SCSI_DEBUG
SCSI_OBJS := $(SCSI_OBJS) scsi_debug.o
SCSI_SRCS := $(SCSI_SRCS) scsi_debug.c
......@@ -132,6 +142,11 @@ scsi.a: $(SCSI_OBJS)
aha152x.o: aha152x.c
$(CC) $(CFLAGS) $(AHA152X) -c aha152x.c
aic7770: aic7770.c
$(CC) $(CFLAGS) -o $@ aic7770.c
aha274x_seq.h: aic7770 aha274x.seq
./aic7770 -o $@ aha274x.seq
seagate.o: seagate.c
$(CC) $(CFLAGS) -DARBITRATE -DSLOW_HANDSHAKE -DFAST32 -c seagate.c
......
@(#)README 1.15 94/10/29 jda
AHA274x/284x DRIVER
*** THIS SHOULD BE CONSIDERED BETA SOFTWARE ***
BACKGROUND & LIMITATIONS
For various reasons, we ended up with one of these cards under the
impression that support was soon forthcoming. In mid-May, I asked
Scott Ferris (the official person who's supposed to be writing this
driver) what documentation he used, _finally_ got it from Adaptec,
and started writing this driver. It is now at what I would consider
a stable state - it runs our news server and is battered by SCSI
requests 24 hours a day without dying. There are a few devices it
reportedly doesn't like working with - those are being sorted out. Due
to some unexpected equipment loans, I am able to support this at least
for the time being.
YOU MUST HAVE THE BIOS ENABLED OR THIS WILL NOT WORK. The BIOS extracts
some configuration information that I cannot get to portably yet, as
well as provides some self-tests which this driver does not attempt to
duplicate.
Scott's driver development is stalled for now, and after discussions
with him, this is now officially out of "pre-alpha" status and into
beta until the remaining device problems can be resolved. The latest
patches can be obtained via anonymous ftp from ftp.cpsc.ucalgary.ca in
/pub/systems/linux/aha274x.
It supports both EISA 274x and VL-bus 284x, either single or twin-bus cards
(but not the second SCSI bus of twin cards - see aha274x.c), and supports
disconnection, synchronous SCSI, and scatter-gather. Unlike previous
versions, abort() and reset() are now implemented, and both hosts.c and
aha274x.c should give a clean compile. Code is now present to detect parity
errors, but has not been tested.
I wrote this using a 1.0.9 kernel. Unfortunately, I'm getting tired of
#ifdef'ing everything to handle two or three different evolutionary steps
in the SCSI kernel code, so I've upgraded my system to 1.1.49, and will
only leave in code to support versions from about 1.1.45 onward.
Thanks to patches supplied by Mark Olson <molson@tricord.com>, this driver
will now work with the 284x series (the VL-bus version of this card). The
294x (PCI-bus) is being worked on, and initial support for it will be ready
soon.
Under protest, this driver is subject to the GPL - see the file
COPYING for details.
Thanks to the following people for bug fixes/code improvements (also
thanks to the people who have sent me feedback):
"David F. Carlson" <dave@ee.rochester.edu>
Jimen Ching <jiching@wiliki.eng.hawaii.edu>
mday@artisoft.com (Matt Day)
"Dean W. Gehnert" <deang@ims.com>
Darcy Grant <darcy@cpsc.ucalgary.ca>
Alan Hourihane <alanh@fairlite.demon.co.uk>
isely@fncrd8.fnal.gov (Mike Isely)
Mike Jerger <jerger@ux1.cso.uiuc.edu>
tm@netcom.com (Toshiyasu Morita)
neal@interact.org (Neal Norwitz)
Mark Olson <molson@tricord.com>
map@europa.ecn.uoknor.edu (Michael A. Parker)
Thomas Scheunemann <thomas@dagobert.uni-duisburg.de>
Special thanks to Drew Eckhardt <drew@kinglear.cs.Colorado.EDU> for
fielding my questions about synchronous negotiation. Steffen Moeller
<smoe0024@rz.uni-hildesheim.de> sent me installation instructions which
were previously included in this README.
David Pirie <pirie@cpsc.ucalgary.ca> was nice enough to loan me his
2842 card for a week so I could track down one bug, as well as his
CD-ROM drive later, and also thanks to Doug Fortune at Riley's Data Share
in Calgary, who arranged a long-term loan of a 2842 board for further work.
Many thanks to the fearless prerelease testers! Dean Gehnert has been
building Slackware boot disks for the driver, which are available from
ftp.cpsc.ucalgary.ca in /pub/systems/linux/aha274x/slackware_boot.
Carl Riches <cgr@poplar1.cfr.washington.edu> has set up a mailing list
for aic7xxx driver development. To subscribe, send a message to
aic7770-list@poplar1.cfr.washington.edu with a message body of:
subscribe AIC7770-LIST <your name here, without the angle brackets>
Please direct questions and discussions to that list instead of me. When
sending bug reports, please include a description of your hardware, the
release numbers displayed by the driver at boot time, and as accurate a
facsimilie of any error message you're mailing about.
John Aycock
aycock@cpsc.ucalgary.ca
This diff is collapsed.
/* @(#)aha274x.h 1.11 94/09/06 jda */
/*
* Adaptec 274x device driver for Linux.
* Copyright (c) 1994 The University of Calgary Department of Computer Science.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef aha274x_h
#define aha274x_h
#define AHA274X_MAXSCB 4
#define AHA274X_H_VERSION "1.11"
/*
* Scsi_Host_Template (see hosts.h) for 274x - some fields
* to do with card config are filled in after the card is
* detected.
*/
#define AHA274X { \
NULL, \
"", \
aha274x_detect, \
NULL, \
aha274x_info, \
aha274x_command, \
aha274x_queue, \
aha274x_abort, \
aha274x_reset, \
NULL, \
aha274x_biosparam, \
AHA274X_MAXSCB, /* max simultaneous cmds */\
-1, /* scsi id of host adapter */\
SG_ALL, /* max scatter-gather cmds */\
1, /* cmds per lun (linked cmds) */\
0, /* number of 274x's present */\
0, /* no memory DMA restrictions */\
DISABLE_CLUSTERING \
}
extern int aha274x_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
extern int aha274x_biosparam(Disk *, int, int[]);
extern int aha274x_detect(Scsi_Host_Template *);
extern int aha274x_command(Scsi_Cmnd *);
extern int aha274x_abort(Scsi_Cmnd *);
extern int aha274x_reset(Scsi_Cmnd *);
extern const char *aha274x_info(void);
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -39,10 +39,18 @@
#include "aha1740.h"
#endif
#ifdef CONFIG_SCSI_AHA274X
#include "aha274x.h"
#endif
#ifdef CONFIG_SCSI_BUSLOGIC
#include "buslogic.h"
#endif
#ifdef CONFIG_SCSI_U14_34F
#include "u14-34f.h"
#endif
#ifdef CONFIG_SCSI_FUTURE_DOMAIN
#include "fdomain.h"
#endif
......@@ -116,6 +124,9 @@ Scsi_Host_Template * scsi_hosts = NULL;
static Scsi_Host_Template builtin_scsi_hosts[] =
{
#ifdef CONFIG_SCSI_U14_34F
ULTRASTOR_14_34F,
#endif
#ifdef CONFIG_SCSI_ULTRASTOR
ULTRASTOR_14F,
#endif
......@@ -132,6 +143,9 @@ static Scsi_Host_Template builtin_scsi_hosts[] =
#ifdef CONFIG_SCSI_AHA1740
AHA1740,
#endif
#ifdef CONFIG_SCSI_AHA274X
AHA274X,
#endif
#ifdef CONFIG_SCSI_FUTURE_DOMAIN
FDOMAIN_16X0,
#endif
......
This diff is collapsed.
/*
* u14-34f.h - used by low-level scsi driver for UltraStor 14F/34F
*/
#ifndef _U14_34F_H
#define _U14_34F_H
int u14_34f_detect(Scsi_Host_Template *);
const char *u14_34f_info(void);
int u14_34f_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
int u14_34f_abort(Scsi_Cmnd *);
int u14_34f_reset(Scsi_Cmnd *);
int u14_34f_biosparam(Disk *, int, int *);
#define U14_34F_VERSION "1.09.01"
#define ULTRASTOR_14_34F { \
NULL, \
"UltraStor 14F/34F rev. " U14_34F_VERSION " by " \
"Dario_Ballabio@milano.europe.dg.com.",\
u14_34f_detect, \
NULL, \
u14_34f_info, \
NULL, \
u14_34f_queuecommand, \
u14_34f_abort, \
u14_34f_reset, \
NULL, \
u14_34f_biosparam, \
0, /* can_queue, reset by detect */ \
7, /* this_id, reset by detect */ \
0, /* sg_tablesize, reset by detect */ \
0, /* cmd_per_lun, reset by detect */ \
0, /* number of boards present */ \
0, /* unchecked isa dma, reset by detect */ \
0, /* use_clustering, reset by detect */ \
}
#endif
......@@ -20,6 +20,8 @@ FS_SUBDIRS := $(FS_SUBDIRS) ext2
endif
ifdef CONFIG_MSDOS_FS
FS_SUBDIRS := $(FS_SUBDIRS) msdos
else
MODULE_FS_SUBDIRS := $(MODULE_FS_SUBDIRS) msdos
endif
ifdef CONFIG_PROC_FS
FS_SUBDIRS := $(FS_SUBDIRS) proc
......@@ -35,6 +37,8 @@ FS_SUBDIRS := $(FS_SUBDIRS) xiafs
endif
ifdef CONFIG_UMSDOS_FS
FS_SUBDIRS := $(FS_SUBDIRS) umsdos
else
MODULE_FS_SUBDIRS := $(MODULE_FS_SUBDIRS) umsdos
endif
ifdef CONFIG_SYSV_FS
FS_SUBDIRS := $(FS_SUBDIRS) sysv
......@@ -76,6 +80,10 @@ ifdef MODULES
modules:
$(MAKE) CFLAGS="$(CFLAGS) -DMODULE" $(MODULES)
(cd ../modules;for i in $(MODULES); do ln -sf ../fs/$$i .; done)
set -e; for i in $(MODULE_FS_SUBDIRS); do \
test ! -d $$i || \
{ $(MAKE) -C $$i; }; done
else
......
......@@ -139,7 +139,7 @@ asmlinkage int sys_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg)
* Changed to make the security checks more
* liberal. -- TYT
*/
if (current->pgrp == -arg || current->pid != arg)
if (current->pgrp == -arg || current->pid == arg)
goto fasync_ok;
for_each_task(p) {
......
......@@ -284,6 +284,7 @@ void inode_setattr(struct inode *inode, struct iattr *attr)
if (!fsuser() && !in_group_p(inode->i_gid))
inode->i_mode &= ~S_ISGID;
}
inode->i_dirt = 1;
}
/*
......
......@@ -90,7 +90,7 @@ static int parse_options(char *options, struct iso9660_options * popt)
else return 0;
}
else if (!strcmp(this_char,"conv") && value) {
if (value[0] && !value[1] && strchr("bta",*value))
if (value[0] && !value[1] && strchr("btma",*value))
popt->conversion = *value;
else if (!strcmp(value,"binary")) popt->conversion = 'b';
else if (!strcmp(value,"text")) popt->conversion = 't';
......@@ -116,10 +116,10 @@ static int parse_options(char *options, struct iso9660_options * popt)
if (ivalue != 1024 && ivalue != 2048) return 0;
popt->blocksize = ivalue;
break;
case 'g':
case 'u':
popt->uid = ivalue;
break;
case 'u':
case 'g':
popt->gid = ivalue;
break;
}
......
......@@ -7,6 +7,10 @@
#
# Note 2! The CFLAGS definitions are now in the main makefile...
ifndef CONFIG_MSDOS_FS
CFLAGS := $(CFLAGS) -DMODULE
endif
.c.s:
$(CC) $(CFLAGS) -S $<
.c.o:
......@@ -14,7 +18,7 @@
.s.o:
$(AS) -o $*.o $<
OBJS= namei.o inode.o file.o dir.o misc.o fat.o mmap.o
OBJS= namei.o inode.o file.o dir.o misc.o fat.o
msdos.o: $(OBJS)
$(LD) -r -o msdos.o $(OBJS)
......
......@@ -18,6 +18,8 @@
#define ROUND_UP(x) (((x)+3) & ~3)
#define PRINTK(X)
static int msdos_dir_read(struct inode * inode,struct file * filp, char * buf,int count)
{
return -EISDIR;
......@@ -112,7 +114,9 @@ int msdos_readdir(
put_fs_long(ino,&dirent->d_ino);
memcpy_tofs(dirent->d_name,bufname,i+1);
put_fs_word(i,&dirent->d_reclen);
PRINTK (("readdir avant brelse\n"));
brelse(bh);
PRINTK (("readdir retourne %d\n",i));
return ROUND_UP(NAME_OFFSET(dirent) + i + 1);
}
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -12,6 +12,8 @@
#include <linux/string.h>
#include <linux/stat.h>
#define PRINTK(x)
/* Well-known binary file extensions */
static char bin_extensions[] =
......@@ -109,9 +111,9 @@ void unlock_fat(struct super_block *sb)
int msdos_add_cluster(struct inode *inode)
{
int count,nr,limit,last,current,sector;
void *data;
int count,nr,limit,last,current,sector,last_sector;
struct buffer_head *bh;
int cluster_size = MSDOS_SB(inode->i_sb)->cluster_size;
if (inode->i_ino == MSDOS_ROOT_INO) return -ENOSPC;
if (!MSDOS_SB(inode->i_sb)->free_clusters) return -ENOSPC;
......@@ -161,44 +163,29 @@ printk("last = %d\n",last);
#ifdef DEBUG
if (last) printk("next set to %d\n",fat_access(inode->i_sb,last,-1));
#endif
for (current = 0; current < MSDOS_SB(inode->i_sb)->cluster_size;
current++) {
sector = MSDOS_SB(inode->i_sb)->data_start+(nr-2)*
MSDOS_SB(inode->i_sb)->cluster_size+current;
#ifdef DEBUG
printk("zeroing sector %d\n",sector);
#endif
if (current < MSDOS_SB(inode->i_sb)->cluster_size-1 &&
!(sector & 1)) {
if (!(bh = getblk(inode->i_dev,sector >> 1,
BLOCK_SIZE)))
printk("getblk failed\n");
else {
memset(bh->b_data,0,BLOCK_SIZE);
bh->b_uptodate = 1;
}
current++;
}
sector = MSDOS_SB(inode->i_sb)->data_start+(nr-2)*cluster_size;
last_sector = sector + cluster_size;
for ( ; sector < last_sector; sector++) {
#ifdef DEBUG
printk("zeroing sector %d\n",sector);
#endif
if (!(bh = getblk(inode->i_dev,sector,SECTOR_SIZE)))
printk("getblk failed\n");
else {
if (!(bh = msdos_sread(inode->i_dev,sector,
&data)))
printk("msdos_sread failed\n");
else memset(data,0,SECTOR_SIZE);
}
if (bh) {
memset(bh->b_data,0,SECTOR_SIZE);
bh->b_uptodate = 1;
mark_buffer_dirty(bh, 1);
brelse(bh);
}
}
inode->i_blocks += MSDOS_SB(inode->i_sb)->cluster_size;
inode->i_blocks += cluster_size;
if (S_ISDIR(inode->i_mode)) {
if (inode->i_size & (SECTOR_SIZE-1)) {
fs_panic(inode->i_sb,"Odd directory size");
inode->i_size = (inode->i_size+SECTOR_SIZE) &
~(SECTOR_SIZE-1);
}
inode->i_size += SECTOR_SIZE*MSDOS_SB(inode->i_sb)->
cluster_size;
inode->i_size += SECTOR_SIZE*cluster_size;
#ifdef DEBUG
printk("size is %d now (%x)\n",inode->i_size,inode);
#endif
......@@ -273,17 +260,21 @@ int msdos_get_entry(struct inode *dir, loff_t *pos,struct buffer_head **bh,
while (1) {
offset = *pos;
PRINTK (("get_entry offset %d\n",offset));
if ((sector = msdos_smap(dir,offset >> SECTOR_BITS)) == -1)
return -1;
PRINTK (("get_entry sector %d %p\n",sector,*bh));
if (!sector)
return -1; /* beyond EOF */
*pos += sizeof(struct msdos_dir_entry);
if (*bh)
brelse(*bh);
PRINTK (("get_entry sector apres brelse\n"));
if (!(*bh = msdos_sread(dir->i_dev,sector,&data))) {
printk("Directory sread (sector %d) failed\n",sector);
continue;
}
PRINTK (("get_entry apres sread\n"));
*de = (struct msdos_dir_entry *) (data+(offset &
(SECTOR_SIZE-1)));
return (sector << MSDOS_DPS_BITS)+((offset & (SECTOR_SIZE-1)) >>
......
This diff is collapsed.
......@@ -94,11 +94,11 @@ static int proc_lookuproot(struct inode * dir,const char * name, int len,
/* nothing */;
if (i >= 0) {
ino = root_dir[i].low_ino;
if (ino == 1) {
if (ino == PROC_ROOT_INO) {
*result = dir;
return 0;
}
if (ino == 7) /* self modifying inode ... */
if (ino == PROC_SELF) /* self modifying inode ... */
ino = (current->pid << 16) + 2;
} else {
pid = 0;
......
This diff is collapsed.
......@@ -722,14 +722,13 @@ extern int sysv_notify_change(struct inode *inode, struct iattr *attr)
if ((error = inode_change_ok(inode, attr)) != 0)
return error;
inode_setattr(inode, attr);
if (attr->ia_valid & ATTR_MODE)
if (inode->i_sb->sv_kludge_symlinks)
if (inode->i_mode == COH_KLUDGE_SYMLINK_MODE) {
inode->i_mode = COH_KLUDGE_NOT_SYMLINK;
inode->i_dirt = 1;
}
if (attr->ia_mode == COH_KLUDGE_SYMLINK_MODE)
attr->ia_mode = COH_KLUDGE_NOT_SYMLINK;
inode_setattr(inode, attr);
return 0;
}
......
......@@ -7,6 +7,10 @@
#
# Note 2! The CFLAGS definitions are now in the main makefile...
ifndef CONFIG_UMSDOS_FS
CFLAGS := $(CFLAGS) -DMODULE
endif
.c.s:
$(CC) $(CFLAGS) -S $<
.c.o:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment