1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Fix support for pre-Win95 filesystems: Make it possible to lookup just

created short file name. Don't insert "generation numbers".
This commit is contained in:
Dmitrij Tejblum 1998-05-17 21:18:08 +00:00
parent 167a4d818c
commit 011cdb576c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36133
4 changed files with 28 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_conv.c,v 1.25 1998/02/27 12:22:22 msmith Exp $ */
/* $Id: msdosfs_conv.c,v 1.26 1998/04/15 17:46:37 bde Exp $ */
/* $NetBSD: msdosfs_conv.c,v 1.25 1997/11/17 15:36:40 ws Exp $ */
/*-
@ -627,6 +627,8 @@ unix2dosfn(un, dn, unlen, gen, u2d_loaded, u2d, lu_loaded, lu)
/*
* Now insert the generation number into the filename part
*/
if (gen == 0)
return conv;
for (wcp = gentext + sizeof(gentext); wcp > gentext && gen; gen /= 10)
*--wcp = gen % 10 + '0';
if (gen)

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_lookup.c,v 1.22 1998/02/26 06:45:44 msmith Exp $ */
/* $Id: msdosfs_lookup.c,v 1.23 1998/05/09 09:36:38 dt Exp $ */
/* $NetBSD: msdosfs_lookup.c,v 1.37 1997/11/17 15:36:54 ws Exp $ */
/*-
@ -169,8 +169,10 @@ msdosfs_lookup(ap)
cnp->cn_namelen) + 1;
break;
}
if (pmp->pm_flags & MSDOSFSMNT_SHORTNAME)
if (pmp->pm_flags & MSDOSFSMNT_SHORTNAME) {
wincnt = 1;
olddos = 1;
}
unlen = winLenFixup(cnp->cn_nameptr, cnp->cn_namelen);
/*
@ -978,6 +980,13 @@ uniqdosname(dep, cnp, cp)
daddr_t bn;
struct buf *bp;
int error;
if (pmp->pm_flags & MSDOSFSMNT_SHORTNAME != 0)
return (unix2dosfn((const u_char *)cnp->cn_nameptr, cp,
cnp->cn_namelen, 0,
pmp->pm_flags & MSDOSFSMNT_U2WTABLE, pmp->pm_u2d,
pmp->pm_flags & MSDOSFSMNT_ULTABLE, pmp->pm_lu) ?
0 : EINVAL);
for (gen = 1;; gen++) {
/*

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_conv.c,v 1.25 1998/02/27 12:22:22 msmith Exp $ */
/* $Id: msdosfs_conv.c,v 1.26 1998/04/15 17:46:37 bde Exp $ */
/* $NetBSD: msdosfs_conv.c,v 1.25 1997/11/17 15:36:40 ws Exp $ */
/*-
@ -627,6 +627,8 @@ unix2dosfn(un, dn, unlen, gen, u2d_loaded, u2d, lu_loaded, lu)
/*
* Now insert the generation number into the filename part
*/
if (gen == 0)
return conv;
for (wcp = gentext + sizeof(gentext); wcp > gentext && gen; gen /= 10)
*--wcp = gen % 10 + '0';
if (gen)

View File

@ -1,4 +1,4 @@
/* $Id: msdosfs_lookup.c,v 1.22 1998/02/26 06:45:44 msmith Exp $ */
/* $Id: msdosfs_lookup.c,v 1.23 1998/05/09 09:36:38 dt Exp $ */
/* $NetBSD: msdosfs_lookup.c,v 1.37 1997/11/17 15:36:54 ws Exp $ */
/*-
@ -169,8 +169,10 @@ msdosfs_lookup(ap)
cnp->cn_namelen) + 1;
break;
}
if (pmp->pm_flags & MSDOSFSMNT_SHORTNAME)
if (pmp->pm_flags & MSDOSFSMNT_SHORTNAME) {
wincnt = 1;
olddos = 1;
}
unlen = winLenFixup(cnp->cn_nameptr, cnp->cn_namelen);
/*
@ -978,6 +980,13 @@ uniqdosname(dep, cnp, cp)
daddr_t bn;
struct buf *bp;
int error;
if (pmp->pm_flags & MSDOSFSMNT_SHORTNAME != 0)
return (unix2dosfn((const u_char *)cnp->cn_nameptr, cp,
cnp->cn_namelen, 0,
pmp->pm_flags & MSDOSFSMNT_U2WTABLE, pmp->pm_u2d,
pmp->pm_flags & MSDOSFSMNT_ULTABLE, pmp->pm_lu) ?
0 : EINVAL);
for (gen = 1;; gen++) {
/*