svn commit: r352081 - stable/12/usr.sbin/makefs/msdos
Ed Maste
emaste at FreeBSD.org
Mon Sep 9 17:34:21 UTC 2019
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 at 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 at 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 at 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 at 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 <sys/types.h>
More information about the svn-src-stable
mailing list