aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/msdosfs
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-01-12 21:55:48 +0000
committerEd Maste <emaste@FreeBSD.org>2015-01-12 21:55:48 +0000
commit4882501b5cc046730acd163c609df6ab2496c00b (patch)
treecd9f53a8c89436c5879480e58a310b5e653aba52 /sys/fs/msdosfs
parent39107d9a918e46aeb3b9b577e512214559eaa8f2 (diff)
Notes
Diffstat (limited to 'sys/fs/msdosfs')
-rw-r--r--sys/fs/msdosfs/msdosfs_conv.c41
-rw-r--r--sys/fs/msdosfs/msdosfs_fat.c4
-rw-r--r--sys/fs/msdosfs/msdosfs_lookup.c5
3 files changed, 17 insertions, 33 deletions
diff --git a/sys/fs/msdosfs/msdosfs_conv.c b/sys/fs/msdosfs/msdosfs_conv.c
index b68fa9b1d418..f6a478c33ab5 100644
--- a/sys/fs/msdosfs/msdosfs_conv.c
+++ b/sys/fs/msdosfs/msdosfs_conv.c
@@ -295,12 +295,8 @@ dos2unixfn(u_char dn[11], u_char *un, int lower, struct msdosfsmount *pmp)
* 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, pmp)
* 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 != '.')
diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c
index 09febe51281b..3c17f00b971e 100644
--- a/sys/fs/msdosfs/msdosfs_fat.c
+++ b/sys/fs/msdosfs/msdosfs_fat.c
@@ -111,6 +111,7 @@ fatblock(struct msdosfsmount *pmp, u_long ofs, u_long *bnp, u_long *sizep,
* 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_long cluster, u_long *oldcnp)
* 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;
diff --git a/sys/fs/msdosfs/msdosfs_lookup.c b/sys/fs/msdosfs/msdosfs_lookup.c
index 4c32bdca6ff5..0d038310f79d 100644
--- a/sys/fs/msdosfs/msdosfs_lookup.c
+++ b/sys/fs/msdosfs/msdosfs_lookup.c
@@ -929,6 +929,9 @@ readde(struct denode *dep, struct buf **bpp, struct direntry **epp)
* 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 denode *dep)
* 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;