Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jan 2015 21:55:49 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r277092 - head/sys/fs/msdosfs
Message-ID:  <201501122155.t0CLtnmE059101@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Mon Jan 12 21:55:48 2015
New Revision: 277092
URL: https://svnweb.freebsd.org/changeset/base/277092

Log:
  ANSIfy msdosfs
  
  Add a few cases and style(9) fixes missed in r276887
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/fs/msdosfs/msdosfs_conv.c
  head/sys/fs/msdosfs/msdosfs_fat.c
  head/sys/fs/msdosfs/msdosfs_lookup.c

Modified: head/sys/fs/msdosfs/msdosfs_conv.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_conv.c	Mon Jan 12 21:34:31 2015	(r277091)
+++ head/sys/fs/msdosfs/msdosfs_conv.c	Mon Jan 12 21:55:48 2015	(r277092)
@@ -295,12 +295,8 @@ dos2unixfn(u_char dn[11], u_char *un, in
  *	3 if conversion was successful and generation number was inserted
  */
 int
-unix2dosfn(un, dn, unlen, gen, pmp)
-	const u_char *un;
-	u_char dn[12];
-	size_t unlen;
-	u_int gen;
-	struct msdosfsmount *pmp;
+unix2dosfn(const u_char *un, u_char dn[12], size_t unlen, u_int gen,
+    struct msdosfsmount *pmp)
 {
 	ssize_t i, j;
 	int l;
@@ -519,13 +515,8 @@ done:
  *	 i.e. doesn't consist solely of blanks and dots
  */
 int
-unix2winfn(un, unlen, wep, cnt, chksum, pmp)
-	const u_char *un;
-	size_t unlen;
-	struct winentry *wep;
-	int cnt;
-	int chksum;
-	struct msdosfsmount *pmp;
+unix2winfn(const u_char *un, size_t unlen, struct winentry *wep, int cnt,
+    int chksum, struct msdosfsmount *pmp)
 {
 	u_int8_t *wcp;
 	int i, end;
@@ -588,12 +579,8 @@ unix2winfn(un, unlen, wep, cnt, chksum, 
  * Returns the checksum or -1 if no match
  */
 int
-winChkName(nbp, un, unlen, chksum, pmp)
-	struct mbnambuf *nbp;
-	const u_char *un;
-	size_t unlen;
-	int chksum;
-	struct msdosfsmount *pmp;
+winChkName(struct mbnambuf *nbp, const u_char *un, size_t unlen, int chksum,
+    struct msdosfsmount *pmp)
 {
 	size_t len;
 	u_int16_t c1, c2;
@@ -638,11 +625,8 @@ winChkName(nbp, un, unlen, chksum, pmp)
  * Returns the checksum or -1 if impossible
  */
 int
-win2unixfn(nbp, wep, chksum, pmp)
-	struct mbnambuf *nbp;
-	struct winentry *wep;
-	int chksum;
-	struct msdosfsmount *pmp;
+win2unixfn(struct mbnambuf *nbp, struct winentry *wep, int chksum,
+    struct msdosfsmount *pmp)
 {
 	u_char *c, tmpbuf[5];
 	u_int8_t *cp;
@@ -745,10 +729,7 @@ winChksum(u_int8_t *name)
  * Determine the number of slots necessary for Win95 names
  */
 int
-winSlotCnt(un, unlen, pmp)
-	const u_char *un;
-	size_t unlen;
-	struct msdosfsmount *pmp;
+winSlotCnt(const u_char *un, size_t unlen, struct msdosfsmount *pmp)
 {
 	size_t wlen;
 	char wn[WIN_MAXLEN * 2 + 1], *wnp;
@@ -773,9 +754,7 @@ winSlotCnt(un, unlen, pmp)
  * Determine the number of bytes neccessary for Win95 names
  */
 size_t
-winLenFixup(un, unlen)
-	const u_char* un;
-	size_t unlen;
+winLenFixup(const u_char *un, size_t unlen)
 {
 	for (un += unlen; unlen > 0; unlen--)
 		if (*--un != ' ' && *un != '.')

Modified: head/sys/fs/msdosfs/msdosfs_fat.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_fat.c	Mon Jan 12 21:34:31 2015	(r277091)
+++ head/sys/fs/msdosfs/msdosfs_fat.c	Mon Jan 12 21:55:48 2015	(r277092)
@@ -111,6 +111,7 @@ fatblock(struct msdosfsmount *pmp, u_lon
  *	    If this pointer is null then don't return this quantity.
  * cnp	  - address of where to place the filesystem relative cluster number.
  *	    If this pointer is null then don't return this quantity.
+ * sp     - pointer to returned block size
  *
  * NOTE: Either bnp or cnp must be non-null.
  * This function has one side effect.  If the requested file relative cluster
@@ -443,7 +444,8 @@ clusterfree(struct msdosfsmount *pmp, u_
  * the msdosfsmount structure. This is left to the caller.
  */
 int
-fatentry(int function, struct msdosfsmount *pmp, u_long cn, u_long *oldcontents,   u_long  newcontents)
+fatentry(int function, struct msdosfsmount *pmp, u_long cn, u_long *oldcontents,
+    u_long newcontents)
 {
 	int error;
 	u_long readcn;

Modified: head/sys/fs/msdosfs/msdosfs_lookup.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_lookup.c	Mon Jan 12 21:34:31 2015	(r277091)
+++ head/sys/fs/msdosfs/msdosfs_lookup.c	Mon Jan 12 21:55:48 2015	(r277092)
@@ -929,6 +929,9 @@ readde(struct denode *dep, struct buf **
  * and will truncate the file to 0 length.  When the vnode containing the
  * denode is needed for some other purpose by VFS it will call
  * msdosfs_reclaim() which will remove the denode from the denode cache.
+ *
+ * pdep	directory where the entry is removed
+ * dep	file to be removed
  */
 int
 removede(struct denode *pdep, struct denode *dep)
@@ -998,7 +1001,7 @@ removede(struct denode *pdep, struct den
  * Create a unique DOS name in dvp
  */
 int
-uniqdosname(struct denode *dep,struct componentname *cnp, u_char *cp)
+uniqdosname(struct denode *dep, struct componentname *cnp, u_char *cp)
 {
 	struct msdosfsmount *pmp = dep->de_pmp;
 	struct direntry *dentp;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501122155.t0CLtnmE059101>