Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
b2f21e05
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看板
提交
b2f21e05
编写于
10月 16, 2008
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] switch ide-gd
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
488ca606
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
13 deletion
+11
-13
drivers/ide/ide-gd.c
drivers/ide/ide-gd.c
+11
-13
未找到文件。
drivers/ide/ide-gd.c
浏览文件 @
b2f21e05
...
...
@@ -169,9 +169,9 @@ static ide_driver_t ide_gd_driver = {
#endif
};
static
int
ide_gd_open
(
struct
inode
*
inode
,
struct
file
*
filp
)
static
int
ide_gd_open
(
struct
block_device
*
bdev
,
fmode_t
mode
)
{
struct
gendisk
*
disk
=
inode
->
i_
bdev
->
bd_disk
;
struct
gendisk
*
disk
=
bdev
->
bd_disk
;
struct
ide_disk_obj
*
idkp
;
ide_drive_t
*
drive
;
int
ret
=
0
;
...
...
@@ -197,12 +197,12 @@ static int ide_gd_open(struct inode *inode, struct file *filp)
* unreadable disk, so that we can get the format capacity
* of the drive or begin the format - Sam
*/
if
(
ret
&&
(
filp
->
f_
mode
&
FMODE_NDELAY
)
==
0
)
{
if
(
ret
&&
(
mode
&
FMODE_NDELAY
)
==
0
)
{
ret
=
-
EIO
;
goto
out_put_idkp
;
}
if
((
drive
->
dev_flags
&
IDE_DFLAG_WP
)
&&
(
filp
->
f_
mode
&
FMODE_WRITE
))
{
if
((
drive
->
dev_flags
&
IDE_DFLAG_WP
)
&&
(
mode
&
FMODE_WRITE
))
{
ret
=
-
EROFS
;
goto
out_put_idkp
;
}
...
...
@@ -214,7 +214,7 @@ static int ide_gd_open(struct inode *inode, struct file *filp)
*/
drive
->
disk_ops
->
set_doorlock
(
drive
,
disk
,
1
);
drive
->
dev_flags
|=
IDE_DFLAG_MEDIA_CHANGED
;
check_disk_change
(
inode
->
i_
bdev
);
check_disk_change
(
bdev
);
}
else
if
(
drive
->
dev_flags
&
IDE_DFLAG_FORMAT_IN_PROGRESS
)
{
ret
=
-
EBUSY
;
goto
out_put_idkp
;
...
...
@@ -227,9 +227,8 @@ static int ide_gd_open(struct inode *inode, struct file *filp)
return
ret
;
}
static
int
ide_gd_release
(
struct
inode
*
inode
,
struct
file
*
filp
)
static
int
ide_gd_release
(
struct
gendisk
*
disk
,
fmode_t
mode
)
{
struct
gendisk
*
disk
=
inode
->
i_bdev
->
bd_disk
;
struct
ide_disk_obj
*
idkp
=
ide_drv_g
(
disk
,
ide_disk_obj
);
ide_drive_t
*
drive
=
idkp
->
drive
;
...
...
@@ -286,21 +285,20 @@ static int ide_gd_revalidate_disk(struct gendisk *disk)
return
0
;
}
static
int
ide_gd_ioctl
(
struct
inode
*
inode
,
struct
file
*
fil
e
,
static
int
ide_gd_ioctl
(
struct
block_device
*
bdev
,
fmode_t
mod
e
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
struct
block_device
*
bdev
=
inode
->
i_bdev
;
struct
ide_disk_obj
*
idkp
=
ide_drv_g
(
bdev
->
bd_disk
,
ide_disk_obj
);
ide_drive_t
*
drive
=
idkp
->
drive
;
return
drive
->
disk_ops
->
ioctl
(
drive
,
bdev
,
file
?
file
->
f_mode
:
0
,
cmd
,
arg
);
return
drive
->
disk_ops
->
ioctl
(
drive
,
bdev
,
mode
,
cmd
,
arg
);
}
static
struct
block_device_operations
ide_gd_ops
=
{
.
owner
=
THIS_MODULE
,
.
__
open
=
ide_gd_open
,
.
__
release
=
ide_gd_release
,
.
__ioctl
=
ide_gd_ioctl
,
.
open
=
ide_gd_open
,
.
release
=
ide_gd_release
,
.
locked_ioctl
=
ide_gd_ioctl
,
.
getgeo
=
ide_gd_getgeo
,
.
media_changed
=
ide_gd_media_changed
,
.
revalidate_disk
=
ide_gd_revalidate_disk
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录