From deep@deep.iserver.net  Mon Oct 21 10:50:27 2002
Return-Path: <deep@deep.iserver.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5251A37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Oct 2002 10:50:27 -0700 (PDT)
Received: from deep.iserver.net (deep.iserver.net [161.58.168.219])
	by mx1.FreeBSD.org (Postfix) with ESMTP id CCCF743E65
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 21 Oct 2002 10:50:26 -0700 (PDT)
	(envelope-from deep@deep.iserver.net)
Received: (from deep@localhost)
	by deep.iserver.net (8.11.6/8.11.2) id g9LHoQW89330;
	Mon, 21 Oct 2002 11:50:26 -0600 (MDT)
Message-Id: <200210211750.g9LHoQW89330@deep.iserver.net>
Date: Mon, 21 Oct 2002 11:50:26 -0600 (MDT)
From: Scott Wiersdorf <scott@perlcode.org>
Reply-To: Scott Wiersdorf <scott@perlcode.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] sbin/fsdb.c
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         44343
>Category:       bin
>Synopsis:       [PATCH] sbin/fsdb.c
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 21 11:00:05 PDT 2002
>Closed-Date:    Sun Jun 20 22:06:17 GMT 2004
>Last-Modified:  Sun Jun 20 22:06:17 GMT 2004
>Originator:     Scott Wiersdorf
>Release:        FreeBSD 4.6-RELEASE i386
>Organization:
none
>Environment:
System: FreeBSD tub.dmz.orem.verio.net 4.6-STABLE FreeBSD 4.6-STABLE #8: Tue Aug 6 15:57:33 MDT 2002 scottw@orem.verio.net:/usr/obj/usr/src/sys/TUB i386

>Description:
fsdb has a bug that sets the ctime of an inode when atime or mtime are
specified

>How-To-Repeat:
        run fsdb
        fsdb (inum: 12345)> lookup foo.txt
        fsdb (inum: 12345)> mtime YYMMDDHHMMSS
        notice the ctime changed, but not the mtime

>Fix:
--- /usr/src/sbin/fsdb/fsdb.c.orig      Wed Apr 24 12:09:49 2002
+++ /usr/src/sbin/fsdb/fsdb.c.fixed     Wed Oct 16 11:08:20 2002
@@ -873,7 +873,7 @@
 
 CMDFUNCSTART(chmtime)
 {
-    if (dotime(argv[1], &curinode->di_ctime))
+    if (dotime(argv[1], &curinode->di_mtime))
        return 1;
     inodirty();
     printactive(0);
@@ -882,7 +882,7 @@
 
 CMDFUNCSTART(chatime)
 {
-    if (dotime(argv[1], &curinode->di_ctime))
+    if (dotime(argv[1], &curinode->di_atime))
        return 1;
     inodirty();
     printactive(0);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: le 
State-Changed-When: Sun Jun 20 22:05:47 GMT 2004 
State-Changed-Why:  
Thank you, patch committed to -STABLE.  Sorry for the delay. :-) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44343 
>Unformatted:
