Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Sep 2008 13:35:12 GMT
From:      Ed Schouten <ed@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 150201 for review
Message-ID:  <200809211335.m8LDZCc9035881@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=150201

Change 150201 by ed@ed_dull on 2008/09/21 13:34:21

	Fix up timestamps on character devices upon creation. This makes
	fstat() on pseudo-terminal master devices work a lot more sane.
	
	I still want to get approval from kib@ before I commit this to SVN.

Affected files ...

.. //depot/projects/mpsafetty/sys/kern/kern_conf.c#4 edit

Differences ...

==== //depot/projects/mpsafetty/sys/kern/kern_conf.c#4 (text+ko) ====

@@ -526,6 +526,7 @@
 newdev(struct cdevsw *csw, int y, struct cdev *si)
 {
 	struct cdev *si2;
+	struct timespec ts;
 	dev_t	udev;
 
 	mtx_assert(&devmtx, MA_OWNED);
@@ -541,6 +542,10 @@
 	}
 	si->si_drv0 = udev;
 	si->si_devsw = csw;
+
+	vfs_timestamp(&ts);
+	si->si_atime = si->si_mtime = si->si_ctime = ts;
+
 	LIST_INSERT_HEAD(&csw->d_devs, si, si_list);
 	return (si);
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200809211335.m8LDZCc9035881>