linux-um archives
 help / color / mirror / Atom feed
From: Dominique Quatravaux <dominique@quatravaux.org>
To: Jeff Dike <jdike@addtoit.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [uml-user] [PATCH] Fixed hostfs tv_usec / tv_nsec conversion in 2.6.22.9
Date: Wed, 21 Nov 2007 11:54:16 +0100	[thread overview]
Message-ID: <47440E58.5060008@quatravaux.org> (raw)
In-Reply-To: <20071120170726.GC7211@c2.user-mode-linux.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeff Dike wrote:
>
> Can I get a Signed-off-by: from you?
Sure thing, although I was not planning on asserting copyright on a
grand total of 4 slashes...

- -=-=-=-

- From Dominique Quatravaux <dominique@quatravaux.org>

To convert from tv_nsec to tv_usec, one needs to divide by 1000, not
multiply.

Signed-off-by: Dominique Quatravaux <dominique@quatravaux.org>

- ---

diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c
- --- a/fs/hostfs/hostfs_user.c
+++ b/fs/hostfs/hostfs_user.c
@@ -262,17 +262,17 @@ int set_attr(const char *file, struct ho
             return err;
 
         times[0].tv_sec = atime_ts.tv_sec;
- -        times[0].tv_usec = atime_ts.tv_nsec * 1000;
+        times[0].tv_usec = atime_ts.tv_nsec / 1000;
         times[1].tv_sec = mtime_ts.tv_sec;
- -        times[1].tv_usec = mtime_ts.tv_nsec * 1000;
+        times[1].tv_usec = mtime_ts.tv_nsec / 1000;
 
         if (attrs->ia_valid & HOSTFS_ATTR_ATIME_SET) {
             times[0].tv_sec = attrs->ia_atime.tv_sec;
- -            times[0].tv_usec = attrs->ia_atime.tv_nsec * 1000;
+            times[0].tv_usec = attrs->ia_atime.tv_nsec / 1000;
         }
         if (attrs->ia_valid & HOSTFS_ATTR_MTIME_SET) {
             times[1].tv_sec = attrs->ia_mtime.tv_sec;
- -            times[1].tv_usec = attrs->ia_mtime.tv_nsec * 1000;
+            times[1].tv_usec = attrs->ia_mtime.tv_nsec / 1000;
         }
 
         if (fd >= 0) {

- --
<< Tout n'y est pas parfait, mais on y honore certainement les
jardiniers >>

            Dominique Quatravaux <dominique@quatravaux.org>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBR0QOWPTYH7KfeIIFAQLaNgQAo/mzyru7m/Iafg57olEQXIy4jMyvJhma
Pd2XC4JKrAIQ0o3ut/IjuYoGatp0vDALsqAfURCKPaSyyy+xxSl5Ihvg0WcbrcSa
jB3ydvweUgiMfcMho6j2zWLUuhMAdlmtprmj1Gy2jfet+5HM9HwlmxzaNB40TeuW
jvSrEvjTHBw=
=YgoE
-----END PGP SIGNATURE-----



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2007-11-21 10:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-20 14:49 [uml-devel] [PATCH] Fixed hostfs tv_usec / tv_nsec conversion in 2.6.22.9 Dominique Quatravaux
2007-11-20 17:07 ` [uml-devel] [uml-user] " Jeff Dike
2007-11-21 10:54   ` Dominique Quatravaux [this message]
2007-11-21 18:03     ` Jeff Dike

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=47440E58.5060008@quatravaux.org \
    --to=dominique@quatravaux.org \
    --cc=jdike@addtoit.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox