lkml.org 
[lkml]   [2004]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC/RFT] Raw access to serio ports (1/2)
    Dmitry Torokhov <dtor_core@ameritech.net> wrote:
    >
    > > The return values here are mucked up - this function returns `written'.
    >
    > Or an error code in negative notation - it's the standard practice for
    > read/write. Am I missing something?

    You want the function to return -ENODEV if !list->rawdev->serio

    if (!list->rawdev->serio) {
    retval = -ENODEV;
    goto out;
    }
    ...
    out:
    up(&rawdev_sem);
    return written;
    }

    But it won't.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:03    [W:0.018 / U:91.224 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site