Re: 2.5.48 Compilation Failure

Petr Vandrovec (VANDROVE@vc.cvut.cz)
Mon, 18 Nov 2002 13:36:17 +0100


> diff -Nru a/fs/devfs/base.c b/fs/devfs/base.c
> --- a/fs/devfs/base.c Mon Nov 18 06:20:34 2002
> +++ b/fs/devfs/base.c Mon Nov 18 06:20:34 2002
> @@ -2509,9 +2509,9 @@
> de->mode = inode->i_mode;
> de->inode.uid = inode->i_uid;
> de->inode.gid = inode->i_gid;
> - de->inode.atime = inode->i_atime.tv_sec;
> - de->inode.mtime = inode->i_mtime.tv_sec;
> - de->inode.ctime = inode->i_ctime.tv_sec;
> + de->inode.atime.tv_sec = inode->i_atime.tv_sec;
> + de->inode.mtime.tv_sec = inode->i_mtime.tv_sec;
> + de->inode.ctime.tv_sec = inode->i_ctime.tv_sec;

No, just do
de->inode.xtime = inode->i_xtime;
gcc will copy whole structure automatically. Otherwise
uninitialized tv_nsec can contain value > 999999999us and it
is not legal.

> - inode->i_atime.tv_sec = de->inode.atime;
> - inode->i_mtime.tv_sec = de->inode.mtime;
> - inode->i_ctime.tv_sec = de->inode.ctime;
> + inode->i_atime.tv_sec = de->inode.atime.tv_sec;
> + inode->i_mtime.tv_sec = de->inode.mtime.tv_sec;
> + inode->i_ctime.tv_sec = de->inode.ctime.tv_sec;
> inode->i_atime.tv_nsec = 0;
> inode->i_mtime.tv_nsec = 0;
> inode->i_ctime.tv_nsec = 0;

And here other way around. Just do
inode->i_xtime = de->inode.xtime;
and remove assigning of zero to tv_nsec.

Although there is question, why devfs cannot use inode directly.
Due to memory consumption?
Thanks,
Petr Vandrovec
vandrove@vc.cvut.cz

-
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/