From owner-cvs-all@FreeBSD.ORG Tue Sep 23 19:10:23 2008 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 766681065691 for ; Tue, 23 Sep 2008 19:10:23 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from gv-out-0910.google.com (gv-out-0910.google.com [216.239.58.186]) by mx1.freebsd.org (Postfix) with ESMTP id F3EF38FC08 for ; Tue, 23 Sep 2008 19:10:22 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: by gv-out-0910.google.com with SMTP id n8so172577gve.39 for ; Tue, 23 Sep 2008 12:10:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=tRSJkWGuKDJROgqGHhu6k+Y1KPO3Zu9tShaqFQM4DaA=; b=MO6OoMKExIfd2Ky6LMFih8FXTvivgrX0ZOkqRGHE44phnj/5HJe7DVWb2ND4q69pqr yEWYmdEZ0BNkrmhVHrgrQzlMXyt55oyya/HvMJ9BJE1QYeO8b9Y7+8p89WLGtA4p9awl 5M7Wjnb5xOu+1Q2h+b1uQ4GJ6muvDAb3Vj32g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=T46j0T76HSM3W7EoyQED4l7VsIvDellZ55r1RAZ1xk1GRL/GmP9D977+di/pvwGUio gwBM+a9b5Co/BfM0z+qc6qZGp+eO6yqOkFNxlK8dRQu1O30+pWjs5oAT0n6wbCmMGjkb XlgwMBmhfSkU3IAh+8fwegyqu1ItatH3zH5eg= Received: by 10.103.227.13 with SMTP id e13mr4016008mur.49.1222195714115; Tue, 23 Sep 2008 11:48:34 -0700 (PDT) Received: from localhost (cable-234-140.cgates.lt [79.133.234.140]) by mx.google.com with ESMTPS id j9sm339226mue.3.2008.09.23.11.48.25 (version=SSLv3 cipher=RC4-MD5); Tue, 23 Sep 2008 11:48:30 -0700 (PDT) Date: Tue, 23 Sep 2008 21:47:56 +0300 From: Gleb Kurtsou To: "David E. O'Brien" Message-ID: <20080923184756.GB1830@rybacik> References: <200809231446.m8NEkQev007507@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <200809231446.m8NEkQev007507@repoman.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/conf files src/sys/fs/tmpfs tmpfs.h tmpfs_subr.c tmpfs_vnops.c src/sys/i386/i386 bios.c src/sys/ia64/ia64 efi.c sal.c src/sys/libkern memcmp.c src/sys/mips/mips support.S src/sys/sys libkern.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2008 19:10:23 -0000 On (23/09/2008 14:45), David E. O'Brien wrote: > obrien 2008-09-23 14:45:10 UTC > > FreeBSD src repository > > Modified files: > sys/conf files > sys/fs/tmpfs tmpfs.h tmpfs_subr.c tmpfs_vnops.c > sys/i386/i386 bios.c > sys/ia64/ia64 efi.c sal.c > sys/mips/mips support.S > sys/sys libkern.h > Added files: > sys/libkern memcmp.c > Log: > SVN rev 183299 on 2008-09-23 14:45:10Z by obrien > > The kernel implemented 'memcmp' is an alias for 'bcmp'. However, memcmp > and bcmp are not the same thing. 'man bcmp' states that the return is > "non-zero" if the two byte strings are not identical. Where as, > 'man memcmp' states that the return is the "difference between the > first two differing bytes (treated as unsigned char values" if the > two byte strings are not identical. Thanks for fixing it. For a note, the same bug was fixed in if_bridge several years ago. > So provide a proper memcmp(9), but it is a C implementation not a tuned > assembly implementation. Therefore bcmp(9) should be preferred over memcmp(9).