Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
8cfc7ca4
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
8cfc7ca4
编写于
3月 02, 2008
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] switch pf
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
b6a89530
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
13 deletion
+13
-13
drivers/block/paride/pf.c
drivers/block/paride/pf.c
+13
-13
未找到文件。
drivers/block/paride/pf.c
浏览文件 @
8cfc7ca4
...
@@ -201,13 +201,13 @@ module_param_array(drive3, int, NULL, 0);
...
@@ -201,13 +201,13 @@ module_param_array(drive3, int, NULL, 0);
#define ATAPI_READ_10 0x28
#define ATAPI_READ_10 0x28
#define ATAPI_WRITE_10 0x2a
#define ATAPI_WRITE_10 0x2a
static
int
pf_open
(
struct
inode
*
inode
,
struct
file
*
fil
e
);
static
int
pf_open
(
struct
block_device
*
bdev
,
fmode_t
mod
e
);
static
void
do_pf_request
(
struct
request_queue
*
q
);
static
void
do_pf_request
(
struct
request_queue
*
q
);
static
int
pf_ioctl
(
struct
inode
*
inode
,
struct
file
*
fil
e
,
static
int
pf_ioctl
(
struct
block_device
*
bdev
,
fmode_t
mod
e
,
unsigned
int
cmd
,
unsigned
long
arg
);
unsigned
int
cmd
,
unsigned
long
arg
);
static
int
pf_getgeo
(
struct
block_device
*
bdev
,
struct
hd_geometry
*
geo
);
static
int
pf_getgeo
(
struct
block_device
*
bdev
,
struct
hd_geometry
*
geo
);
static
int
pf_release
(
struct
inode
*
inode
,
struct
file
*
fil
e
);
static
int
pf_release
(
struct
gendisk
*
disk
,
fmode_t
mod
e
);
static
int
pf_detect
(
void
);
static
int
pf_detect
(
void
);
static
void
do_pf_read
(
void
);
static
void
do_pf_read
(
void
);
...
@@ -264,9 +264,9 @@ static char *pf_buf; /* buffer for request in progress */
...
@@ -264,9 +264,9 @@ static char *pf_buf; /* buffer for request in progress */
static
struct
block_device_operations
pf_fops
=
{
static
struct
block_device_operations
pf_fops
=
{
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
.
__
open
=
pf_open
,
.
open
=
pf_open
,
.
__
release
=
pf_release
,
.
release
=
pf_release
,
.
__ioctl
=
pf_ioctl
,
.
locked_ioctl
=
pf_ioctl
,
.
getgeo
=
pf_getgeo
,
.
getgeo
=
pf_getgeo
,
.
media_changed
=
pf_check_media
,
.
media_changed
=
pf_check_media
,
};
};
...
@@ -296,16 +296,16 @@ static void __init pf_init_units(void)
...
@@ -296,16 +296,16 @@ static void __init pf_init_units(void)
}
}
}
}
static
int
pf_open
(
struct
inode
*
inode
,
struct
file
*
fil
e
)
static
int
pf_open
(
struct
block_device
*
bdev
,
fmode_t
mod
e
)
{
{
struct
pf_unit
*
pf
=
inode
->
i_
bdev
->
bd_disk
->
private_data
;
struct
pf_unit
*
pf
=
bdev
->
bd_disk
->
private_data
;
pf_identify
(
pf
);
pf_identify
(
pf
);
if
(
pf
->
media_status
==
PF_NM
)
if
(
pf
->
media_status
==
PF_NM
)
return
-
ENODEV
;
return
-
ENODEV
;
if
((
pf
->
media_status
==
PF_RO
)
&&
(
file
->
f_
mode
&
FMODE_WRITE
))
if
((
pf
->
media_status
==
PF_RO
)
&&
(
mode
&
FMODE_WRITE
))
return
-
EROFS
;
return
-
EROFS
;
pf
->
access
++
;
pf
->
access
++
;
...
@@ -333,9 +333,9 @@ static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo)
...
@@ -333,9 +333,9 @@ static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo)
return
0
;
return
0
;
}
}
static
int
pf_ioctl
(
struct
inode
*
inode
,
struct
file
*
fil
e
,
unsigned
int
cmd
,
unsigned
long
arg
)
static
int
pf_ioctl
(
struct
block_device
*
bdev
,
fmode_t
mod
e
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
struct
pf_unit
*
pf
=
inode
->
i_
bdev
->
bd_disk
->
private_data
;
struct
pf_unit
*
pf
=
bdev
->
bd_disk
->
private_data
;
if
(
cmd
!=
CDROMEJECT
)
if
(
cmd
!=
CDROMEJECT
)
return
-
EINVAL
;
return
-
EINVAL
;
...
@@ -346,9 +346,9 @@ static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un
...
@@ -346,9 +346,9 @@ static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un
return
0
;
return
0
;
}
}
static
int
pf_release
(
struct
inode
*
inode
,
struct
file
*
fil
e
)
static
int
pf_release
(
struct
gendisk
*
disk
,
fmode_t
mod
e
)
{
{
struct
pf_unit
*
pf
=
inode
->
i_bdev
->
bd_
disk
->
private_data
;
struct
pf_unit
*
pf
=
disk
->
private_data
;
if
(
pf
->
access
<=
0
)
if
(
pf
->
access
<=
0
)
return
-
EINVAL
;
return
-
EINVAL
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录