Date: Thu, 3 Aug 2006 04:55:07 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 103094 for review Message-ID: <200608030455.k734t7qN065795@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=103094 Change 103094 by jb@jb_freebsd2 on 2006/08/03 04:54:10 IFC Affected files ... .. //depot/projects/dtrace/src/lib/libc/uuid/uuid_compare.c#3 integrate .. //depot/projects/dtrace/src/sys/fs/msdosfs/msdosfs_vfsops.c#4 integrate Differences ... ==== //depot/projects/dtrace/src/lib/libc/uuid/uuid_compare.c#3 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libc/uuid/uuid_compare.c,v 1.4 2005/01/03 02:56:15 marcel Exp $ + * $FreeBSD: src/lib/libc/uuid/uuid_compare.c,v 1.5 2006/08/03 03:34:36 delphij Exp $ */ #include <string.h> @@ -41,7 +41,8 @@ int32_t uuid_compare(const uuid_t *a, const uuid_t *b, uint32_t *status) { - int res; + int res; + int64_t res64; if (status != NULL) *status = uuid_s_ok; @@ -54,10 +55,19 @@ if (b == NULL) return ((uuid_is_nil(a, NULL)) ? 0 : 1); - /* We have to compare the hard way. */ - res = (int)((int64_t)a->time_low - (int64_t)b->time_low); - if (res) - return ((res < 0) ? -1 : 1); + /* + * We have to compare the hard way. + * + * Note that time_low is defined as unsigned 32-bit + * integer, therefore, with a significantly large + * a->time_low and a small b->time_low, we will end + * up with a value which is larger than 0x7fffffff + * which is negative if casted to signed 32-bit + * integer. + */ + res64 = (int64_t)a->time_low - (int64_t)b->time_low; + if (res64) + return ((res64 < 0) ? -1 : 1); res = (int)a->time_mid - (int)b->time_mid; if (res) return ((res < 0) ? -1 : 1); ==== //depot/projects/dtrace/src/sys/fs/msdosfs/msdosfs_vfsops.c#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.151 2006/06/01 02:25:00 rodrigc Exp $ */ +/* $FreeBSD: src/sys/fs/msdosfs/msdosfs_vfsops.c,v 1.152 2006/08/03 03:55:52 delphij Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */ /*- @@ -283,6 +283,10 @@ g_access(pmp->pm_cp, 0, -1, 0); g_topology_unlock(); PICKUP_GIANT(); + /* Now the volume is clean. Mark it. */ + error = markvoldirty(pmp, 0); + if (error && (flags & FORCECLOSE) == 0) + return (error); } else if ((pmp->pm_flags & MSDOSFSMNT_RONLY) && !vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0)) { /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608030455.k734t7qN065795>