Commit d1dbcdee authored by Andrew Morton's avatar Andrew Morton Committed by Len Brown

[PATCH] further __KERNEL_SYSCALLS__ removal

From: Arnd Bergmann <arnd@arndb.de>

Dave Jones already removed some of the useless __KERNEL_SYSCALLS__ defines
in various files, this gets rid of almost all the others.  Replacing
execve() is nontrivial, so I left those in for now.

For all the other system calls that are currently used from inside the
kernel, calling the sys_* function directly should always have an identical
effect.
parent 214b914e
...@@ -35,9 +35,6 @@ ...@@ -35,9 +35,6 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/vga.h> #include <asm/vga.h>
#define __KERNEL_SYSCALLS__
#include <asm/unistd.h>
extern struct hwrpb_struct *hwrpb; extern struct hwrpb_struct *hwrpb;
extern void dump_thread(struct pt_regs *, struct user *); extern void dump_thread(struct pt_regs *, struct user *);
extern spinlock_t rtc_lock; extern spinlock_t rtc_lock;
......
...@@ -39,9 +39,6 @@ ...@@ -39,9 +39,6 @@
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#define __KERNEL_SYSCALLS__
#include <asm/unistd.h>
#include "proto.h" #include "proto.h"
#include "irq_impl.h" #include "irq_impl.h"
......
...@@ -91,8 +91,6 @@ ...@@ -91,8 +91,6 @@
* This file handles the architecture-dependent parts of process handling.. * This file handles the architecture-dependent parts of process handling..
*/ */
#define __KERNEL_SYSCALLS__
#include <asm/atomic.h> #include <asm/atomic.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#define __KERNEL_SYSCALLS__
#include <stdarg.h> #include <stdarg.h>
#include <linux/elf.h> #include <linux/elf.h>
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
** the Free Software Foundation; either version 2 of the License, or ** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version. ** (at your option) any later version.
*/ */
#define __KERNEL_SYSCALLS__
#undef ENTRY_SYS_CPUS /* syscall support for iCOD-like functionality */ #undef ENTRY_SYS_CPUS /* syscall support for iCOD-like functionality */
#include <linux/autoconf.h> #include <linux/autoconf.h>
......
...@@ -1108,17 +1108,7 @@ _GLOBAL(name) \ ...@@ -1108,17 +1108,7 @@ _GLOBAL(name) \
li r3,-1; \ li r3,-1; \
blr blr
#define __NR__exit __NR_exit
SYSCALL(setsid)
SYSCALL(open)
SYSCALL(read)
SYSCALL(write)
SYSCALL(lseek)
SYSCALL(close)
SYSCALL(dup)
SYSCALL(execve) SYSCALL(execve)
SYSCALL(waitpid)
/* Why isn't this a) automatic, b) written in 'C'? */ /* Why isn't this a) automatic, b) written in 'C'? */
.data .data
......
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
#include <linux/pmu.h> #include <linux/pmu.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/system.h> #include <asm/system.h>
#define __KERNEL_SYSCALLS__
#include <asm/unistd.h>
#include <asm/pci-bridge.h> #include <asm/pci-bridge.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/pmac_feature.h> #include <asm/pmac_feature.h>
...@@ -189,10 +187,6 @@ EXPORT_SYMBOL(consistent_sync); ...@@ -189,10 +187,6 @@ EXPORT_SYMBOL(consistent_sync);
EXPORT_SYMBOL(flush_dcache_all); EXPORT_SYMBOL(flush_dcache_all);
#endif #endif
EXPORT_SYMBOL(open);
EXPORT_SYMBOL(read);
EXPORT_SYMBOL(lseek);
EXPORT_SYMBOL(close);
EXPORT_SYMBOL(start_thread); EXPORT_SYMBOL(start_thread);
EXPORT_SYMBOL(kernel_thread); EXPORT_SYMBOL(kernel_thread);
......
...@@ -17,8 +17,6 @@ ...@@ -17,8 +17,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/delay.h> #include <linux/delay.h>
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/cache.h> #include <linux/cache.h>
......
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/delay.h> #include <linux/delay.h>
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/delay.h> #include <linux/delay.h>
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/errno.h> #include <linux/errno.h>
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#include <linux/delay.h> #include <linux/delay.h>
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/errno.h> #include <linux/errno.h>
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
* This file handles the architecture-dependent parts of process handling.. * This file handles the architecture-dependent parts of process handling..
*/ */
#define __KERNEL_SYSCALLS__
#include <stdarg.h> #include <stdarg.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -19,7 +18,6 @@ ...@@ -19,7 +18,6 @@
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/user.h> #include <linux/user.h>
......
...@@ -33,9 +33,6 @@ ...@@ -33,9 +33,6 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#define IRQ_RESCHEDULE 13 #define IRQ_RESCHEDULE 13
#define IRQ_STOP_CPU 14 #define IRQ_STOP_CPU 14
#define IRQ_CROSS_CALL 15 #define IRQ_CROSS_CALL 15
......
...@@ -32,9 +32,6 @@ ...@@ -32,9 +32,6 @@
#include <asm/sbus.h> #include <asm/sbus.h>
#include <asm/sbi.h> #include <asm/sbi.h>
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#define IRQ_CROSS_CALL 15 #define IRQ_CROSS_CALL 15
extern ctxd_t *srmmu_ctx_table_phys; extern ctxd_t *srmmu_ctx_table_phys;
......
...@@ -27,9 +27,6 @@ ...@@ -27,9 +27,6 @@
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/hardirq.h> #include <asm/hardirq.h>
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#define IRQ_RESCHEDULE 13 #define IRQ_RESCHEDULE 13
#define IRQ_STOP_CPU 14 #define IRQ_STOP_CPU 14
#define IRQ_CROSS_CALL 15 #define IRQ_CROSS_CALL 15
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
* This file handles the architecture-dependent parts of process handling.. * This file handles the architecture-dependent parts of process handling..
*/ */
#define __KERNEL_SYSCALLS__
#include <stdarg.h> #include <stdarg.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -22,7 +21,6 @@ ...@@ -22,7 +21,6 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/user.h> #include <linux/user.h>
...@@ -43,6 +41,7 @@ ...@@ -43,6 +41,7 @@
#include <asm/fpumacro.h> #include <asm/fpumacro.h>
#include <asm/head.h> #include <asm/head.h>
#include <asm/cpudata.h> #include <asm/cpudata.h>
#include <asm/unistd.h>
/* #define VERBOSE_SHOWREGS */ /* #define VERBOSE_SHOWREGS */
......
...@@ -36,9 +36,6 @@ ...@@ -36,9 +36,6 @@
#include <asm/timer.h> #include <asm/timer.h>
#include <asm/starfire.h> #include <asm/starfire.h>
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
extern int linux_num_cpus; extern int linux_num_cpus;
extern void calibrate_delay(void); extern void calibrate_delay(void);
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
* This file handles the architecture-dependent parts of process handling.. * This file handles the architecture-dependent parts of process handling..
*/ */
#define __KERNEL_SYSCALLS__
#include <stdarg.h> #include <stdarg.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -25,7 +24,6 @@ ...@@ -25,7 +24,6 @@
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/elfcore.h> #include <linux/elfcore.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/unistd.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/user.h> #include <linux/user.h>
#include <linux/module.h> #include <linux/module.h>
......
...@@ -10,8 +10,6 @@ ...@@ -10,8 +10,6 @@
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
*/ */
#define __KERNEL_SYSCALLS__
#include <linux/config.h> #include <linux/config.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/errno.h> #include <linux/errno.h>
...@@ -21,7 +19,6 @@ ...@@ -21,7 +19,6 @@
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/hdreg.h> #include <linux/hdreg.h>
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/unistd.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/ide.h> #include <linux/ide.h>
#include <asm/prom.h> #include <asm/prom.h>
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
*/ */
#define __KERNEL_SYSCALLS__
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
...@@ -58,8 +56,6 @@ static int debug = 0; ...@@ -58,8 +56,6 @@ static int debug = 0;
#define SP8870_FIRMWARE_OFFSET 0x0A #define SP8870_FIRMWARE_OFFSET 0x0A
static int errno;
static struct dvb_frontend_info tdlb7_info = { static struct dvb_frontend_info tdlb7_info = {
.name = "Alps TDLB7", .name = "Alps TDLB7",
.type = FE_OFDM, .type = FE_OFDM,
...@@ -174,13 +170,13 @@ static int sp8870_read_firmware_file (const char *fn, char **fp) ...@@ -174,13 +170,13 @@ static int sp8870_read_firmware_file (const char *fn, char **fp)
loff_t filesize; loff_t filesize;
char *dp; char *dp;
fd = open(fn, 0, 0); fd = sys_open(fn, 0, 0);
if (fd == -1) { if (fd == -1) {
printk("%s: unable to open '%s'.\n", __FUNCTION__, fn); printk("%s: unable to open '%s'.\n", __FUNCTION__, fn);
return -EIO; return -EIO;
} }
filesize = lseek(fd, 0L, 2); filesize = sys_lseek(fd, 0L, 2);
if (filesize <= 0 || filesize < SP8870_FIRMWARE_OFFSET + SP8870_FIRMWARE_SIZE) { if (filesize <= 0 || filesize < SP8870_FIRMWARE_OFFSET + SP8870_FIRMWARE_SIZE) {
printk("%s: firmware filesize to small '%s'\n", __FUNCTION__, fn); printk("%s: firmware filesize to small '%s'\n", __FUNCTION__, fn);
sys_close(fd); sys_close(fd);
...@@ -194,8 +190,8 @@ static int sp8870_read_firmware_file (const char *fn, char **fp) ...@@ -194,8 +190,8 @@ static int sp8870_read_firmware_file (const char *fn, char **fp)
return -EIO; return -EIO;
} }
lseek(fd, SP8870_FIRMWARE_OFFSET, 0); sys_lseek(fd, SP8870_FIRMWARE_OFFSET, 0);
if (read(fd, dp, SP8870_FIRMWARE_SIZE) != SP8870_FIRMWARE_SIZE) { if (sys_read(fd, dp, SP8870_FIRMWARE_SIZE) != SP8870_FIRMWARE_SIZE) {
printk("%s: failed to read '%s'.\n",__FUNCTION__, fn); printk("%s: failed to read '%s'.\n",__FUNCTION__, fn);
vfree(dp); vfree(dp);
sys_close(fd); sys_close(fd);
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
next 0x4000 loaded. This may change in future versions. next 0x4000 loaded. This may change in future versions.
*/ */
#define __KERNEL_SYSCALLS__
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -68,8 +67,6 @@ struct dvb_frontend_info sp887x_info = { ...@@ -68,8 +67,6 @@ struct dvb_frontend_info sp887x_info = {
FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_RECOVER FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_RECOVER
}; };
static int errno;
static static
int i2c_writebytes (struct dvb_frontend *fe, u8 addr, u8 *buf, u8 len) int i2c_writebytes (struct dvb_frontend *fe, u8 addr, u8 *buf, u8 len)
{ {
...@@ -216,13 +213,13 @@ int sp887x_initial_setup (struct dvb_frontend *fe) ...@@ -216,13 +213,13 @@ int sp887x_initial_setup (struct dvb_frontend *fe)
// Load the firmware // Load the firmware
set_fs(get_ds()); set_fs(get_ds());
fd = open(sp887x_firmware, 0, 0); fd = sys_open(sp887x_firmware, 0, 0);
if (fd < 0) { if (fd < 0) {
printk(KERN_WARNING "%s: Unable to open firmware %s\n", __FUNCTION__, printk(KERN_WARNING "%s: Unable to open firmware %s\n", __FUNCTION__,
sp887x_firmware); sp887x_firmware);
return -EIO; return -EIO;
} }
filesize = lseek(fd, 0L, 2); filesize = sys_lseek(fd, 0L, 2);
if (filesize <= 0) { if (filesize <= 0) {
printk(KERN_WARNING "%s: Firmware %s is empty\n", __FUNCTION__, printk(KERN_WARNING "%s: Firmware %s is empty\n", __FUNCTION__,
sp887x_firmware); sp887x_firmware);
...@@ -244,8 +241,8 @@ int sp887x_initial_setup (struct dvb_frontend *fe) ...@@ -244,8 +241,8 @@ int sp887x_initial_setup (struct dvb_frontend *fe)
// read it! // read it!
// read the first 16384 bytes from the file // read the first 16384 bytes from the file
// ignore the first 10 bytes // ignore the first 10 bytes
lseek(fd, 10, 0); sys_lseek(fd, 10, 0);
if (read(fd, firmware, fw_size) != fw_size) { if (sys_read(fd, firmware, fw_size) != fw_size) {
printk(KERN_WARNING "%s: Failed to read firmware\n", __FUNCTION__); printk(KERN_WARNING "%s: Failed to read firmware\n", __FUNCTION__);
vfree(firmware); vfree(firmware);
sys_close(fd); sys_close(fd);
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
*/ */
#define __KERNEL_SYSCALLS__
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/module.h> #include <linux/module.h>
...@@ -41,7 +40,6 @@ ...@@ -41,7 +40,6 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/syscalls.h> #include <linux/syscalls.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/unistd.h>
#include <linux/fcntl.h> #include <linux/fcntl.h>
#include <linux/errno.h> #include <linux/errno.h>
#include "dvb_frontend.h" #include "dvb_frontend.h"
...@@ -399,13 +397,13 @@ static int tda1004x_fwupload(struct dvb_i2c_bus *i2c, struct tda1004x_state *tda ...@@ -399,13 +397,13 @@ static int tda1004x_fwupload(struct dvb_i2c_bus *i2c, struct tda1004x_state *tda
// Load the firmware // Load the firmware
set_fs(get_ds()); set_fs(get_ds());
fd = open(tda1004x_firmware, 0, 0); fd = sys_open(tda1004x_firmware, 0, 0);
if (fd < 0) { if (fd < 0) {
printk("%s: Unable to open firmware %s\n", __FUNCTION__, printk("%s: Unable to open firmware %s\n", __FUNCTION__,
tda1004x_firmware); tda1004x_firmware);
return -EIO; return -EIO;
} }
filesize = lseek(fd, 0L, 2); filesize = sys_lseek(fd, 0L, 2);
if (filesize <= 0) { if (filesize <= 0) {
printk("%s: Firmware %s is empty\n", __FUNCTION__, printk("%s: Firmware %s is empty\n", __FUNCTION__,
tda1004x_firmware); tda1004x_firmware);
...@@ -436,8 +434,8 @@ static int tda1004x_fwupload(struct dvb_i2c_bus *i2c, struct tda1004x_state *tda ...@@ -436,8 +434,8 @@ static int tda1004x_fwupload(struct dvb_i2c_bus *i2c, struct tda1004x_state *tda
} }
// read it! // read it!
lseek(fd, fw_offset, 0); sys_lseek(fd, fw_offset, 0);
if (read(fd, firmware, fw_size) != fw_size) { if (sys_read(fd, firmware, fw_size) != fw_size) {
printk("%s: Failed to read firmware\n", __FUNCTION__); printk("%s: Failed to read firmware\n", __FUNCTION__);
vfree(firmware); vfree(firmware);
sys_close(fd); sys_close(fd);
......
...@@ -46,10 +46,6 @@ ...@@ -46,10 +46,6 @@
#include <linux/ioport.h> // request_region() prototype #include <linux/ioport.h> // request_region() prototype
#include <linux/completion.h> #include <linux/completion.h>
#ifdef __alpha__
#define __KERNEL_SYSCALLS__
#endif
#include <asm/unistd.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/uaccess.h> // ioctl related #include <asm/uaccess.h> // ioctl related
#include <asm/irq.h> #include <asm/irq.h>
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#define USE_BOTTOM_HALF #define USE_BOTTOM_HALF
#endif #endif
#define __KERNEL_SYSCALLS__
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -43,8 +42,6 @@ ...@@ -43,8 +42,6 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#endif #endif
#include <linux/unistd.h>
/* The controller registers can be found in the Z2 config area at these /* The controller registers can be found in the Z2 config area at these
* offsets: * offsets:
*/ */
......
...@@ -954,6 +954,7 @@ asmlinkage long sys_open(const char __user * filename, int flags, int mode) ...@@ -954,6 +954,7 @@ asmlinkage long sys_open(const char __user * filename, int flags, int mode)
fd = error; fd = error;
goto out; goto out;
} }
EXPORT_SYMBOL_GPL(sys_open);
#ifndef __alpha__ #ifndef __alpha__
......
...@@ -143,6 +143,7 @@ asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin) ...@@ -143,6 +143,7 @@ asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin)
bad: bad:
return retval; return retval;
} }
EXPORT_SYMBOL_GPL(sys_lseek);
#if !defined(__alpha__) #if !defined(__alpha__)
asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high, asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high,
...@@ -281,6 +282,7 @@ asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count) ...@@ -281,6 +282,7 @@ asmlinkage ssize_t sys_read(unsigned int fd, char __user * buf, size_t count)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(sys_read);
asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count) asmlinkage ssize_t sys_write(unsigned int fd, const char __user * buf, size_t count)
{ {
......
...@@ -375,6 +375,7 @@ __syscall_return(type,__res); \ ...@@ -375,6 +375,7 @@ __syscall_return(type,__res); \
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/linkage.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
/* /*
......
...@@ -66,11 +66,11 @@ static dev_t __init try_name(char *name, int part) ...@@ -66,11 +66,11 @@ static dev_t __init try_name(char *name, int part)
/* read device number from .../dev */ /* read device number from .../dev */
sprintf(path, "/sys/block/%s/dev", name); sprintf(path, "/sys/block/%s/dev", name);
fd = open(path, 0, 0); fd = sys_open(path, 0, 0);
if (fd < 0) if (fd < 0)
goto fail; goto fail;
len = read(fd, buf, 32); len = sys_read(fd, buf, 32);
close(fd); sys_close(fd);
if (len <= 0 || len == 32 || buf[len - 1] != '\n') if (len <= 0 || len == 32 || buf[len - 1] != '\n')
goto fail; goto fail;
buf[len - 1] = '\0'; buf[len - 1] = '\0';
...@@ -96,11 +96,11 @@ static dev_t __init try_name(char *name, int part) ...@@ -96,11 +96,11 @@ static dev_t __init try_name(char *name, int part)
/* otherwise read range from .../range */ /* otherwise read range from .../range */
sprintf(path, "/sys/block/%s/range", name); sprintf(path, "/sys/block/%s/range", name);
fd = open(path, 0, 0); fd = sys_open(path, 0, 0);
if (fd < 0) if (fd < 0)
goto fail; goto fail;
len = read(fd, buf, 32); len = sys_read(fd, buf, 32);
close(fd); sys_close(fd);
if (len <= 0 || len == 32 || buf[len - 1] != '\n') if (len <= 0 || len == 32 || buf[len - 1] != '\n')
goto fail; goto fail;
buf[len - 1] = '\0'; buf[len - 1] = '\0';
...@@ -288,7 +288,7 @@ void __init mount_block_root(char *name, int flags) ...@@ -288,7 +288,7 @@ void __init mount_block_root(char *name, int flags)
continue; continue;
} }
/* /*
* Allow the user to distinguish between failed open * Allow the user to distinguish between failed sys_open
* and bad superblock on root device. * and bad superblock on root device.
*/ */
__bdevname(ROOT_DEV, b); __bdevname(ROOT_DEV, b);
...@@ -327,21 +327,21 @@ void __init change_floppy(char *fmt, ...) ...@@ -327,21 +327,21 @@ void __init change_floppy(char *fmt, ...)
va_start(args, fmt); va_start(args, fmt);
vsprintf(buf, fmt, args); vsprintf(buf, fmt, args);
va_end(args); va_end(args);
fd = open("/dev/root", O_RDWR | O_NDELAY, 0); fd = sys_open("/dev/root", O_RDWR | O_NDELAY, 0);
if (fd >= 0) { if (fd >= 0) {
sys_ioctl(fd, FDEJECT, 0); sys_ioctl(fd, FDEJECT, 0);
close(fd); sys_close(fd);
} }
printk(KERN_NOTICE "VFS: Insert %s and press ENTER\n", buf); printk(KERN_NOTICE "VFS: Insert %s and press ENTER\n", buf);
fd = open("/dev/console", O_RDWR, 0); fd = sys_open("/dev/console", O_RDWR, 0);
if (fd >= 0) { if (fd >= 0) {
sys_ioctl(fd, TCGETS, (long)&termios); sys_ioctl(fd, TCGETS, (long)&termios);
termios.c_lflag &= ~ICANON; termios.c_lflag &= ~ICANON;
sys_ioctl(fd, TCSETSF, (long)&termios); sys_ioctl(fd, TCSETSF, (long)&termios);
read(fd, &c, 1); sys_read(fd, &c, 1);
termios.c_lflag |= ICANON; termios.c_lflag |= ICANON;
sys_ioctl(fd, TCSETSF, (long)&termios); sys_ioctl(fd, TCSETSF, (long)&termios);
close(fd); sys_close(fd);
} }
} }
#endif #endif
......
#define __KERNEL_SYSCALLS__
#include <linux/config.h> #include <linux/config.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/devfs_fs_kernel.h> #include <linux/devfs_fs_kernel.h>
......
...@@ -24,7 +24,7 @@ static int __init do_read_dir(int fd, void *buf, int len) ...@@ -24,7 +24,7 @@ static int __init do_read_dir(int fd, void *buf, int len)
{ {
long bytes, n; long bytes, n;
char *p = buf; char *p = buf;
lseek(fd, 0, 0); sys_lseek(fd, 0, 0);
for (bytes = 0; bytes < len; bytes += n) { for (bytes = 0; bytes < len; bytes += n) {
n = sys_getdents64(fd, (struct linux_dirent64 *)(p + bytes), n = sys_getdents64(fd, (struct linux_dirent64 *)(p + bytes),
...@@ -45,7 +45,7 @@ static int __init do_read_dir(int fd, void *buf, int len) ...@@ -45,7 +45,7 @@ static int __init do_read_dir(int fd, void *buf, int len)
static void * __init read_dir(char *path, int *len) static void * __init read_dir(char *path, int *len)
{ {
int size; int size;
int fd = open(path, 0, 0); int fd = sys_open(path, 0, 0);
*len = 0; *len = 0;
if (fd < 0) if (fd < 0)
...@@ -58,7 +58,7 @@ static void * __init read_dir(char *path, int *len) ...@@ -58,7 +58,7 @@ static void * __init read_dir(char *path, int *len)
break; break;
n = do_read_dir(fd, p, size); n = do_read_dir(fd, p, size);
if (n > 0) { if (n > 0) {
close(fd); sys_close(fd);
*len = n; *len = n;
return p; return p;
} }
...@@ -68,7 +68,7 @@ static void * __init read_dir(char *path, int *len) ...@@ -68,7 +68,7 @@ static void * __init read_dir(char *path, int *len)
if (n < 0) if (n < 0)
break; break;
} }
close(fd); sys_close(fd);
return NULL; return NULL;
} }
......
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/minix_fs.h> #include <linux/minix_fs.h>
...@@ -28,12 +29,12 @@ static int __init do_linuxrc(void * shell) ...@@ -28,12 +29,12 @@ static int __init do_linuxrc(void * shell)
static char *argv[] = { "linuxrc", NULL, }; static char *argv[] = { "linuxrc", NULL, };
extern char * envp_init[]; extern char * envp_init[];
close(old_fd);close(root_fd); sys_close(old_fd);sys_close(root_fd);
close(0);close(1);close(2); sys_close(0);sys_close(1);sys_close(2);
setsid(); sys_setsid();
(void) open("/dev/console",O_RDWR,0); (void) sys_open("/dev/console",O_RDWR,0);
(void) dup(0); (void) sys_dup(0);
(void) dup(0); (void) sys_dup(0);
return execve(shell, argv, envp_init); return execve(shell, argv, envp_init);
} }
...@@ -47,8 +48,8 @@ static void __init handle_initrd(void) ...@@ -47,8 +48,8 @@ static void __init handle_initrd(void)
/* mount initrd on rootfs' /root */ /* mount initrd on rootfs' /root */
mount_block_root("/dev/root.old", root_mountflags & ~MS_RDONLY); mount_block_root("/dev/root.old", root_mountflags & ~MS_RDONLY);
sys_mkdir("/old", 0700); sys_mkdir("/old", 0700);
root_fd = open("/", 0, 0); root_fd = sys_open("/", 0, 0);
old_fd = open("/old", 0, 0); old_fd = sys_open("/old", 0, 0);
/* move initrd over / and chdir/chroot in initrd root */ /* move initrd over / and chdir/chroot in initrd root */
sys_chdir("/root"); sys_chdir("/root");
sys_mount(".", "/", NULL, MS_MOVE, NULL); sys_mount(".", "/", NULL, MS_MOVE, NULL);
...@@ -57,7 +58,7 @@ static void __init handle_initrd(void) ...@@ -57,7 +58,7 @@ static void __init handle_initrd(void)
pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD); pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
if (pid > 0) { if (pid > 0) {
while (pid != waitpid(-1, &i, 0)) while (pid != sys_wait4(-1, &i, 0, 0))
yield(); yield();
} }
...@@ -67,8 +68,8 @@ static void __init handle_initrd(void) ...@@ -67,8 +68,8 @@ static void __init handle_initrd(void)
/* switch root and cwd back to / of rootfs */ /* switch root and cwd back to / of rootfs */
sys_fchdir(root_fd); sys_fchdir(root_fd);
sys_chroot("."); sys_chroot(".");
close(old_fd); sys_close(old_fd);
close(root_fd); sys_close(root_fd);
umount_devfs("/old/dev"); umount_devfs("/old/dev");
if (new_decode_dev(real_root_dev) == Root_RAM0) { if (new_decode_dev(real_root_dev) == Root_RAM0) {
...@@ -84,7 +85,7 @@ static void __init handle_initrd(void) ...@@ -84,7 +85,7 @@ static void __init handle_initrd(void)
if (!error) if (!error)
printk("okay\n"); printk("okay\n");
else { else {
int fd = open("/dev/root.old", O_RDWR, 0); int fd = sys_open("/dev/root.old", O_RDWR, 0);
printk("failed\n"); printk("failed\n");
printk(KERN_NOTICE "Unmounting old root\n"); printk(KERN_NOTICE "Unmounting old root\n");
sys_umount("/old", MNT_DETACH); sys_umount("/old", MNT_DETACH);
...@@ -93,7 +94,7 @@ static void __init handle_initrd(void) ...@@ -93,7 +94,7 @@ static void __init handle_initrd(void)
error = fd; error = fd;
} else { } else {
error = sys_ioctl(fd, BLKFLSBUF, 0); error = sys_ioctl(fd, BLKFLSBUF, 0);
close(fd); sys_close(fd);
} }
printk(!error ? "okay\n" : "failed\n"); printk(!error ? "okay\n" : "failed\n");
} }
......
...@@ -154,7 +154,7 @@ static void __init md_setup_drive(void) ...@@ -154,7 +154,7 @@ static void __init md_setup_drive(void)
printk(KERN_INFO "md: Loading md%d: %s\n", minor, md_setup_args.device_names[minor]); printk(KERN_INFO "md: Loading md%d: %s\n", minor, md_setup_args.device_names[minor]);
fd = open(name, 0, 0); fd = sys_open(name, 0, 0);
if (fd < 0) { if (fd < 0) {
printk(KERN_ERR "md: open failed - cannot start array %d\n", minor); printk(KERN_ERR "md: open failed - cannot start array %d\n", minor);
continue; continue;
...@@ -163,7 +163,7 @@ static void __init md_setup_drive(void) ...@@ -163,7 +163,7 @@ static void __init md_setup_drive(void)
printk(KERN_WARNING printk(KERN_WARNING
"md: Ignoring md=%d, already autodetected. (Use raid=noautodetect)\n", "md: Ignoring md=%d, already autodetected. (Use raid=noautodetect)\n",
minor); minor);
close(fd); sys_close(fd);
continue; continue;
} }
...@@ -209,7 +209,7 @@ static void __init md_setup_drive(void) ...@@ -209,7 +209,7 @@ static void __init md_setup_drive(void)
err = sys_ioctl(fd, RUN_ARRAY, 0); err = sys_ioctl(fd, RUN_ARRAY, 0);
if (err) if (err)
printk(KERN_WARNING "md: starting md%d failed\n", minor); printk(KERN_WARNING "md: starting md%d failed\n", minor);
close(fd); sys_close(fd);
} }
} }
...@@ -243,10 +243,10 @@ void __init md_run_setup(void) ...@@ -243,10 +243,10 @@ void __init md_run_setup(void)
if (raid_noautodetect) if (raid_noautodetect)
printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=noautodetect)\n"); printk(KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=noautodetect)\n");
else { else {
int fd = open("/dev/md0", 0, 0); int fd = sys_open("/dev/md0", 0, 0);
if (fd >= 0) { if (fd >= 0) {
sys_ioctl(fd, RAID_AUTORUN, 0); sys_ioctl(fd, RAID_AUTORUN, 0);
close(fd); sys_close(fd);
} }
} }
md_setup_drive(); md_setup_drive();
......
...@@ -69,8 +69,8 @@ identify_ramdisk_image(int fd, int start_block) ...@@ -69,8 +69,8 @@ identify_ramdisk_image(int fd, int start_block)
/* /*
* Read block 0 to test for gzipped kernel * Read block 0 to test for gzipped kernel
*/ */
lseek(fd, start_block * BLOCK_SIZE, 0); sys_lseek(fd, start_block * BLOCK_SIZE, 0);
read(fd, buf, size); sys_read(fd, buf, size);
/* /*
* If it matches the gzip magic numbers, return -1 * If it matches the gzip magic numbers, return -1
...@@ -104,8 +104,8 @@ identify_ramdisk_image(int fd, int start_block) ...@@ -104,8 +104,8 @@ identify_ramdisk_image(int fd, int start_block)
/* /*
* Read block 1 to test for minix and ext2 superblock * Read block 1 to test for minix and ext2 superblock
*/ */
lseek(fd, (start_block+1) * BLOCK_SIZE, 0); sys_lseek(fd, (start_block+1) * BLOCK_SIZE, 0);
read(fd, buf, size); sys_read(fd, buf, size);
/* Try minix */ /* Try minix */
if (minixsb->s_magic == MINIX_SUPER_MAGIC || if (minixsb->s_magic == MINIX_SUPER_MAGIC ||
...@@ -131,7 +131,7 @@ identify_ramdisk_image(int fd, int start_block) ...@@ -131,7 +131,7 @@ identify_ramdisk_image(int fd, int start_block)
start_block); start_block);
done: done:
lseek(fd, start_block * BLOCK_SIZE, 0); sys_lseek(fd, start_block * BLOCK_SIZE, 0);
kfree(buf); kfree(buf);
return nblocks; return nblocks;
} }
...@@ -148,11 +148,11 @@ int __init rd_load_image(char *from) ...@@ -148,11 +148,11 @@ int __init rd_load_image(char *from)
char rotator[4] = { '|' , '/' , '-' , '\\' }; char rotator[4] = { '|' , '/' , '-' , '\\' };
#endif #endif
out_fd = open("/dev/ram", O_RDWR, 0); out_fd = sys_open("/dev/ram", O_RDWR, 0);
if (out_fd < 0) if (out_fd < 0)
goto out; goto out;
in_fd = open(from, O_RDONLY, 0); in_fd = sys_open(from, O_RDONLY, 0);
if (in_fd < 0) if (in_fd < 0)
goto noclose_input; goto noclose_input;
...@@ -217,20 +217,20 @@ int __init rd_load_image(char *from) ...@@ -217,20 +217,20 @@ int __init rd_load_image(char *from)
if (i && (i % devblocks == 0)) { if (i && (i % devblocks == 0)) {
printk("done disk #%d.\n", disk++); printk("done disk #%d.\n", disk++);
rotate = 0; rotate = 0;
if (close(in_fd)) { if (sys_close(in_fd)) {
printk("Error closing the disk.\n"); printk("Error closing the disk.\n");
goto noclose_input; goto noclose_input;
} }
change_floppy("disk #%d", disk); change_floppy("disk #%d", disk);
in_fd = open(from, O_RDONLY, 0); in_fd = sys_open(from, O_RDONLY, 0);
if (in_fd < 0) { if (in_fd < 0) {
printk("Error opening disk.\n"); printk("Error opening disk.\n");
goto noclose_input; goto noclose_input;
} }
printk("Loading disk #%d... ", disk); printk("Loading disk #%d... ", disk);
} }
read(in_fd, buf, BLOCK_SIZE); sys_read(in_fd, buf, BLOCK_SIZE);
write(out_fd, buf, BLOCK_SIZE); sys_write(out_fd, buf, BLOCK_SIZE);
#if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_PPC_ISERIES) #if !defined(CONFIG_ARCH_S390) && !defined(CONFIG_PPC_ISERIES)
if (!(i % 16)) { if (!(i % 16)) {
printk("%c\b", rotator[rotate & 0x3]); printk("%c\b", rotator[rotate & 0x3]);
...@@ -243,9 +243,9 @@ int __init rd_load_image(char *from) ...@@ -243,9 +243,9 @@ int __init rd_load_image(char *from)
successful_load: successful_load:
res = 1; res = 1;
done: done:
close(in_fd); sys_close(in_fd);
noclose_input: noclose_input:
close(out_fd); sys_close(out_fd);
out: out:
kfree(buf); kfree(buf);
sys_unlink("/dev/ram"); sys_unlink("/dev/ram");
...@@ -342,7 +342,7 @@ static int __init fill_inbuf(void) ...@@ -342,7 +342,7 @@ static int __init fill_inbuf(void)
{ {
if (exit_code) return -1; if (exit_code) return -1;
insize = read(crd_infd, inbuf, INBUFSIZ); insize = sys_read(crd_infd, inbuf, INBUFSIZ);
if (insize == 0) { if (insize == 0) {
error("RAMDISK: ran out of compressed data"); error("RAMDISK: ran out of compressed data");
return -1; return -1;
...@@ -363,7 +363,7 @@ static void __init flush_window(void) ...@@ -363,7 +363,7 @@ static void __init flush_window(void)
unsigned n, written; unsigned n, written;
uch *in, ch; uch *in, ch;
written = write(crd_outfd, window, outcnt); written = sys_write(crd_outfd, window, outcnt);
if (written != outcnt && unzip_error == 0) { if (written != outcnt && unzip_error == 0) {
printk(KERN_ERR "RAMDISK: incomplete write (%d != %d) %ld\n", printk(KERN_ERR "RAMDISK: incomplete write (%d != %d) %ld\n",
written, outcnt, bytes_out); written, outcnt, bytes_out);
......
#define __KERNEL_SYSCALLS__
#include <linux/init.h> #include <linux/init.h>
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/fcntl.h> #include <linux/fcntl.h>
#include <linux/unistd.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/syscalls.h> #include <linux/syscalls.h>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <linux/devfs_fs_kernel.h> #include <linux/devfs_fs_kernel.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/syscalls.h> #include <linux/syscalls.h>
#include <linux/unistd.h>
#include <linux/string.h> #include <linux/string.h>
#include <linux/ctype.h> #include <linux/ctype.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -42,6 +41,7 @@ ...@@ -42,6 +41,7 @@
#include <linux/writeback.h> #include <linux/writeback.h>
#include <linux/cpu.h> #include <linux/cpu.h>
#include <linux/efi.h> #include <linux/efi.h>
#include <linux/unistd.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/bugs.h> #include <asm/bugs.h>
...@@ -612,11 +612,11 @@ static int init(void * unused) ...@@ -612,11 +612,11 @@ static int init(void * unused)
unlock_kernel(); unlock_kernel();
system_running = 1; system_running = 1;
if (open("/dev/console", O_RDWR, 0) < 0) if (sys_open("/dev/console", O_RDWR, 0) < 0)
printk("Warning: unable to open an initial console.\n"); printk("Warning: unable to open an initial console.\n");
(void) dup(0); (void) sys_dup(0);
(void) dup(0); (void) sys_dup(0);
/* /*
* We try each of these until one succeeds. * We try each of these until one succeeds.
......
...@@ -1913,11 +1913,11 @@ wavefront_reset_to_cleanliness (snd_wavefront_t *dev) ...@@ -1913,11 +1913,11 @@ wavefront_reset_to_cleanliness (snd_wavefront_t *dev)
return (1); return (1);
} }
#define __KERNEL_SYSCALLS__
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/unistd.h> #include <linux/unistd.h>
#include <linux/syscalls.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
static int errno; static int errno;
...@@ -1947,7 +1947,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path) ...@@ -1947,7 +1947,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path)
fs = get_fs(); fs = get_fs();
set_fs (get_ds()); set_fs (get_ds());
if ((fd = open (path, 0, 0)) < 0) { if ((fd = sys_open (path, 0, 0)) < 0) {
snd_printk ("Unable to load \"%s\".\n", snd_printk ("Unable to load \"%s\".\n",
path); path);
return 1; return 1;
...@@ -1956,7 +1956,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path) ...@@ -1956,7 +1956,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path)
while (1) { while (1) {
int x; int x;
if ((x = read (fd, &section_length, sizeof (section_length))) != if ((x = sys_read (fd, &section_length, sizeof (section_length))) !=
sizeof (section_length)) { sizeof (section_length)) {
snd_printk ("firmware read error.\n"); snd_printk ("firmware read error.\n");
goto failure; goto failure;
...@@ -1966,7 +1966,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path) ...@@ -1966,7 +1966,7 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path)
break; break;
} }
if (read (fd, section, section_length) != section_length) { if (sys_read (fd, section, section_length) != section_length) {
snd_printk ("firmware section " snd_printk ("firmware section "
"read error.\n"); "read error.\n");
goto failure; goto failure;
...@@ -2005,12 +2005,12 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path) ...@@ -2005,12 +2005,12 @@ wavefront_download_firmware (snd_wavefront_t *dev, char *path)
} }
close (fd); sys_close (fd);
set_fs (fs); set_fs (fs);
return 0; return 0;
failure: failure:
close (fd); sys_close (fd);
set_fs (fs); set_fs (fs);
snd_printk ("firmware download failed!!!\n"); snd_printk ("firmware download failed!!!\n");
return 1; return 1;
......
...@@ -2490,11 +2490,9 @@ static int __init detect_wavefront (int irq, int io_base) ...@@ -2490,11 +2490,9 @@ static int __init detect_wavefront (int irq, int io_base)
} }
#include "os.h" #include "os.h"
#define __KERNEL_SYSCALLS__
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/unistd.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
static int errno; static int errno;
...@@ -2524,7 +2522,7 @@ wavefront_download_firmware (char *path) ...@@ -2524,7 +2522,7 @@ wavefront_download_firmware (char *path)
fs = get_fs(); fs = get_fs();
set_fs (get_ds()); set_fs (get_ds());
if ((fd = open (path, 0, 0)) < 0) { if ((fd = sys_open (path, 0, 0)) < 0) {
printk (KERN_WARNING LOGNAME "Unable to load \"%s\".\n", printk (KERN_WARNING LOGNAME "Unable to load \"%s\".\n",
path); path);
return 1; return 1;
...@@ -2533,7 +2531,7 @@ wavefront_download_firmware (char *path) ...@@ -2533,7 +2531,7 @@ wavefront_download_firmware (char *path)
while (1) { while (1) {
int x; int x;
if ((x = read (fd, &section_length, sizeof (section_length))) != if ((x = sys_read (fd, &section_length, sizeof (section_length))) !=
sizeof (section_length)) { sizeof (section_length)) {
printk (KERN_ERR LOGNAME "firmware read error.\n"); printk (KERN_ERR LOGNAME "firmware read error.\n");
goto failure; goto failure;
...@@ -2543,7 +2541,7 @@ wavefront_download_firmware (char *path) ...@@ -2543,7 +2541,7 @@ wavefront_download_firmware (char *path)
break; break;
} }
if (read (fd, section, section_length) != section_length) { if (sys_read (fd, section, section_length) != section_length) {
printk (KERN_ERR LOGNAME "firmware section " printk (KERN_ERR LOGNAME "firmware section "
"read error.\n"); "read error.\n");
goto failure; goto failure;
...@@ -2582,12 +2580,12 @@ wavefront_download_firmware (char *path) ...@@ -2582,12 +2580,12 @@ wavefront_download_firmware (char *path)
} }
close (fd); sys_close (fd);
set_fs (fs); set_fs (fs);
return 0; return 0;
failure: failure:
close (fd); sys_close (fd);
set_fs (fs); set_fs (fs);
printk (KERN_ERR "\nWaveFront: firmware download failed!!!\n"); printk (KERN_ERR "\nWaveFront: firmware download failed!!!\n");
return 1; return 1;
......
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