partitions: fix sometimes unreadable partition strings
Fix this garbage happening quite often: ==> sda: scsi 3:0:0:0: CD-ROM TOSHIBA ==> sda1 sda2 sda3 sda4 <sr0: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray ^^^ Uniform CD-ROM driver Revision: 3.20 sr 3:0:0:0: Attached scsi CD-ROM sr0 ==> sda5 sda6 sda7 > Make "sda: sda1 ..." lines actually lines. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
ecd6269174
commit
9c867fbe06
@@ -59,7 +59,7 @@ int mac_partition(struct parsed_partitions *state)
|
||||
put_dev_sector(sect);
|
||||
return 0; /* not a MacOS disk */
|
||||
}
|
||||
printk(" [mac]");
|
||||
strlcat(state->pp_buf, " [mac]", PAGE_SIZE);
|
||||
blocks_in_map = be32_to_cpu(part->map_count);
|
||||
for (blk = 1; blk <= blocks_in_map; ++blk) {
|
||||
int pos = blk * secsize;
|
||||
@@ -128,6 +128,6 @@ int mac_partition(struct parsed_partitions *state)
|
||||
#endif
|
||||
|
||||
put_dev_sector(sect);
|
||||
printk("\n");
|
||||
strlcat(state->pp_buf, "\n", PAGE_SIZE);
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user