Re: [KERNEL] VFS 64-bit clean

Chip Salzenberg (chip@atlantic.net)
Fri, 20 Feb 1998 00:30:39 -0500


According to H. Peter Anvin:
> Chip writes:
> > HPA writes:
> > > khms# touch -d 1950-01-01 bla
> > > khms# ls -laFtr bla
> > > -rw-r--r-- 1 root root 0 Jan 1 1950 bla
> >
> > You've mistaken errors in touch and ctime() for ext2fs problems.
>
> Nope. time_t is defined as signed, and touch and ctime() are doing
> exactly the right thing.

They're not. The kernel code that takes a signed time_t and stores it
in ext2fs should forbid the assignment of signed values. That's
because ext2fs is *not* defined with signed time_t values. Maybe you
think it should be, but it isn't.

Even when time_t is a signed 64-bit value instead of a signed 32-bit
value, that doesn't change that ext2fs uses unsigned 32-bit values.
Therefore, touch and stat() (not ctime(), my mistake) are doing the
wrong thing to assume that they are interchangable.

-- 
Chip Salzenberg                - a.k.a. -                <chip@pobox.com>
      "Hoist the failure sails, men!  We're goin' home!"  // MST3K

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu