> + for (gp = gendisk_head; gp != gendisk_head; gp = gp->next) {
This will break your for loop immedeately, because the loop criteria
is already violated by the initialization !
But I tried another solution:
for (gp = gendisk_head; gp && (gp->next != gendisk_head); gp = gp->next) {
with no success - the cat /proc/partition only printed the heading line.
This proofed to me, that the pointered list is created the wrong way,
in other words, gendisk_head->next is a pointer to itself.
It looks to me, that the "next" field in
/*static*/ struct gendisk *gendisk_head;
is not initialized (by the compiler ?) correctly to NULL.
> if (gp->part[n].nr_sects == 0)
> continue;
>
>
_______________________________________________________________________
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
IhrName@web.de, 8MB Speicher, Verschluesselung - http://freemail.web.de
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/