[lkml]   [2002]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: the userspace side of driverfs
    In article <>,
    Patrick Mochel <> wrote:
    >The main ideal that we're shooting for is to have one ASCII value per
    >file. The ASCII part is mandatory, but there will definitely be exceptions
    >where we will have an array of or multiple values per file. We want to
    >minimize those instances, though. Both for the sake of easy parsing, but
    >also for easy formatting within the drivers.

    If you have multiple values per file, why not make it a directory with
    multiple files in it, each with one value per file.

    If you care about speed, perhaps you can provide a ".array" virtual
    file in such a (or each) directory, that when read returns all files
    in the directory in "filename: value" format so that you avoid the
    while (readdir()) { open(); close(); } overhead.

    This would be much cleaner, think for example of how you would
    otherwise _write_ individual entries in such an array.

    If you really want to get overboard, provide a sysctl() like function
    that can read the entries in driverfs in binary. Like the existing
    sysctl() in linux, but with an added TYPE_INT, TYPE_STRING etc flag
    for each value for consistency. It too should be able to read an
    entire directory as an array.

    Then, convert procfs to the same interface ;)


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:28    [W:0.022 / U:5.540 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site