tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Linux procfs
In article <x7lgkzt3nw.fsf%ren.fdy2.co.uk@localhost>,
Robert Swindells <rjs%fdy2.co.uk@localhost> wrote:
>
>christos%astron.com@localhost (Christos Zoulas) wrote:
>>In article <x7efu7wmk2.fsf%ren.fdy2.co.uk@localhost>,
>>Robert Swindells <rjs%fdy2.co.uk@localhost> wrote:
>>>
>>>matthew green <mrg%eterna.com.au@localhost> wrote:
>>>>Robert Swindells writes:
>>>>>
>>>>> Do we care about keeping all the Linux procfs code in
>>>>> sys/miscfs/proc/procfs_linux.c ?
>>>>>
>>>>> Some Linux applications have started grovelling in /proc/self/status to
>>>>> read various values.
>>>>>
>>>>> I have added some Linux emulation specific code to procfs_status.c but
>>>>> can move it if people object.
>>>>
>>>>what are the extensions? maybe we want them for netbsd anyway?
>>>
>>>It is mostly just changing the format of what is printed.
>>>
>>>I haven't replicated everything that is in the procfs node under Linux,
>>>just enough to get one application working (Xilinx Vivado). One of the
>>>lines is used by the HTML browser in JavaFX though so it will probably
>>>be needed elsewhere.
>>>
>>>>can the code be structured such that most of it is in procfs_linux.c
>>>>and called to from procfs_status.c?
>>>
>>>I think it would be more a case of moving the whole contents of
>>>procfs_status.c to procfs_linux.c
>>>
>>>The diff is below.
>>
>>The same diff ignoring whitespace becomes:
>
>[snip]
>
>>Which means that it would be better to refactor this code into separate
>>routines (linux specific and netbsd-specific). The function is already
>>too long and complicated.
>
>Split up into two functions:
Thanks, committed.
christos
Home |
Main Index |
Thread Index |
Old Index