[SM-Commit] PERFORCE change 76731 by David Michael Leo Brown Jr. for review

Perforce Review Daemon p4review at smee.org
Fri Mar 24 18:00:01 EST 2006


Change 76731 by david_brown at dmlb2000-dmlb2004 on 2006/03/24 22:57:08

	think I finally got this access working I'll submit it upstream as soon
	as I check some other things out

Affected files ...

... //sgl/grimoires/stage_root/utils/installwatch/BUILD#7 edit
... //sgl/grimoires/stage_root/utils/installwatch/HISTORY#9 edit
... //sgl/grimoires/stage_root/utils/installwatch/access-addition.patch#3 edit

Differences ...

==== //sgl/grimoires/stage_root/utils/installwatch/BUILD#7 (xtext) ====

@@ -1,6 +1,6 @@
 patch -p1 < ${SPELL_DIRECTORY}/installwatch-regressions.patch &&
 patch -p1 < ${SPELL_DIRECTORY}/getcwd-fix.patch               &&
 patch -p1 < ${SPELL_DIRECTORY}/utimes-addition.patch          &&
-#patch -p1 < ${SPELL_DIRECTORY}/access-addition.patch          &&
+patch -p1 < ${SPELL_DIRECTORY}/access-addition.patch          &&
 cd ${SOURCE_DIRECTORY}/${SPELL}-${VERSION}                    &&
 make

==== //sgl/grimoires/stage_root/utils/installwatch/HISTORY#9 (text) ====

@@ -1,3 +1,6 @@
+2006-03-24 David Brown <dmlb2000 at gmail.com>
+	* BUILD: uncommented the access patch because I think it's done
+
 2006-03-17 David Brown <dmlb2000 at gmail.com>
 	* BUILD: commented out access patch because it needs work still
 

==== //sgl/grimoires/stage_root/utils/installwatch/access-addition.patch#3 (text) ====

@@ -1,5 +1,5 @@
 diff --git a/installwatch-0.7.0beta4/installwatch.c b/installwatch-0.7.0beta4/installwatch.c
-index e2b2e9f..ec0692f 100644
+index e2b2e9f..f27361e 100644
 --- a/installwatch-0.7.0beta4/installwatch.c
 +++ b/installwatch-0.7.0beta4/installwatch.c
 @@ -91,6 +91,7 @@ static int (*true_truncate)(const char *
@@ -18,14 +18,15 @@
  
  #if(GLIBC_MINOR >= 1)
  	true_creat64     = dlsym(libc_handle, "creat64");
-@@ -3150,6 +3152,43 @@ int utimes (const char *pathname, const 
+@@ -3150,6 +3152,55 @@ int utimes (const char *pathname, const 
  	return result;
  }
  
 +int access (const char *pathname, int type) {
 +	int result;
 +	instw_t instw;
-+
++	int s_errno;
++	
 +	if (!libc_handle)
 +		initialize();
 +
@@ -50,7 +51,18 @@
 +	result=true_access(instw.translpath,type);
 +	if(result == -1 && errno == ENOENT)
 +	{
-+		result=true_access(pathname,type);
++		/* first check if it's been removed and we should break out */
++		s_errno = errno;
++		result=true_access(instw.mtranslpath,type);
++		if(result == 0)
++		{
++			errno = s_errno;
++			result = -1;
++		}
++		else
++		{
++			result=true_access(pathname,type);
++		}
 +	}
 +	log("%d\taccess\t%s\t#%s\n",result,instw.reslvpath,error(result));
 +



More information about the SM-Commit mailing list