lkml.org 
[lkml]   [1999]   [Dec]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: Ok, making ready for pre-2.4 and code-freeze..
    Date
    From
    Tigran Aivazian wrote:
    > Hi Rogier,
    >
    > You said:
    >
    > > The return code for unix system calls should be defined as "negative"
    > > for error, and not "-1".
    >
    > I beg to differ because lseek(2) has the right to return negative offsets
    > on some implementations (of UNIX) on some architectures (notably i386).

    I beg to differ: lseek has no right to return a position before the
    start of the file.

    * Upon successful completion, lseek returns the resulting
    * offset location as measured in bytes from the beginning of
    * the file.

    Maybe, some OSes are "breaking the rules" a bit by allowing larger
    files than a 31-bit return value for lseek(2) allows, but that's their
    problem.

    And if you're bending the rules, I feel fine with reserving
    -1000 to -1 as "Error returns" and allowing 4G-1000 byte files.

    Roger.



    --
    ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
    *-- BitWizard writes Linux device drivers for any device you may have! --*
    "I didn't say it was your fault. I said I was going to blame it on you."

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:55    [W:0.019 / U:0.996 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site