• Finn Thain's avatar
    nubus: Rework /proc/bus/nubus/s/ implementation · 2f7dd07e
    Finn Thain authored
    The /proc/bus/nubus/s/ directory tree for any slot s is missing a lot
    of information. The struct file_operations methods have long been left
    unimplemented (hence the familiar compile-time warning, "Need to set
    some I/O handlers here").
    
    Slot resources have a complex structure which varies depending on board
    function. The logic for interpreting these ROM data structures is found
    in nubus.c. Let's not duplicate that logic in proc.c.
    
    Create the /proc/bus/nubus/s/ inodes while scanning slot s. During
    descent through slot resource subdirectories, call the new
    nubus_proc_add_foo() functions to create the procfs inodes.
    
    Also add a new function, nubus_seq_write_rsrc_mem(), to write the
    contents of a particular slot resource to a given seq_file. This is
    used by the procfs file_operations methods, to finally give userspace
    access to slot ROM information, such as the available video modes.
    Tested-by: default avatarStan Johnson <userm57@yahoo.com>
    Signed-off-by: default avatarFinn Thain <fthain@telegraphics.com.au>
    Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
    2f7dd07e
proc.c 6.6 KB