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
1edb9b6a
Commit
1edb9b6a
authored
Sep 22, 2003
by
Kevin Corry
Committed by
Linus Torvalds
Sep 22, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] dm: Use new format_dev_t macro
Use the format_dev_t function for target status functions.
parent
754bc768
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
drivers/md/dm-linear.c
drivers/md/dm-linear.c
+3
-3
drivers/md/dm-stripe.c
drivers/md/dm-stripe.c
+3
-3
No files found.
drivers/md/dm-linear.c
View file @
1edb9b6a
...
...
@@ -79,7 +79,7 @@ static int linear_status(struct dm_target *ti, status_type_t type,
char
*
result
,
unsigned
int
maxlen
)
{
struct
linear_c
*
lc
=
(
struct
linear_c
*
)
ti
->
private
;
char
b
[
BDEVNAME_SIZE
];
char
b
uffer
[
32
];
switch
(
type
)
{
case
STATUSTYPE_INFO
:
...
...
@@ -87,8 +87,8 @@ static int linear_status(struct dm_target *ti, status_type_t type,
break
;
case
STATUSTYPE_TABLE
:
snprintf
(
result
,
maxlen
,
"%s "
SECTOR_FORMAT
,
bdevname
(
lc
->
dev
->
bdev
,
b
)
,
lc
->
start
);
format_dev_t
(
buffer
,
lc
->
dev
->
bdev
->
bd_dev
);
snprintf
(
result
,
maxlen
,
"%s "
SECTOR_FORMAT
,
buffer
,
lc
->
start
);
break
;
}
return
0
;
...
...
drivers/md/dm-stripe.c
View file @
1edb9b6a
...
...
@@ -187,7 +187,7 @@ static int stripe_status(struct dm_target *ti,
struct
stripe_c
*
sc
=
(
struct
stripe_c
*
)
ti
->
private
;
int
offset
;
unsigned
int
i
;
char
b
[
BDEVNAME_SIZE
];
char
b
uffer
[
32
];
switch
(
type
)
{
case
STATUSTYPE_INFO
:
...
...
@@ -198,10 +198,10 @@ static int stripe_status(struct dm_target *ti,
offset
=
snprintf
(
result
,
maxlen
,
"%d "
SECTOR_FORMAT
,
sc
->
stripes
,
sc
->
chunk_mask
+
1
);
for
(
i
=
0
;
i
<
sc
->
stripes
;
i
++
)
{
format_dev_t
(
buffer
,
sc
->
stripe
[
i
].
dev
->
bdev
->
bd_dev
);
offset
+=
snprintf
(
result
+
offset
,
maxlen
-
offset
,
" %s "
SECTOR_FORMAT
,
bdevname
(
sc
->
stripe
[
i
].
dev
->
bdev
,
b
),
" %s "
SECTOR_FORMAT
,
buffer
,
sc
->
stripe
[
i
].
physical_start
);
}
break
;
...
...
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