Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
74f3c8af
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
74f3c8af
编写于
8月 27, 2007
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] switch scsi_cmd_ioctl() to passing fmode_t
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
e915e872
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
20 addition
and
18 deletion
+20
-18
block/bsg.c
block/bsg.c
+1
-1
block/scsi_ioctl.c
block/scsi_ioctl.c
+5
-5
drivers/block/cciss.c
drivers/block/cciss.c
+2
-1
drivers/block/ub.c
drivers/block/ub.c
+1
-1
drivers/block/virtio_blk.c
drivers/block/virtio_blk.c
+2
-2
drivers/cdrom/cdrom.c
drivers/cdrom/cdrom.c
+1
-1
drivers/ide/ide-floppy_ioctl.c
drivers/ide/ide-floppy_ioctl.c
+2
-2
drivers/scsi/sd.c
drivers/scsi/sd.c
+2
-1
drivers/scsi/st.c
drivers/scsi/st.c
+2
-2
include/linux/blkdev.h
include/linux/blkdev.h
+2
-2
未找到文件。
block/bsg.c
浏览文件 @
74f3c8af
...
...
@@ -914,7 +914,7 @@ static long bsg_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
case
SG_EMULATED_HOST
:
case
SCSI_IOCTL_SEND_COMMAND
:
{
void
__user
*
uarg
=
(
void
__user
*
)
arg
;
return
scsi_cmd_ioctl
(
file
,
bd
->
queue
,
NULL
,
cmd
,
uarg
);
return
scsi_cmd_ioctl
(
bd
->
queue
,
NULL
,
file
->
f_mode
,
cmd
,
uarg
);
}
case
SG_IO
:
{
struct
request
*
rq
;
...
...
block/scsi_ioctl.c
浏览文件 @
74f3c8af
...
...
@@ -517,8 +517,8 @@ static inline int blk_send_start_stop(struct request_queue *q,
return
__blk_send_generic
(
q
,
bd_disk
,
GPCMD_START_STOP_UNIT
,
data
);
}
int
scsi_cmd_ioctl
(
struct
file
*
file
,
struct
request_queue
*
q
,
struct
gendisk
*
bd_disk
,
unsigned
int
cmd
,
void
__user
*
arg
)
int
scsi_cmd_ioctl
(
struct
request_queue
*
q
,
struct
gendisk
*
bd_disk
,
fmode_t
mode
,
unsigned
int
cmd
,
void
__user
*
arg
)
{
int
err
;
...
...
@@ -559,7 +559,7 @@ int scsi_cmd_ioctl(struct file *file, struct request_queue *q,
err
=
-
EFAULT
;
if
(
copy_from_user
(
&
hdr
,
arg
,
sizeof
(
hdr
)))
break
;
err
=
sg_io
(
q
,
bd_disk
,
&
hdr
,
file
?
file
->
f_mode
:
0
);
err
=
sg_io
(
q
,
bd_disk
,
&
hdr
,
mode
);
if
(
err
==
-
EFAULT
)
break
;
...
...
@@ -607,7 +607,7 @@ int scsi_cmd_ioctl(struct file *file, struct request_queue *q,
hdr
.
cmdp
=
((
struct
cdrom_generic_command
__user
*
)
arg
)
->
cmd
;
hdr
.
cmd_len
=
sizeof
(
cgc
.
cmd
);
err
=
sg_io
(
q
,
bd_disk
,
&
hdr
,
file
?
file
->
f_mode
:
0
);
err
=
sg_io
(
q
,
bd_disk
,
&
hdr
,
mode
);
if
(
err
==
-
EFAULT
)
break
;
...
...
@@ -631,7 +631,7 @@ int scsi_cmd_ioctl(struct file *file, struct request_queue *q,
if
(
!
arg
)
break
;
err
=
sg_scsi_ioctl
(
q
,
bd_disk
,
file
?
file
->
f_mode
:
0
,
arg
);
err
=
sg_scsi_ioctl
(
q
,
bd_disk
,
mode
,
arg
);
break
;
case
CDROMCLOSETRAY
:
err
=
blk_send_start_stop
(
q
,
bd_disk
,
0x03
);
...
...
drivers/block/cciss.c
浏览文件 @
74f3c8af
...
...
@@ -1232,7 +1232,8 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
case
SG_EMULATED_HOST
:
case
SG_IO
:
case
SCSI_IOCTL_SEND_COMMAND
:
return
scsi_cmd_ioctl
(
filep
,
disk
->
queue
,
disk
,
cmd
,
argp
);
return
scsi_cmd_ioctl
(
disk
->
queue
,
disk
,
filep
?
filep
->
f_mode
:
0
,
cmd
,
argp
);
/* scsi_cmd_ioctl would normally handle these, below, but */
/* they aren't a good fit for cciss, as CD-ROMs are */
...
...
drivers/block/ub.c
浏览文件 @
74f3c8af
...
...
@@ -1729,7 +1729,7 @@ static int ub_bd_ioctl(struct inode *inode, struct file *filp,
struct
gendisk
*
disk
=
inode
->
i_bdev
->
bd_disk
;
void
__user
*
usermem
=
(
void
__user
*
)
arg
;
return
scsi_cmd_ioctl
(
filp
,
disk
->
queue
,
disk
,
cmd
,
usermem
);
return
scsi_cmd_ioctl
(
disk
->
queue
,
disk
,
filp
?
filp
->
f_mode
:
0
,
cmd
,
usermem
);
}
/*
...
...
drivers/block/virtio_blk.c
浏览文件 @
74f3c8af
...
...
@@ -149,8 +149,8 @@ static void do_virtblk_request(struct request_queue *q)
static
int
virtblk_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
cmd
,
unsigned
long
data
)
{
return
scsi_cmd_ioctl
(
filp
,
inode
->
i_bdev
->
bd_disk
->
queue
,
inode
->
i_bdev
->
bd_disk
,
cmd
,
return
scsi_cmd_ioctl
(
inode
->
i_bdev
->
bd_disk
->
queue
,
inode
->
i_bdev
->
bd_disk
,
filp
->
f_mode
,
cmd
,
(
void
__user
*
)
data
);
}
...
...
drivers/cdrom/cdrom.c
浏览文件 @
74f3c8af
...
...
@@ -2672,7 +2672,7 @@ int cdrom_ioctl(struct file * file, struct cdrom_device_info *cdi,
/*
* Try the generic SCSI command ioctl's first.
*/
ret
=
scsi_cmd_ioctl
(
file
,
disk
->
queue
,
disk
,
cmd
,
argp
);
ret
=
scsi_cmd_ioctl
(
disk
->
queue
,
disk
,
file
?
file
->
f_mode
:
0
,
cmd
,
argp
);
if
(
ret
!=
-
ENOTTY
)
return
ret
;
...
...
drivers/ide/ide-floppy_ioctl.c
浏览文件 @
74f3c8af
...
...
@@ -280,8 +280,8 @@ int ide_floppy_ioctl(ide_drive_t *drive, struct inode *inode,
* and CDROM_SEND_PACKET (legacy) ioctls
*/
if
(
cmd
!=
CDROM_SEND_PACKET
&&
cmd
!=
SCSI_IOCTL_SEND_COMMAND
)
err
=
scsi_cmd_ioctl
(
file
,
bdev
->
bd_disk
->
queue
,
bdev
->
bd_disk
,
cmd
,
argp
);
err
=
scsi_cmd_ioctl
(
bdev
->
bd_disk
->
queue
,
bdev
->
bd_disk
,
file
?
file
->
f_mode
:
0
,
cmd
,
argp
);
if
(
err
==
-
ENOTTY
)
err
=
generic_ide_ioctl
(
drive
,
file
,
bdev
,
cmd
,
arg
);
...
...
drivers/scsi/sd.c
浏览文件 @
74f3c8af
...
...
@@ -775,7 +775,8 @@ static int sd_ioctl(struct inode * inode, struct file * filp,
case
SCSI_IOCTL_GET_BUS_NUMBER
:
return
scsi_ioctl
(
sdp
,
cmd
,
p
);
default:
error
=
scsi_cmd_ioctl
(
filp
,
disk
->
queue
,
disk
,
cmd
,
p
);
error
=
scsi_cmd_ioctl
(
disk
->
queue
,
disk
,
filp
?
filp
->
f_mode
:
0
,
cmd
,
p
);
if
(
error
!=
-
ENOTTY
)
return
error
;
}
...
...
drivers/scsi/st.c
浏览文件 @
74f3c8af
...
...
@@ -3567,8 +3567,8 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
!
capable
(
CAP_SYS_RAWIO
))
i
=
-
EPERM
;
else
i
=
scsi_cmd_ioctl
(
file
,
STp
->
disk
->
queue
,
STp
->
disk
,
cmd_in
,
p
);
i
=
scsi_cmd_ioctl
(
STp
->
disk
->
queue
,
STp
->
disk
,
file
->
f_mode
,
cmd_in
,
p
);
if
(
i
!=
-
ENOTTY
)
return
i
;
break
;
...
...
include/linux/blkdev.h
浏览文件 @
74f3c8af
...
...
@@ -717,8 +717,8 @@ extern void blk_plug_device(struct request_queue *);
extern
void
blk_plug_device_unlocked
(
struct
request_queue
*
);
extern
int
blk_remove_plug
(
struct
request_queue
*
);
extern
void
blk_recount_segments
(
struct
request_queue
*
,
struct
bio
*
);
extern
int
scsi_cmd_ioctl
(
struct
file
*
,
struct
request_queue
*
,
struct
gendisk
*
,
unsigned
int
,
void
__user
*
);
extern
int
scsi_cmd_ioctl
(
struct
request_queue
*
,
struct
gendisk
*
,
fmode_t
,
unsigned
int
,
void
__user
*
);
extern
int
sg_scsi_ioctl
(
struct
request_queue
*
,
struct
gendisk
*
,
fmode_t
,
struct
scsi_ioctl_command
__user
*
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录