Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
1592dac2
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
1592dac2
编写于
3月 17, 2005
作者:
R
Ralf Baechle
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reformatting, remove debugging code.
Signed-off-by:
N
Ralf Baechle
<
ralf@linux-mips.org
>
上级
b4dbf95e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
32 addition
and
39 deletion
+32
-39
arch/mips/kernel/irixioctl.c
arch/mips/kernel/irixioctl.c
+26
-37
include/asm-mips/inventory.h
include/asm-mips/inventory.h
+6
-2
未找到文件。
arch/mips/kernel/irixioctl.c
浏览文件 @
1592dac2
...
...
@@ -59,7 +59,7 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg)
{
struct
tty_struct
*
tp
,
*
rtp
;
mm_segment_t
old_fs
;
int
error
=
0
;
int
i
,
error
=
0
;
#ifdef DEBUG_IOCTLS
printk
(
"[%s:%d] irix_ioctl(%d, "
,
current
->
comm
,
current
->
pid
,
fd
);
...
...
@@ -74,12 +74,13 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg)
case
0x0000540d
:
{
struct
termios
kt
;
struct
irix_termios
*
it
=
(
struct
irix_termios
*
)
arg
;
struct
irix_termios
__user
*
it
=
(
struct
irix_termios
__user
*
)
arg
;
#ifdef DEBUG_IOCTLS
printk
(
"TCGETS, %08lx) "
,
arg
);
#endif
if
(
!
access_ok
(
VERIFY_WRITE
,
it
,
sizeof
(
*
it
)))
{
if
(
!
access_ok
(
VERIFY_WRITE
,
it
,
sizeof
(
*
it
)))
{
error
=
-
EFAULT
;
break
;
}
...
...
@@ -88,13 +89,14 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg)
set_fs
(
old_fs
);
if
(
error
)
break
;
__put_user
(
kt
.
c_iflag
,
&
it
->
c_iflag
);
__put_user
(
kt
.
c_oflag
,
&
it
->
c_oflag
);
__put_user
(
kt
.
c_cflag
,
&
it
->
c_cflag
);
__put_user
(
kt
.
c_lflag
,
&
it
->
c_lflag
);
for
(
error
=
0
;
error
<
NCCS
;
error
++
)
__put_user
(
kt
.
c_cc
[
error
],
&
it
->
c_cc
[
error
]);
error
=
0
;
error
=
__put_user
(
kt
.
c_iflag
,
&
it
->
c_iflag
);
error
|=
__put_user
(
kt
.
c_oflag
,
&
it
->
c_oflag
);
error
|=
__put_user
(
kt
.
c_cflag
,
&
it
->
c_cflag
);
error
|=
__put_user
(
kt
.
c_lflag
,
&
it
->
c_lflag
);
for
(
i
=
0
;
i
<
NCCS
;
i
++
)
error
|=
__put_user
(
kt
.
c_cc
[
i
],
&
it
->
c_cc
[
i
]);
break
;
}
...
...
@@ -112,14 +114,19 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg)
old_fs
=
get_fs
();
set_fs
(
get_ds
());
error
=
sys_ioctl
(
fd
,
TCGETS
,
(
unsigned
long
)
&
kt
);
set_fs
(
old_fs
);
if
(
error
)
if
(
error
)
break
;
error
=
__get_user
(
kt
.
c_iflag
,
&
it
->
c_iflag
);
error
|=
__get_user
(
kt
.
c_oflag
,
&
it
->
c_oflag
);
error
|=
__get_user
(
kt
.
c_cflag
,
&
it
->
c_cflag
);
error
|=
__get_user
(
kt
.
c_lflag
,
&
it
->
c_lflag
);
for
(
i
=
0
;
i
<
NCCS
;
i
++
)
error
|=
__get_user
(
kt
.
c_cc
[
i
],
&
it
->
c_cc
[
i
]);
if
(
error
)
break
;
__get_user
(
kt
.
c_iflag
,
&
it
->
c_iflag
);
__get_user
(
kt
.
c_oflag
,
&
it
->
c_oflag
);
__get_user
(
kt
.
c_cflag
,
&
it
->
c_cflag
);
__get_user
(
kt
.
c_lflag
,
&
it
->
c_lflag
);
for
(
error
=
0
;
error
<
NCCS
;
error
++
)
__get_user
(
kt
.
c_cc
[
error
],
&
it
->
c_cc
[
error
]);
old_fs
=
get_fs
();
set_fs
(
get_ds
());
error
=
sys_ioctl
(
fd
,
TCSETS
,
(
unsigned
long
)
&
kt
);
set_fs
(
old_fs
);
...
...
@@ -153,7 +160,7 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg)
#ifdef DEBUG_IOCTLS
printk
(
"rtp->session=%d "
,
rtp
->
session
);
#endif
error
=
put_user
(
rtp
->
session
,
(
unsigned
long
*
)
arg
);
error
=
put_user
(
rtp
->
session
,
(
unsigned
long
__user
*
)
arg
);
break
;
case
0x746e
:
...
...
@@ -195,50 +202,32 @@ asmlinkage int irix_ioctl(int fd, unsigned long cmd, unsigned long arg)
break
;
case
0x8004667e
:
#ifdef DEBUG_IOCTLS
printk
(
"FIONBIO, %08lx) arg=%d "
,
arg
,
*
(
int
*
)
arg
);
#endif
error
=
sys_ioctl
(
fd
,
FIONBIO
,
arg
);
break
;
case
0x80047476
:
#ifdef DEBUG_IOCTLS
printk
(
"TIOCSPGRP, %08lx) arg=%d "
,
arg
,
*
(
int
*
)
arg
);
#endif
error
=
sys_ioctl
(
fd
,
TIOCSPGRP
,
arg
);
break
;
case
0x8020690c
:
#ifdef DEBUG_IOCTLS
printk
(
"SIOCSIFADDR, %08lx) arg=%d "
,
arg
,
*
(
int
*
)
arg
);
#endif
error
=
sys_ioctl
(
fd
,
SIOCSIFADDR
,
arg
);
break
;
case
0x80206910
:
#ifdef DEBUG_IOCTLS
printk
(
"SIOCSIFFLAGS, %08lx) arg=%d "
,
arg
,
*
(
int
*
)
arg
);
#endif
error
=
sys_ioctl
(
fd
,
SIOCSIFFLAGS
,
arg
);
break
;
case
0xc0206911
:
#ifdef DEBUG_IOCTLS
printk
(
"SIOCGIFFLAGS, %08lx) arg=%d "
,
arg
,
*
(
int
*
)
arg
);
#endif
error
=
sys_ioctl
(
fd
,
SIOCGIFFLAGS
,
arg
);
break
;
case
0xc020691b
:
#ifdef DEBUG_IOCTLS
printk
(
"SIOCGIFMETRIC, %08lx) arg=%d "
,
arg
,
*
(
int
*
)
arg
);
#endif
error
=
sys_ioctl
(
fd
,
SIOCGIFMETRIC
,
arg
);
break
;
default:
{
#ifdef DEBUG_MISSING_IOCTL
char
*
msg
=
"Unimplemented IOCTL cmd tell linux
@engr.sgi.com
\n
"
;
char
*
msg
=
"Unimplemented IOCTL cmd tell linux
-mips@linux-mips.org
\n
"
;
#ifdef DEBUG_IOCTLS
printk
(
"UNIMP_IOCTL, %08lx)
\n
"
,
arg
);
...
...
include/asm-mips/inventory.h
浏览文件 @
1592dac2
...
...
@@ -4,6 +4,8 @@
#ifndef __ASM_INVENTORY_H
#define __ASM_INVENTORY_H
#include <linux/compiler.h>
typedef
struct
inventory_s
{
struct
inventory_s
*
inv_next
;
int
inv_class
;
...
...
@@ -14,7 +16,9 @@ typedef struct inventory_s {
}
inventory_t
;
extern
int
inventory_items
;
void
add_to_inventory
(
int
class
,
int
type
,
int
controller
,
int
unit
,
int
state
);
int
dump_inventory_to_user
(
void
*
userbuf
,
int
size
);
extern
void
add_to_inventory
(
int
class
,
int
type
,
int
controller
,
int
unit
,
int
state
);
extern
int
dump_inventory_to_user
(
void
__user
*
userbuf
,
int
size
);
extern
int
__init
init_inventory
(
void
);
#endif
/* __ASM_INVENTORY_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录