Re: [PATCH] Rework of /proc/stat

Dominik Kubla (kubla@sciobyte.de)
Wed, 6 Mar 2002 20:48:26 +0100


On Wed, Mar 06, 2002 at 06:16:55PM +0100, Jean-Eric Cuendet wrote:
[...]
> len += sprintf(page + len,
> -
> "(%u,%u):(%u,%u,%u,%u,%u) ",
> -
> major, disk,
> -
> kstat.dk_drive[major][disk],
> -
> kstat.dk_drive_rio[major][disk],
> -
> kstat.dk_drive_rblk[major][disk],
> -
> kstat.dk_drive_wio[major][disk],
> -
> kstat.dk_drive_wblk[major][disk]
> -
> );
> -
> }
> -
> }
> + for (i = 0; i < kstat_devices_current_index; i++)
> + {
> + kstat_block_io* stat = &kstat_devices_array[i];
> + len += sprintf( page + len, "(%u,%u):(%u,%u,%u,%u,%u) ",
> + stat->major, stat->minor,
> + stat->io,
> + stat->rio,
> + stat->wio,
> + stat->rblk,
> + stat->wblk );
> + }
>
> len += sprintf(page + len,
>
> "\nctxt %u\n"

You are changing the order of the fields in /proc/stat. That breaks
compatibility.

Dominik Kubla

-- 
ScioByte GmbH    Zum Schiersteiner Grund 2     55127 Mainz (Germany)
Phone: +49 700 724 629 83                    Fax: +49 700 724 629 84
1024D/717F16BB    A384 F5F1 F566 5716 5485  27EF 3B00 C007 717F 16BB
-
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/