Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
2d06a9e3
Commit
2d06a9e3
authored
Sep 22, 2003
by
Alexander Viro
Committed by
Linus Torvalds
Sep 22, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] prepare for 32-bit dev_t: dm-ioctl-*.c
Added old_encode_dev()/old_decode_dev() in dm-ioctl-*.c
parent
1684b4e9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
drivers/md/dm-ioctl-v1.c
drivers/md/dm-ioctl-v1.c
+3
-3
drivers/md/dm-ioctl-v4.c
drivers/md/dm-ioctl-v4.c
+4
-4
No files found.
drivers/md/dm-ioctl-v1.c
View file @
2d06a9e3
...
...
@@ -459,7 +459,7 @@ static int __info(struct mapped_device *md, struct dm_ioctl *param)
if
(
!
bdev
)
return
-
ENXIO
;
param
->
dev
=
bdev
->
bd_dev
;
param
->
dev
=
old_encode_dev
(
bdev
->
bd_dev
)
;
param
->
open_count
=
bdev
->
bd_openers
;
bdput
(
bdev
);
...
...
@@ -577,7 +577,7 @@ static int create(struct dm_ioctl *param, struct dm_ioctl *user)
}
if
(
param
->
flags
&
DM_PERSISTENT_DEV_FLAG
)
r
=
dm_create_with_minor
(
MINOR
(
param
->
dev
),
&
md
);
r
=
dm_create_with_minor
(
MINOR
(
old_decode_dev
(
param
->
dev
)
),
&
md
);
else
r
=
dm_create
(
&
md
);
...
...
@@ -816,7 +816,7 @@ static int dep(struct dm_ioctl *param, struct dm_ioctl *user)
count
=
0
;
list_for_each
(
tmp
,
dm_table_get_devices
(
table
))
{
struct
dm_dev
*
dd
=
list_entry
(
tmp
,
struct
dm_dev
,
list
);
deps
->
dev
[
count
++
]
=
dd
->
bdev
->
bd_dev
;
deps
->
dev
[
count
++
]
=
old_encode_dev
(
dd
->
bdev
->
bd_dev
)
;
}
dm_table_put
(
table
);
dm_put
(
md
);
...
...
drivers/md/dm-ioctl-v4.c
View file @
2d06a9e3
...
...
@@ -401,7 +401,7 @@ static int list_devices(struct dm_ioctl *param, size_t param_size)
old_nl
->
next
=
(
uint32_t
)
((
void
*
)
nl
-
(
void
*
)
old_nl
);
disk
=
dm_disk
(
hc
->
md
);
nl
->
dev
=
MKDEV
(
disk
->
major
,
disk
->
first_minor
);
nl
->
dev
=
old_encode_dev
(
MKDEV
(
disk
->
major
,
disk
->
first_minor
)
);
nl
->
next
=
0
;
strcpy
(
nl
->
name
,
hc
->
name
);
...
...
@@ -445,7 +445,7 @@ static int __dev_status(struct mapped_device *md, struct dm_ioctl *param)
if
(
!
bdev
)
return
-
ENXIO
;
param
->
dev
=
MKDEV
(
disk
->
major
,
disk
->
first_minor
);
param
->
dev
=
old_encode_dev
(
MKDEV
(
disk
->
major
,
disk
->
first_minor
)
);
/*
* Yes, this will be out of date by the time it gets back
...
...
@@ -481,7 +481,7 @@ static int dev_create(struct dm_ioctl *param, size_t param_size)
return
r
;
if
(
param
->
flags
&
DM_PERSISTENT_DEV_FLAG
)
r
=
dm_create_with_minor
(
MINOR
(
param
->
dev
),
&
md
);
r
=
dm_create_with_minor
(
MINOR
(
old_decode_dev
(
param
->
dev
)
),
&
md
);
else
r
=
dm_create
(
&
md
);
...
...
@@ -961,7 +961,7 @@ static void retrieve_deps(struct dm_table *table,
count
=
0
;
list_for_each
(
tmp
,
dm_table_get_devices
(
table
))
{
struct
dm_dev
*
dd
=
list_entry
(
tmp
,
struct
dm_dev
,
list
);
deps
->
dev
[
count
++
]
=
dd
->
bdev
->
bd_dev
;
deps
->
dev
[
count
++
]
=
old_encode_dev
(
dd
->
bdev
->
bd_dev
)
;
}
param
->
data_size
=
param
->
data_start
+
needed
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment