diff options
author | dt <dt@FreeBSD.org> | 1998-05-17 21:18:08 +0000 |
---|---|---|
committer | dt <dt@FreeBSD.org> | 1998-05-17 21:18:08 +0000 |
commit | 2af99a3a7a1b1d6790eabe9a945b073cc68238a0 (patch) | |
tree | 5dad65744a36839dd60986057b11f64750c98d53 /sys/msdosfs | |
parent | 08bf65546100f31be1d43d3fd360f86b73ed1b27 (diff) | |
download | FreeBSD-src-2af99a3a7a1b1d6790eabe9a945b073cc68238a0.zip FreeBSD-src-2af99a3a7a1b1d6790eabe9a945b073cc68238a0.tar.gz |
Fix support for pre-Win95 filesystems: Make it possible to lookup just
created short file name. Don't insert "generation numbers".
Diffstat (limited to 'sys/msdosfs')
-rw-r--r-- | sys/msdosfs/msdosfs_conv.c | 4 | ||||
-rw-r--r-- | sys/msdosfs/msdosfs_lookup.c | 13 |
2 files changed, 14 insertions, 3 deletions
diff --git a/sys/msdosfs/msdosfs_conv.c b/sys/msdosfs/msdosfs_conv.c index 10c60c0..6c39544 100644 --- a/sys/msdosfs/msdosfs_conv.c +++ b/sys/msdosfs/msdosfs_conv.c @@ -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) diff --git a/sys/msdosfs/msdosfs_lookup.c b/sys/msdosfs/msdosfs_lookup.c index 4ac7848..8a1222f 100644 --- a/sys/msdosfs/msdosfs_lookup.c +++ b/sys/msdosfs/msdosfs_lookup.c @@ -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++) { /* |