lkml.org 
[lkml]   [2000]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: /proc guidelines and sysctl
On Fri, Jan 07, 2000 at 01:26:55AM -0500, Theodore Y. Ts'o wrote:
> Unfortunately it doesn't work well for tables; but then again, neither
> do the current /proc files that contain tables, which often cause
> programs to break when new rows are added.

Which leads me wonder how difficult it would be if I wanted to change the
format of /proc/partitions from:

"%4d %4d %10d %s\n",
p->major, n,
p->sizes[n],
disk_name(p, n, buf)

to:

"%4d %4d %10d %s %02x\n",
p->major, n,
p->sizes[n],
disk_name(p, n, buf),
p->sys_ind

That is, to include the partition type.

It would eliminate the need to be able to parse six kinds of partition
table in a program I am modifying, but also potentially break many
programs that rely on the current format. Are, could or should there be
rules for formats, that they can be extended while retaining backwards
compatibility? (Creating a parallel "/proc/xpartitions", while easy to
do, does not appeal to me.)

Regards,

Mark.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:1.265 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site