diff options
author | Tejun Heo <tj@kernel.org> | 2008-09-04 03:17:31 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 02:56:12 -0400 |
commit | 243294dae09c909c0442c8f04d470b69c3c19d6e (patch) | |
tree | b6178beadd19247b81d2b09e063e856943c83177 /block | |
parent | fad7f01e61bf737fe8a3740d803f000db57ecac6 (diff) |
block: fix duplicate headers for /proc/partitions
seqf can be started multiple times for a read and the header should be
printed only for the initial one. Fix it.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/genhd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c index ed926b760ca0..8acaff0154e3 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -697,7 +697,7 @@ static void *show_partition_start(struct seq_file *seqf, loff_t *pos) | |||
697 | static void *p; | 697 | static void *p; |
698 | 698 | ||
699 | p = disk_seqf_start(seqf, pos); | 699 | p = disk_seqf_start(seqf, pos); |
700 | if (!IS_ERR(p) && p) | 700 | if (!IS_ERR(p) && p && !*pos) |
701 | seq_puts(seqf, "major minor #blocks name\n\n"); | 701 | seq_puts(seqf, "major minor #blocks name\n\n"); |
702 | return p; | 702 | return p; |
703 | } | 703 | } |