From owner-svn-src-stable@freebsd.org Mon Sep 9 17:34:21 2019 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 07451D9533; Mon, 9 Sep 2019 17:34:21 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46RwJX6QH4z4HMY; Mon, 9 Sep 2019 17:34:20 +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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C058F191EB; Mon, 9 Sep 2019 17:34:20 +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 x89HYKn7083508; Mon, 9 Sep 2019 17:34:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x89HYJl0083500; Mon, 9 Sep 2019 17:34:19 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201909091734.x89HYJl0083500@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 9 Sep 2019 17:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r352081 - stable/12/usr.sbin/makefs/msdos X-SVN-Group: stable-12 X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: stable/12/usr.sbin/makefs/msdos X-SVN-Commit-Revision: 352081 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Sep 2019 17:34:21 -0000 Author: emaste Date: Mon Sep 9 17:34:18 2019 New Revision: 352081 URL: https://svnweb.freebsd.org/changeset/base/352081 Log: MFC r351396: makefs: diff reduction to sys/fs/msdosfs No functional change. Modified: stable/12/usr.sbin/makefs/msdos/direntry.h stable/12/usr.sbin/makefs/msdos/msdosfs_conv.c stable/12/usr.sbin/makefs/msdos/msdosfs_denode.c stable/12/usr.sbin/makefs/msdos/msdosfs_fat.c stable/12/usr.sbin/makefs/msdos/msdosfs_lookup.c stable/12/usr.sbin/makefs/msdos/msdosfs_vfsops.c stable/12/usr.sbin/makefs/msdos/msdosfs_vnops.c stable/12/usr.sbin/makefs/msdos/msdosfsmount.h Directory Properties: stable/12/ (props changed) Modified: stable/12/usr.sbin/makefs/msdos/direntry.h ============================================================================== --- stable/12/usr.sbin/makefs/msdos/direntry.h Mon Sep 9 17:33:31 2019 (r352080) +++ stable/12/usr.sbin/makefs/msdos/direntry.h Mon Sep 9 17:34:18 2019 (r352081) @@ -135,12 +135,12 @@ struct winentry { #define DD_YEAR_MASK 0xFE00 /* year - 1980 */ #define DD_YEAR_SHIFT 9 -uint8_t winChksum(uint8_t *name); -int winSlotCnt(const u_char *un, size_t unlen); -int unix2dosfn(const u_char *un, u_char dn[12], size_t unlen, u_int gen); -int winChkName(const u_char *un, size_t unlen, struct winentry *wep, - int chksum); -int unix2winfn(const u_char *un, size_t unlen, struct winentry *wep, int cnt, - int chksum); +int unix2dosfn(const u_char *un, u_char dn[12], size_t unlen, u_int gen); +int unix2winfn(const u_char *un, size_t unlen, struct winentry *wep, int cnt, + int chksum); +int winChkName(const u_char *un, size_t unlen, struct winentry *wep, + int chksum); +uint8_t winChksum(uint8_t *name); +int winSlotCnt(const u_char *un, size_t unlen); #endif /* !_FS_MSDOSFS_DIRENTRY_H_ */ Modified: stable/12/usr.sbin/makefs/msdos/msdosfs_conv.c ============================================================================== --- stable/12/usr.sbin/makefs/msdos/msdosfs_conv.c Mon Sep 9 17:33:31 2019 (r352080) +++ stable/12/usr.sbin/makefs/msdos/msdosfs_conv.c Mon Sep 9 17:34:18 2019 (r352081) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. * Copyright (C) 1994, 1995, 1997 TooLs GmbH. * All rights reserved. @@ -29,7 +31,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Written by Paul Popelka (paulp@uts.amdahl.com) * * You can do anything you want with this software, just don't say you wrote Modified: stable/12/usr.sbin/makefs/msdos/msdosfs_denode.c ============================================================================== --- stable/12/usr.sbin/makefs/msdos/msdosfs_denode.c Mon Sep 9 17:33:31 2019 (r352080) +++ stable/12/usr.sbin/makefs/msdos/msdosfs_denode.c Mon Sep 9 17:34:18 2019 (r352081) @@ -1,6 +1,8 @@ /* $NetBSD: msdosfs_denode.c,v 1.7 2015/03/29 05:52:59 agc Exp $ */ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. * Copyright (C) 1994, 1995, 1997 TooLs GmbH. * All rights reserved. @@ -31,7 +33,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Written by Paul Popelka (paulp@uts.amdahl.com) * * You can do anything you want with this software, just don't say you wrote @@ -261,7 +263,7 @@ detrunc(struct denode *dep, u_long length, int flags) if (error) { MSDOSFS_DPRINTF(("detrunc(): pcbmap fails %d\n", error)); - return error; + return (error); } } @@ -282,10 +284,9 @@ detrunc(struct denode *dep, u_long length, int flags) MSDOSFS_DPRINTF(("detrunc(): bread fails %d\n", error)); - return error; + return (error); } - memset((char *)bp->b_data + boff, 0, - pmp->pm_bpcluster - boff); + memset(bp->b_data + boff, 0, pmp->pm_bpcluster - boff); if (flags & IO_SYNC) bwrite(bp); else @@ -326,7 +327,7 @@ detrunc(struct denode *dep, u_long length, int flags) if (chaintofree != 0 && !MSDOSFSEOF(pmp, chaintofree)) freeclusterchain(pmp, chaintofree); - return allerror; + return (allerror); } /* @@ -343,16 +344,16 @@ deextend(struct denode *dep, u_long length) * The root of a DOS filesystem cannot be extended. */ if (dep->de_vnode != NULL && !FAT32(pmp)) - return EINVAL; + return (EINVAL); /* * Directories cannot be extended. */ if (dep->de_Attributes & ATTR_DIRECTORY) - return EISDIR; + return (EISDIR); if (length <= dep->de_FileSize) - return E2BIG; + return (E2BIG); /* * Compute the number of clusters to allocate. Modified: stable/12/usr.sbin/makefs/msdos/msdosfs_fat.c ============================================================================== --- stable/12/usr.sbin/makefs/msdos/msdosfs_fat.c Mon Sep 9 17:33:31 2019 (r352080) +++ stable/12/usr.sbin/makefs/msdos/msdosfs_fat.c Mon Sep 9 17:34:18 2019 (r352081) @@ -871,9 +871,11 @@ freeclusterchain(struct msdosfsmount *pmp, u_long clus int fillinusemap(struct msdosfsmount *pmp) { - struct buf *bp = NULL; + struct buf *bp; u_long bn, bo, bsize, byteoffset, cn, readcn; int error; + + bp = NULL; /* * Mark all clusters in use, we mark the free ones in the FAT scan Modified: stable/12/usr.sbin/makefs/msdos/msdosfs_lookup.c ============================================================================== --- stable/12/usr.sbin/makefs/msdos/msdosfs_lookup.c Mon Sep 9 17:33:31 2019 (r352080) +++ stable/12/usr.sbin/makefs/msdos/msdosfs_lookup.c Mon Sep 9 17:34:18 2019 (r352081) @@ -278,7 +278,7 @@ uniqdosname(struct denode *dep, struct componentname * return error; } for (dentp = (struct direntry *)bp->b_data; - (char *)dentp < (char *)bp->b_data + blsize; + (char *)dentp < bp->b_data + blsize; dentp++) { if (dentp->deName[0] == SLOT_EMPTY) { /* Modified: stable/12/usr.sbin/makefs/msdos/msdosfs_vfsops.c ============================================================================== --- stable/12/usr.sbin/makefs/msdos/msdosfs_vfsops.c Mon Sep 9 17:33:31 2019 (r352080) +++ stable/12/usr.sbin/makefs/msdos/msdosfs_vfsops.c Mon Sep 9 17:34:18 2019 (r352081) @@ -1,4 +1,6 @@ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. * Copyright (C) 1994, 1995, 1997 TooLs GmbH. * All rights reserved. @@ -29,7 +31,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Written by Paul Popelka (paulp@uts.amdahl.com) * * You can do anything you want with this software, just don't say you wrote Modified: stable/12/usr.sbin/makefs/msdos/msdosfs_vnops.c ============================================================================== --- stable/12/usr.sbin/makefs/msdos/msdosfs_vnops.c Mon Sep 9 17:33:31 2019 (r352080) +++ stable/12/usr.sbin/makefs/msdos/msdosfs_vnops.c Mon Sep 9 17:34:18 2019 (r352081) @@ -1,6 +1,8 @@ /* $NetBSD: msdosfs_vnops.c,v 1.19 2017/04/13 17:10:12 christos Exp $ */ /*- + * SPDX-License-Identifier: BSD-4-Clause + * * Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank. * Copyright (C) 1994, 1995, 1997 TooLs GmbH. * All rights reserved. @@ -31,7 +33,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -/* +/*- * Written by Paul Popelka (paulp@uts.amdahl.com) * * You can do anything you want with this software, just don't say you wrote @@ -219,7 +221,7 @@ msdosfs_findslot(struct denode *dp, struct componentna for (blkoff = 0; blkoff < blsize; blkoff += sizeof(struct direntry), diroff += sizeof(struct direntry)) { - dep = (struct direntry *)((char *)bp->b_data + blkoff); + dep = (struct direntry *)(bp->b_data + blkoff); /* * If the slot is empty and we are still looking * for an empty then remember this one. If the @@ -495,7 +497,7 @@ msdosfs_wfile(const char *path, struct denode *dep, fs goto out; } cpsize = MIN((nsize - offs), blsize - on); - memcpy((char *)bp->b_data + on, dat + offs, cpsize); + memcpy(bp->b_data + on, dat + offs, cpsize); bwrite(bp); offs += cpsize; } Modified: stable/12/usr.sbin/makefs/msdos/msdosfsmount.h ============================================================================== --- stable/12/usr.sbin/makefs/msdos/msdosfsmount.h Mon Sep 9 17:33:31 2019 (r352080) +++ stable/12/usr.sbin/makefs/msdos/msdosfsmount.h Mon Sep 9 17:34:18 2019 (r352081) @@ -51,7 +51,7 @@ */ #ifndef _MSDOSFS_MSDOSFSMOUNT_H_ -#define _MSDOSFS_MSDOSFSMOUNT_H_ +#define _MSDOSFS_MSDOSFSMOUNT_H_ #include