[lkml]   [1998]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: 2G file size limitation question
    In article <>,
    Matti Aarnio <> wrote:
    > Yes and no. Well, at least the interfaces that FS modules
    > get are somewhat mixed:
    >long long ext2_file_lseek( FILP*, long long offset, int pos )
    >ssize_t ext2_file_write( FILP*, char *buf, size_t len, loff_t *ppos)
    > (read thru generic_file_read(), which params looks alike..)

    Note that one reason there is mixing in the kernel is that I personally
    prefer to have the types explicit in the code rather than using "size_t"
    and other "standard" types in the kernel. So I've tried to avoid using
    the standard types, but others have tended to like them..

    The reason I dislike "size_t" &co is that it leads to stupid and
    unnecessary problems: try

    printk("%d", size_t_type_thing);

    on a few different architectures, and you'll see what I mean (on some
    architectures it will be correct, on other architectures it will
    complain about a long argument but a integer format). To get rid of the
    warning you have to use "%ld" and a cast to (long), which is just bad:
    it means that the value might as well have been of type "long" in the
    first place.

    In user programs the standard types make more sense, but the kernel
    really fixes the sizes of things anyway, so there is little real reason
    to use the made-up sizes for anything that is internal to the kernel.


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