From: "Petr Vandrovec" <VANDROVE@vc.cvut.cz>
To: "Paul E. Erkkila" <pee@erkkila.org>
Cc: agoddard@purdue.edu, linux-kernel@vger.kernel.org
Subject: Re: 2.5.48 Compilation Failure
Date: Mon, 18 Nov 2002 13:36:17 +0100 [thread overview]
Message-ID: <7DC6CEB56DB@vcnet.vc.cvut.cz> (raw)
> 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
next reply other threads:[~2002-11-18 12:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-18 12:36 Petr Vandrovec [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-18 1:16 2.5.48 Compilation Failure Alex Goddard
2002-11-18 6:26 ` Paul E. Erkkila
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7DC6CEB56DB@vcnet.vc.cvut.cz \
--to=vandrove@vc.cvut.cz \
--cc=agoddard@purdue.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=pee@erkkila.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.