diff options
Diffstat (limited to 'fs/partitions/ibm.c')
-rw-r--r-- | fs/partitions/ibm.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/fs/partitions/ibm.c b/fs/partitions/ibm.c index fc8497643fd0..d513a07f44bb 100644 --- a/fs/partitions/ibm.c +++ b/fs/partitions/ibm.c | |||
@@ -75,6 +75,7 @@ int ibm_partition(struct parsed_partitions *state) | |||
75 | unsigned char *data; | 75 | unsigned char *data; |
76 | Sector sect; | 76 | Sector sect; |
77 | sector_t labelsect; | 77 | sector_t labelsect; |
78 | char tmp[64]; | ||
78 | 79 | ||
79 | res = 0; | 80 | res = 0; |
80 | blocksize = bdev_logical_block_size(bdev); | 81 | blocksize = bdev_logical_block_size(bdev); |
@@ -144,13 +145,15 @@ int ibm_partition(struct parsed_partitions *state) | |||
144 | */ | 145 | */ |
145 | blocksize = label->cms.block_size; | 146 | blocksize = label->cms.block_size; |
146 | if (label->cms.disk_offset != 0) { | 147 | if (label->cms.disk_offset != 0) { |
147 | printk("CMS1/%8s(MDSK):", name); | 148 | snprintf(tmp, sizeof(tmp), "CMS1/%8s(MDSK):", name); |
149 | strlcat(state->pp_buf, tmp, PAGE_SIZE); | ||
148 | /* disk is reserved minidisk */ | 150 | /* disk is reserved minidisk */ |
149 | offset = label->cms.disk_offset; | 151 | offset = label->cms.disk_offset; |
150 | size = (label->cms.block_count - 1) | 152 | size = (label->cms.block_count - 1) |
151 | * (blocksize >> 9); | 153 | * (blocksize >> 9); |
152 | } else { | 154 | } else { |
153 | printk("CMS1/%8s:", name); | 155 | snprintf(tmp, sizeof(tmp), "CMS1/%8s:", name); |
156 | strlcat(state->pp_buf, tmp, PAGE_SIZE); | ||
154 | offset = (info->label_block + 1); | 157 | offset = (info->label_block + 1); |
155 | size = label->cms.block_count | 158 | size = label->cms.block_count |
156 | * (blocksize >> 9); | 159 | * (blocksize >> 9); |
@@ -159,7 +162,8 @@ int ibm_partition(struct parsed_partitions *state) | |||
159 | size-offset*(blocksize >> 9)); | 162 | size-offset*(blocksize >> 9)); |
160 | } else { | 163 | } else { |
161 | if (strncmp(type, "LNX1", 4) == 0) { | 164 | if (strncmp(type, "LNX1", 4) == 0) { |
162 | printk("LNX1/%8s:", name); | 165 | snprintf(tmp, sizeof(tmp), "LNX1/%8s:", name); |
166 | strlcat(state->pp_buf, tmp, PAGE_SIZE); | ||
163 | if (label->lnx.ldl_version == 0xf2) { | 167 | if (label->lnx.ldl_version == 0xf2) { |
164 | fmt_size = label->lnx.formatted_blocks | 168 | fmt_size = label->lnx.formatted_blocks |
165 | * (blocksize >> 9); | 169 | * (blocksize >> 9); |
@@ -178,7 +182,7 @@ int ibm_partition(struct parsed_partitions *state) | |||
178 | offset = (info->label_block + 1); | 182 | offset = (info->label_block + 1); |
179 | } else { | 183 | } else { |
180 | /* unlabeled disk */ | 184 | /* unlabeled disk */ |
181 | printk("(nonl)"); | 185 | strlcat(state->pp_buf, "(nonl)", PAGE_SIZE); |
182 | size = i_size >> 9; | 186 | size = i_size >> 9; |
183 | offset = (info->label_block + 1); | 187 | offset = (info->label_block + 1); |
184 | } | 188 | } |
@@ -197,7 +201,8 @@ int ibm_partition(struct parsed_partitions *state) | |||
197 | * if not, something is wrong, skipping partition detection | 201 | * if not, something is wrong, skipping partition detection |
198 | */ | 202 | */ |
199 | if (strncmp(type, "VOL1", 4) == 0) { | 203 | if (strncmp(type, "VOL1", 4) == 0) { |
200 | printk("VOL1/%8s:", name); | 204 | snprintf(tmp, sizeof(tmp), "VOL1/%8s:", name); |
205 | strlcat(state->pp_buf, tmp, PAGE_SIZE); | ||
201 | /* | 206 | /* |
202 | * get block number and read then go through format1 | 207 | * get block number and read then go through format1 |
203 | * labels | 208 | * labels |
@@ -253,7 +258,7 @@ int ibm_partition(struct parsed_partitions *state) | |||
253 | 258 | ||
254 | } | 259 | } |
255 | 260 | ||
256 | printk("\n"); | 261 | strlcat(state->pp_buf, "\n", PAGE_SIZE); |
257 | goto out_freeall; | 262 | goto out_freeall; |
258 | 263 | ||
259 | 264 | ||