// good shape and we simply return true, provided no change is detected.
int fdc, fgc;
- if (cm_freelanceEnabled && scp->fid.cell==0x1 && scp->fid.volume==AFS_FAKE_ROOT_VOL_ID) { // if it's something on /afs
+ if (cm_freelanceEnabled &&
+ scp->fid.cell==AFS_FAKE_ROOT_CELL_ID &&
+ scp->fid.volume==AFS_FAKE_ROOT_VOL_ID) { // if it's something on /afs
if (!(scp->fid.vnode==0x1 && scp->fid.unique==0x1)) // if it's not root.afs
return 1;
else {
// specially. We need to fetch the status by calling
// cm_MergeStatus and mark that cm_fakeDirCallback is 2
if (cm_freelanceEnabled &&
- scp->fid.cell==0x1 &&
+ scp->fid.cell==AFS_FAKE_ROOT_CELL_ID &&
scp->fid.volume==AFS_FAKE_ROOT_VOL_ID &&
scp->fid.unique==0x1 &&
scp->fid.vnode==0x1) {
int cm_FakeRootFid(cm_fid_t *fidp)
{
- fidp->cell = 0x1; /* root cell */
+ fidp->cell = AFS_FAKE_ROOT_CELL_ID; /* root cell */
fidp->volume = AFS_FAKE_ROOT_VOL_ID; /* root.afs ? */
fidp->vnode = 0x1;
fidp->unique = 0x1;
osi_Log0(afsd_logp,"Invalidating local mount point scp... ");
- aFid.cell = 0x1;
+ aFid.cell = AFS_FAKE_ROOT_CELL_ID;
aFid.volume=AFS_FAKE_ROOT_VOL_ID;
aFid.unique=0x1;
aFid.vnode=0x2;
extern long cm_FreelanceAddMount(char *filename, char *cellname, char *volume, int rw, cm_fid_t *fidp);
#define AFS_FREELANCE_INI "afs_freelance.ini"
-#define AFS_FAKE_ROOT_VOL_ID 0x00000001
+#define AFS_FAKE_ROOT_CELL_ID 0xFFFFFFFF
+#define AFS_FAKE_ROOT_VOL_ID 0xFFFFFFFF
#endif // _CM_FREELANCE_H
// because we have to fill in the status stuff 'coz we
// don't want trybulkstat to fill it in for us
#ifdef AFS_FREELANCE_CLIENT
- special = (fidp->cell==0x1 && fidp->volume==AFS_FAKE_ROOT_VOL_ID &&
+ special = (fidp->cell==AFS_FAKE_ROOT_CELL_ID &&
+ fidp->volume==AFS_FAKE_ROOT_VOL_ID &&
!(fidp->vnode==0x1 && fidp->unique==0x1));
- isRoot = (fidp->cell==0x1 && fidp->volume==AFS_FAKE_ROOT_VOL_ID &&
- fidp->vnode==0x1 && fidp->unique==0x1);
+ isRoot = (fidp->cell==AFS_FAKE_ROOT_CELL_ID &&
+ fidp->volume==AFS_FAKE_ROOT_VOL_ID &&
+ fidp->vnode==0x1 && fidp->unique==0x1);
if (cm_freelanceEnabled && isRoot) {
osi_Log0(afsd_logp,"cm_getSCache Freelance and isRoot");
/* freelance: if we are trying to get the root scp for the first
scp->volp = cm_rootSCachep->volp;
if (scp->dotdotFidp == (cm_fid_t *) NULL)
scp->dotdotFidp = (cm_fid_t *) malloc (sizeof(cm_fid_t));
- scp->dotdotFidp->cell=0x1;
+ scp->dotdotFidp->cell=AFS_FAKE_ROOT_CELL_ID;
scp->dotdotFidp->volume=AFS_FAKE_ROOT_VOL_ID;
scp->dotdotFidp->unique=1;
scp->dotdotFidp->vnode=1;
#ifdef AFS_FREELANCE_CLIENT
&& (!cm_freelanceEnabled || !(!(scp->fid.vnode==0x1 &&
scp->fid.unique==0x1) &&
- scp->fid.cell==0x1 &&
+ scp->fid.cell==AFS_FAKE_ROOT_CELL_ID &&
scp->fid.volume==AFS_FAKE_ROOT_VOL_ID))
#endif /* AFS_FREELANCE_CLIENT */
) {
tp = pathp;
phase = 2;
}
+ if (tp == NULL) {
+ tp = "";
+ }
haveComponent = 0;
psp = NULL;
tscp = rootSCachep;
// yj: if this is a mountpoint under root.afs then we don't want it
// to be bulkstat-ed, instead, we call getSCache directly and under
// getSCache, it is handled specially.
- if (cm_freelanceEnabled &&
- tfid.cell==0x1 && tfid.volume==AFS_FAKE_ROOT_VOL_ID &&
- !(tfid.vnode==0x1 && tfid.unique==0x1) )
+ if ( cm_freelanceEnabled &&
+ tfid.cell==AFS_FAKE_ROOT_CELL_ID &&
+ tfid.volume==AFS_FAKE_ROOT_VOL_ID &&
+ !(tfid.vnode==0x1 && tfid.unique==0x1) )
{
osi_Log0(afsd_logp, "cm_TryBulkProc Freelance calls cm_SCache on root.afs mountpoint");
return cm_GetSCache(&tfid, &tscp, NULL, NULL);