diff options
Diffstat (limited to 'drivers/md/dm-linear.c')
-rw-r--r-- | drivers/md/dm-linear.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/md/dm-linear.c b/drivers/md/dm-linear.c index 6a2cd5dc8a63..daf586c0898d 100644 --- a/drivers/md/dm-linear.c +++ b/drivers/md/dm-linear.c | |||
@@ -26,6 +26,7 @@ struct linear_c { | |||
26 | static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv) | 26 | static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv) |
27 | { | 27 | { |
28 | struct linear_c *lc; | 28 | struct linear_c *lc; |
29 | unsigned long long tmp; | ||
29 | 30 | ||
30 | if (argc != 2) { | 31 | if (argc != 2) { |
31 | ti->error = "dm-linear: Invalid argument count"; | 32 | ti->error = "dm-linear: Invalid argument count"; |
@@ -38,10 +39,11 @@ static int linear_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
38 | return -ENOMEM; | 39 | return -ENOMEM; |
39 | } | 40 | } |
40 | 41 | ||
41 | if (sscanf(argv[1], SECTOR_FORMAT, &lc->start) != 1) { | 42 | if (sscanf(argv[1], "%llu", &tmp) != 1) { |
42 | ti->error = "dm-linear: Invalid device sector"; | 43 | ti->error = "dm-linear: Invalid device sector"; |
43 | goto bad; | 44 | goto bad; |
44 | } | 45 | } |
46 | lc->start = tmp; | ||
45 | 47 | ||
46 | if (dm_get_device(ti, argv[0], lc->start, ti->len, | 48 | if (dm_get_device(ti, argv[0], lc->start, ti->len, |
47 | dm_table_get_mode(ti->table), &lc->dev)) { | 49 | dm_table_get_mode(ti->table), &lc->dev)) { |
@@ -87,8 +89,8 @@ static int linear_status(struct dm_target *ti, status_type_t type, | |||
87 | break; | 89 | break; |
88 | 90 | ||
89 | case STATUSTYPE_TABLE: | 91 | case STATUSTYPE_TABLE: |
90 | snprintf(result, maxlen, "%s " SECTOR_FORMAT, lc->dev->name, | 92 | snprintf(result, maxlen, "%s %llu", lc->dev->name, |
91 | lc->start); | 93 | (unsigned long long)lc->start); |
92 | break; | 94 | break; |
93 | } | 95 | } |
94 | return 0; | 96 | return 0; |