dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Tejun Heo 2008-09-04 09:17:31 +02:00 committed by Jens Axboe
parent fad7f01e61
commit 243294dae0
1 changed files with 1 additions and 1 deletions

View File

@ -697,7 +697,7 @@ static void *show_partition_start(struct seq_file *seqf, loff_t *pos)
static void *p;
p = disk_seqf_start(seqf, pos);
if (!IS_ERR(p) && p)
if (!IS_ERR(p) && p && !*pos)
seq_puts(seqf, "major minor #blocks name\n\n");
return p;
}