Skip to Content.
Sympa Menu

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

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Perforce Review Daemon <p4review AT smee.org>
  • To: "Andrew Stitt" <a AT t.armory.com>, "Arjan Bouter" <abouter AT gmail.com>, "Arwed von Merkatz" <v.merkatz AT gmx.net>, "SM-Commit Daemon" <sm-commit AT lists.ibiblio.org>, "David Kowis" <dkowis+smgl-p4 AT shlrm.org>, "duane_malcolm" <d.malcolm AT auckland.ac.nz>, "Eric Sandall" <eric AT sandall.us>, "Jason Flatt" <jflatt AT sourcemage.org>, "Jeremy Blosser" <jblosser AT sourcemage.org>, "Ladislav Hagara" <ladislav.hagara AT unob.cz>, "Pol Vinogradov" <vin.public AT gmail.com>, "Robin Cook" <rcook AT wyrms.net>, "vladimir_marek" <vlmarek AT volny.cz>
  • Subject: [SM-Commit] PERFORCE change 76801 by David Michael Leo Brown Jr. for review
  • Date: Sun, 26 Mar 2006 04:10:00 +0100 (BST)

Change 76801 by david_brown@dmlb2000-dmlb2004 on 2006/03/26 04:08:44

still slimming down access function make it use the standard way files
are status'd in installwatch and check against the return value

Affected files ...

... //sgl/grimoires/stage_root/utils/installwatch/HISTORY#11 edit
... //sgl/grimoires/stage_root/utils/installwatch/access-addition.patch#5 edit

Differences ...

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

@@ -1,4 +1,8 @@
2006-03-25 David Brown <dmlb2000 AT gmail.com>
+ * access-addition.patch: fixed patch to make it look more like open
when
+ opening for read only using the status int from instw_getstatus
+
+2006-03-25 David Brown <dmlb2000 AT gmail.com>
* access-addition.patch: fixed patch to remove log function cause it's
not needed.


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

@@ -1,5 +1,5 @@
diff --git a/installwatch-0.7.0beta4/installwatch.c
b/installwatch-0.7.0beta4/installwatch.c
-index e2b2e9f..37bf326 100644
+index e2b2e9f..7db45c9 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,14 @@

#if(GLIBC_MINOR >= 1)
true_creat64 = dlsym(libc_handle, "creat64");
-@@ -3150,6 +3152,52 @@ int utimes (const char *pathname, const
+@@ -3150,6 +3152,42 @@ int utimes (const char *pathname, const
return result;
}

+int access (const char *pathname, int type) {
+ int result;
+ instw_t instw;
-+ int s_errno;
++ int status;
+
+ if (!libc_handle)
+ initialize();
@@ -48,22 +48,12 @@
+ instw_print(&instw);
+#endif
+
-+ result=true_access(instw.translpath,type);
-+ if(result == -1 && errno == ENOENT)
-+ {
-+ /* 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);
-+ }
-+ }
++ instw_getstatus(&instw,&status);
++ if(status&INSTW_TRANSLATED)
++ result=true_access(instw.translpath,type);
++ else
++ result=true_access(instw.path,type);
++
+ instw_delete(&instw);
+ return result;
+}



  • [SM-Commit] PERFORCE change 76801 by David Michael Leo Brown Jr. for review, Perforce Review Daemon, 03/25/2006

Archive powered by MHonArc 2.6.24.

Top of Page