From owner-svn-src-head@freebsd.org Mon Jun 12 13:49:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F26C2BFCFEC; Mon, 12 Jun 2017 13:49:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C2A9970104; Mon, 12 Jun 2017 13:49:58 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5CDnviB008055; Mon, 12 Jun 2017 13:49:57 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5CDnvfj008054; Mon, 12 Jun 2017 13:49:57 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706121349.v5CDnvfj008054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Jun 2017 13:49:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319853 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jun 2017 13:49:59 -0000 Author: emaste Date: Mon Jun 12 13:49:57 2017 New Revision: 319853 URL: https://svnweb.freebsd.org/changeset/base/319853 Log: makefs: use C standard memcpy/memset in userland This file does not exist in NetBSD's makefs, but make the chance for consistency with memcpy/memset used in the rest of makefs. Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/makefs/mtree.c Modified: head/usr.sbin/makefs/mtree.c ============================================================================== --- head/usr.sbin/makefs/mtree.c Mon Jun 12 09:11:31 2017 (r319852) +++ head/usr.sbin/makefs/mtree.c Mon Jun 12 13:49:57 2017 (r319853) @@ -455,7 +455,7 @@ create_node(const char *name, u_int type, fsnode *pare n->inode = ecalloc(1, sizeof(*n->inode)); /* Assign global options/defaults. */ - bcopy(global->inode, n->inode, sizeof(*n->inode)); + memcpy(n->inode, global->inode, sizeof(*n->inode)); n->inode->st.st_mode = (n->inode->st.st_mode & ~S_IFMT) | n->type; if (n->type == S_IFLNK) @@ -1041,8 +1041,8 @@ read_mtree(const char *fname, fsnode *node) if (error) goto out; - bzero(&mtree_global, sizeof(mtree_global)); - bzero(&mtree_global_inode, sizeof(mtree_global_inode)); + memset(&mtree_global, 0, sizeof(mtree_global)); + memset(&mtree_global_inode, 0, sizeof(mtree_global_inode)); mtree_global.inode = &mtree_global_inode; mtree_global_inode.nlink = 1; mtree_global_inode.st.st_nlink = 1;