From owner-freebsd-current@FreeBSD.ORG Fri Jan 30 21:19:10 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 237AA1065726; Fri, 30 Jan 2009 21:19:10 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id CE7D78FC12; Fri, 30 Jan 2009 21:19:09 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id B550F3F130; Fri, 30 Jan 2009 21:19:08 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n0ULJ86b068254; Fri, 30 Jan 2009 21:19:08 GMT (envelope-from phk@critter.freebsd.dk) To: Kostik Belousov From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 30 Jan 2009 22:30:33 +0200." <20090130203033.GB52415@deviant.kiev.zoral.com.ua> Date: Fri, 30 Jan 2009 21:19:08 +0000 Message-ID: <68253.1233350348@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Tim Kientzle , "'current@FreeBSD.org'" Subject: Re: RFC: Change mtree nsec handling? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2009 21:19:15 -0000 In message <20090130203033.GB52415@deviant.kiev.zoral.com.ua>, Kostik Belousov writes: >> >>@@ -258,6 +259,8 @@ >> >> val = ep + 1; >> >> ip->st_mtimespec.tv_nsec >> >> = strtoul(val, &ep, 10); >> >>+ for (i = ep - val; i < 9; ++i) >> >>+ ip->st_mtimespec.tv_nsec *= 10; >> > >> > >> >Why is this bit needed ? >> > >> >> This is the part that converts 1233295862.000001 into >> 1000 nanoseconds (instead of 1 nanosecond). But that wouldn't happen, because no mtree file has that content. Either it has 1233295862.000001000 from the new %09d or it has 1233295862.1000 from the old %d Please leave this out, it can only cause problems. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.