summaryrefslogtreecommitdiffstats
path: root/sys/msdosfs
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1998-02-22 18:00:54 +0000
committerache <ache@FreeBSD.org>1998-02-22 18:00:54 +0000
commit990caf0708294f017ba9b50bf1b748756e849952 (patch)
tree9b45e968ac02e806f5af738dd365347aa52417a3 /sys/msdosfs
parentfd40b7783843d8c0232cf4d2776a529fe4d683cb (diff)
downloadFreeBSD-src-990caf0708294f017ba9b50bf1b748756e849952.zip
FreeBSD-src-990caf0708294f017ba9b50bf1b748756e849952.tar.gz
Reduce new arguments number added in my changes
Diffstat (limited to 'sys/msdosfs')
-rw-r--r--sys/msdosfs/direntry.h8
-rw-r--r--sys/msdosfs/msdosfs_conv.c14
-rw-r--r--sys/msdosfs/msdosfs_lookup.c10
-rw-r--r--sys/msdosfs/msdosfs_vnops.c6
4 files changed, 19 insertions, 19 deletions
diff --git a/sys/msdosfs/direntry.h b/sys/msdosfs/direntry.h
index e4151ab..573eef2 100644
--- a/sys/msdosfs/direntry.h
+++ b/sys/msdosfs/direntry.h
@@ -1,4 +1,4 @@
-/* $Id: direntry.h,v 1.6 1998/02/22 15:09:36 ache Exp $ */
+/* $Id: direntry.h,v 1.7 1998/02/22 17:26:21 ache Exp $ */
/* $NetBSD: direntry.h,v 1.14 1997/11/17 15:36:32 ws Exp $ */
/*-
@@ -132,9 +132,9 @@ void unix2dostime __P((struct timespec *tsp, u_int16_t *ddp,
void dos2unixtime __P((u_int dd, u_int dt, u_int dh, struct timespec *tsp));
int dos2unixfn __P((u_char dn[11], u_char *un, int lower));
int unix2dosfn __P((const u_char *un, u_char dn[12], int unlen, u_int gen));
-int unix2winfn __P((const u_char *un, int unlen, struct winentry *wep, int cnt, int chksum, int table_loaded, u_int16_t *u2w));
-int winChkName __P((const u_char *un, int unlen, struct winentry *wep, int chksum, int table_loaded, u_int16_t *u2w));
-int win2unixfn __P((struct winentry *wep, struct dirent *dp, int chksum, int table_loaded, u_int16_t *u2w));
+int unix2winfn __P((const u_char *un, int unlen, struct winentry *wep, int cnt, int chksum, u_int16_t *u2w));
+int winChkName __P((const u_char *un, int unlen, struct winentry *wep, int chksum, u_int16_t *u2w));
+int win2unixfn __P((struct winentry *wep, struct dirent *dp, int chksum, u_int16_t *u2w));
u_int8_t winChksum __P((u_int8_t *name));
int winSlotCnt __P((const u_char *un, int unlen));
#endif /* KERNEL */
diff --git a/sys/msdosfs/msdosfs_conv.c b/sys/msdosfs/msdosfs_conv.c
index e8d5d4e..8a713a9 100644
--- a/sys/msdosfs/msdosfs_conv.c
+++ b/sys/msdosfs/msdosfs_conv.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_conv.c,v 1.18 1998/02/22 15:09:39 ache Exp $ */
+/* $Id: msdosfs_conv.c,v 1.19 1998/02/22 17:26:24 ache Exp $ */
/* $NetBSD: msdosfs_conv.c,v 1.25 1997/11/17 15:36:40 ws Exp $ */
/*-
@@ -563,19 +563,19 @@ unix2dosfn(un, dn, unlen, gen)
* i.e. doesn't consist solely of blanks and dots
*/
int
-unix2winfn(un, unlen, wep, cnt, chksum, table_loaded, u2w)
+unix2winfn(un, unlen, wep, cnt, chksum, u2w)
const u_char *un;
int unlen;
struct winentry *wep;
int cnt;
int chksum;
- int table_loaded;
u_int16_t *u2w;
{
const u_int8_t *cp;
u_int8_t *wcp;
int i;
u_int16_t code;
+ int table_loaded = (u2w != NULL);
/*
* Drop trailing blanks and dots
@@ -663,17 +663,17 @@ find_lcode(code, u2w)
* Returns the checksum or -1 if no match
*/
int
-winChkName(un, unlen, wep, chksum, table_loaded, u2w)
+winChkName(un, unlen, wep, chksum, u2w)
const u_char *un;
int unlen;
struct winentry *wep;
int chksum;
- int table_loaded;
u_int16_t *u2w;
{
u_int8_t *cp;
int i;
u_int16_t code;
+ int table_loaded = (u2w != NULL);
/*
* First compare checksums
@@ -757,17 +757,17 @@ winChkName(un, unlen, wep, chksum, table_loaded, u2w)
* Returns the checksum or -1 if impossible
*/
int
-win2unixfn(wep, dp, chksum, table_loaded, u2w)
+win2unixfn(wep, dp, chksum, u2w)
struct winentry *wep;
struct dirent *dp;
int chksum;
- int table_loaded;
u_int16_t *u2w;
{
u_int8_t *cp;
u_int8_t *np, *ep = dp->d_name + WIN_MAXLEN;
u_int16_t code;
int i;
+ int table_loaded = (u2w != NULL);
if ((wep->weCnt&WIN_CNT) > howmany(WIN_MAXLEN, WIN_CHARS)
|| !(wep->weCnt&WIN_CNT))
diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c
index 5653ad3..dec491c 100644
--- a/sys/msdosfs/msdosfs_lookup.c
+++ b/sys/msdosfs/msdosfs_lookup.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_lookup.c,v 1.16 1998/02/22 15:09:42 ache Exp $ */
+/* $Id: msdosfs_lookup.c,v 1.17 1998/02/22 17:26:27 ache Exp $ */
/* $NetBSD: msdosfs_lookup.c,v 1.37 1997/11/17 15:36:54 ws Exp $ */
/*-
@@ -256,8 +256,8 @@ msdosfs_lookup(ap)
cnp->cn_namelen,
(struct winentry *)dep,
chksum,
- pmp->pm_flags & MSDOSFSMNT_U2WTABLE,
- pmp->pm_u2w);
+ (pmp->pm_flags & MSDOSFSMNT_U2WTABLE) ?
+ pmp->pm_u2w : NULL);
continue;
}
@@ -641,8 +641,8 @@ createde(dep, ddep, depp, cnp)
}
if (!unix2winfn(un, unlen, (struct winentry *)ndep,
cnt++, chksum,
- pmp->pm_flags & MSDOSFSMNT_U2WTABLE,
- pmp->pm_u2w));
+ (pmp->pm_flags & MSDOSFSMNT_U2WTABLE) ?
+ pmp->pm_u2w : NULL));
break;
}
}
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index 4fa0591..2319a19 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $Id: msdosfs_vnops.c,v 1.56 1998/02/18 09:28:45 jkh Exp $ */
+/* $Id: msdosfs_vnops.c,v 1.57 1998/02/22 15:09:50 ache Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.68 1998/02/10 14:10:04 mrg Exp $ */
/*-
@@ -1703,8 +1703,8 @@ msdosfs_readdir(ap)
continue;
chksum = win2unixfn((struct winentry *)dentp,
&dirbuf, chksum,
- pmp->pm_flags & MSDOSFSMNT_U2WTABLE,
- pmp->pm_u2w);
+ (pmp->pm_flags & MSDOSFSMNT_U2WTABLE) ?
+ pmp->pm_u2w : NULL);
continue;
}
OpenPOWER on IntegriCloud