PERFORCE change 150201 for review

Ed Schouten ed at FreeBSD.org
Sun Sep 21 13:35:13 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=150201

Change 150201 by ed at 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);
 }


More information about the p4-projects mailing list