Put in proper address information for Poul-Henning Kamp.
[unix-history] / sys / pcfs / pcfs_lookup.c
index 3ef6e05..39eac92 100644 (file)
  *
  *  October 1992
  *
  *
  *  October 1992
  *
- *     $Header: /usr/src/CVS/sys/pcfs/pcfs_lookup.c,v 1.1.2.2 1993/02/07 21:57:22 friedl Exp $
- *
+ *     $Id: pcfs_lookup.c,v 1.6 1993/11/25 01:37:12 wollman Exp $
  */
 
 #include "param.h"
  */
 
 #include "param.h"
+#include "systm.h"
 #include "namei.h"
 #include "buf.h"
 #include "vnode.h"
 #include "namei.h"
 #include "buf.h"
 #include "vnode.h"
@@ -63,8 +63,8 @@ pcfs_lookup(vdp, ndp, p)
        int slotstatus;
 #define        NONE    0
 #define        FOUND   1
        int slotstatus;
 #define        NONE    0
 #define        FOUND   1
-       int slotoffset;
-       int slotcluster;
+       int slotoffset = 0;
+       int slotcluster = 0;
        int frcn;
        u_long cluster;
        int rootreloff;
        int frcn;
        u_long cluster;
        int rootreloff;
@@ -76,7 +76,7 @@ pcfs_lookup(vdp, ndp, p)
        struct denode *tdp;
        struct pcfsmount *pmp;
        struct buf *bp = 0;
        struct denode *tdp;
        struct pcfsmount *pmp;
        struct buf *bp = 0;
-       struct direntry *dep;
+       struct direntry *dep = 0;
        u_char dosfilename[12];
 
 #if defined(PCFSDEBUG)
        u_char dosfilename[12];
 
 #if defined(PCFSDEBUG)
@@ -113,7 +113,7 @@ printf("pcfs_lookup(): vdp %08x, dp %08x, Attr %02x\n",
                if (error == ENOENT)
                        return error;
 #ifdef PARANOID
                if (error == ENOENT)
                        return error;
 #ifdef PARANOID
-               if (vdp == ndp->ni_rdir  &&  ndp->ni_isdotdot)
+               if (vdp == ndp->ni_rootdir  &&  ndp->ni_isdotdot)
                        panic("pcfs_lookup: .. thru root");
 #endif /* PARANOID */
                pdp = dp;
                        panic("pcfs_lookup: .. thru root");
 #endif /* PARANOID */
                pdp = dp;
@@ -165,7 +165,7 @@ printf("pcfs_lookup(): cache hit, vnode %08x, file %s\n", vdp, dp->de_Name);
 #if defined(PCFSDEBUG)
 printf("pcfs_lookup(): looking for . or .. in root directory\n");
 #endif /* defined(PCFSDEBUG) */
 #if defined(PCFSDEBUG)
 printf("pcfs_lookup(): looking for . or .. in root directory\n");
 #endif /* defined(PCFSDEBUG) */
-               cluster == PCFSROOT;
+               cluster = PCFSROOT;
                diroff = PCFSROOT_OFS;
                goto foundroot;
        }
                diroff = PCFSROOT_OFS;
                goto foundroot;
        }
@@ -296,7 +296,7 @@ printf("pcfs_lookup(): saving empty slot location\n");
                        ndp->ni_pcfs.pcfs_cluster = slotcluster;
                        ndp->ni_pcfs.pcfs_count   = 1;
                }
                        ndp->ni_pcfs.pcfs_cluster = slotcluster;
                        ndp->ni_pcfs.pcfs_count   = 1;
                }
-/*             dp->de_flag |= DEUPD; /* never update dos directories */
+/*             dp->de_flag |= DEUPD;*/ /* never update dos directories */
                ndp->ni_nameiop |= SAVENAME;
                if (!lockparent)        /* leave searched dir locked?   */
                        DEUNLOCK(dp);
                ndp->ni_nameiop |= SAVENAME;
                if (!lockparent)        /* leave searched dir locked?   */
                        DEUNLOCK(dp);
@@ -427,7 +427,8 @@ createde(dep, ndp, depp)
 {
        int bn;
        int error;
 {
        int bn;
        int error;
-       u_long dirclust, diroffset;
+       u_int dirclust;
+       u_long diroffset;
        struct direntry *ndep;
        struct denode *ddep = VTODE(ndp->ni_dvp);       /* directory to add to */
        struct pcfsmount *pmp = dep->de_pmp;
        struct direntry *ndep;
        struct denode *ddep = VTODE(ndp->ni_dvp);       /* directory to add to */
        struct pcfsmount *pmp = dep->de_pmp;