[lkml]   [2001]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFD w/info-PATCH] device arguments from lookup, partion code
    On Sat, May 19, 2001 at 09:38:03PM +0200, Erik Mouw wrote:
    > > But /dev/sda/offset=234234,limit=626737537 isn't a file! ls it and see
    > > if it's there. writing to files that aren't shown in directory listings
    > > is plain evil. I really don't want to explain why. It's extremely
    > > messy and unintuitive.
    > >
    > > It would be better to do this with a file that does exist, for example
    > > writing something to /proc/disks/sda/arguments. Then again, I don't
    > > even think much of dynamic file systems in the first place.
    > A network socket also isn't a file in a filesystem, you can't do ls on
    > it, it doesn't even exist until you create one, but still you use it as
    > a file by reading and writing it. I don't see any difference in the way
    > you create /dev/sda/offset=234234,limit=626737537 by just using it.

    I think you're kind of missing the point. Erik is saying that, by the
    path, it appears to be a file, even though it isn't listed as a file in
    the directory /dev/sda. Network sockets don't have a path, unless its a
    Unix domain socket, and then you /can/ 'ls' it.

    My opinion is that putting options directly in the open is no nicer than
    an ioctl. I think that where this scheme really shines, though, is
    where there are multiple logical channels to a device, as in the
    /dev/fb0/control example. I like that. What could be done, therefore,
    is have a /dev/ttyS0/control file, where you could "echo
    'baud=19200,parity=odd' > /dev/ttyS0/control" or even "echo '19200' >
    /dev/ttyS0/baud" and "echo 'odd' > /dev/ttyS0/parity". That seems to me
    to be the cleanest and most logical solution.

    As for this partition stuff, it seems a bad example to me. Maybe I'm
    just spoiled, but I think partitions is something that the kernel can
    and should abstract. None of this /dev/sda/offset=12345,limit=45678
    In a time of universal deceit, telling the truth is a revolutionary act.
    -- George Orwell
    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 12:53    [W:0.021 / U:6.652 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site