aboutsummaryrefslogtreecommitdiffstats
path: root/fs/partitions/amiga.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/partitions/amiga.c')
-rw-r--r--fs/partitions/amiga.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/fs/partitions/amiga.c b/fs/partitions/amiga.c
index ba443d4229f8..70cbf44a1560 100644
--- a/fs/partitions/amiga.c
+++ b/fs/partitions/amiga.c
@@ -69,7 +69,13 @@ int amiga_partition(struct parsed_partitions *state)
69 /* blksize is blocks per 512 byte standard block */ 69 /* blksize is blocks per 512 byte standard block */
70 blksize = be32_to_cpu( rdb->rdb_BlockBytes ) / 512; 70 blksize = be32_to_cpu( rdb->rdb_BlockBytes ) / 512;
71 71
72 printk(" RDSK (%d)", blksize * 512); /* Be more informative */ 72 {
73 char tmp[7 + 10 + 1 + 1];
74
75 /* Be more informative */
76 snprintf(tmp, sizeof(tmp), " RDSK (%d)", blksize * 512);
77 strlcat(state->pp_buf, tmp, PAGE_SIZE);
78 }
73 blk = be32_to_cpu(rdb->rdb_PartitionList); 79 blk = be32_to_cpu(rdb->rdb_PartitionList);
74 put_dev_sector(sect); 80 put_dev_sector(sect);
75 for (part = 1; blk>0 && part<=16; part++, put_dev_sector(sect)) { 81 for (part = 1; blk>0 && part<=16; part++, put_dev_sector(sect)) {
@@ -106,23 +112,27 @@ int amiga_partition(struct parsed_partitions *state)
106 { 112 {
107 /* Be even more informative to aid mounting */ 113 /* Be even more informative to aid mounting */
108 char dostype[4]; 114 char dostype[4];
115 char tmp[42];
116
109 __be32 *dt = (__be32 *)dostype; 117 __be32 *dt = (__be32 *)dostype;
110 *dt = pb->pb_Environment[16]; 118 *dt = pb->pb_Environment[16];
111 if (dostype[3] < ' ') 119 if (dostype[3] < ' ')
112 printk(" (%c%c%c^%c)", 120 snprintf(tmp, sizeof(tmp), " (%c%c%c^%c)",
113 dostype[0], dostype[1], 121 dostype[0], dostype[1],
114 dostype[2], dostype[3] + '@' ); 122 dostype[2], dostype[3] + '@' );
115 else 123 else
116 printk(" (%c%c%c%c)", 124 snprintf(tmp, sizeof(tmp), " (%c%c%c%c)",
117 dostype[0], dostype[1], 125 dostype[0], dostype[1],
118 dostype[2], dostype[3]); 126 dostype[2], dostype[3]);
119 printk("(res %d spb %d)", 127 strlcat(state->pp_buf, tmp, PAGE_SIZE);
128 snprintf(tmp, sizeof(tmp), "(res %d spb %d)",
120 be32_to_cpu(pb->pb_Environment[6]), 129 be32_to_cpu(pb->pb_Environment[6]),
121 be32_to_cpu(pb->pb_Environment[4])); 130 be32_to_cpu(pb->pb_Environment[4]));
131 strlcat(state->pp_buf, tmp, PAGE_SIZE);
122 } 132 }
123 res = 1; 133 res = 1;
124 } 134 }
125 printk("\n"); 135 strlcat(state->pp_buf, "\n", PAGE_SIZE);
126 136
127rdb_done: 137rdb_done:
128 return res; 138 return res;