]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/partitions/sysv68.c
Btrfs: Fix variables set but not read (bugs found by gcc 4.6)
[karo-tx-linux.git] / fs / partitions / sysv68.c
index 9030c864428ee14af5b0cdb957b5e9bcdefad16e..9627ccffc1c44da0c312ed2b053092fe64ae0213 100644 (file)
@@ -54,6 +54,7 @@ int sysv68_partition(struct parsed_partitions *state)
        unsigned char *data;
        struct dkblk0 *b;
        struct slice *slice;
+       char tmp[64];
 
        data = read_part_sector(state, 0, &sect);
        if (!data)
@@ -73,7 +74,8 @@ int sysv68_partition(struct parsed_partitions *state)
                return -1;
 
        slices -= 1; /* last slice is the whole disk */
-       printk("sysV68: %s(s%u)", state->name, slices);
+       snprintf(tmp, sizeof(tmp), "sysV68: %s(s%u)", state->name, slices);
+       strlcat(state->pp_buf, tmp, PAGE_SIZE);
        slice = (struct slice *)data;
        for (i = 0; i < slices; i++, slice++) {
                if (slot == state->limit)
@@ -82,11 +84,12 @@ int sysv68_partition(struct parsed_partitions *state)
                        put_partition(state, slot,
                                be32_to_cpu(slice->blkoff),
                                be32_to_cpu(slice->nblocks));
-                       printk("(s%u)", i);
+                       snprintf(tmp, sizeof(tmp), "(s%u)", i);
+                       strlcat(state->pp_buf, tmp, PAGE_SIZE);
                }
                slot++;
        }
-       printk("\n");
+       strlcat(state->pp_buf, "\n", PAGE_SIZE);
        put_dev_sector(sect);
        return 1;
 }