[OpenAFS-devel] [PATCH] cleanup warnings on linux

Andres Salomon dilinger@athenacr.com
Fri, 06 May 2005 18:51:00 -0400


--=-IuzjZ1f6avVT0pAh6S2Y
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hi,

For some reason, fstat() is being used with char*'s, instead of stat().
I assume this is a mistake, and tested by someone on windows.  This
patch fixes it in 3 places.



--=-IuzjZ1f6avVT0pAh6S2Y
Content-Disposition: attachment; filename=patch.warning_fixes
Content-Type: text/x-patch; name=patch.warning_fixes; charset=UTF-8
Content-Transfer-Encoding: 7bit

diff -urN openafs--mainline--0/src/bozo/bosserver.c openafs--warning_fixes--0/src/bozo/bosserver.c
--- openafs--mainline--0/src/bozo/bosserver.c	2005-04-26 21:37:04.000000000 -0400
+++ openafs--warning_fixes--0/src/bozo/bosserver.c	2005-05-06 17:47:08.582137395 -0400
@@ -870,7 +870,7 @@
 
     if ((!DoSyslog)
 #ifndef AFS_NT40_ENV
-	&& (!(fstat(AFSDIR_BOZLOG_FILE, &sb) == 0) && 
+	&& (!(stat(AFSDIR_BOZLOG_FILE, &sb) == 0) && 
 	(S_ISFIFO(sb.st_mode)))
 #endif
 	) {
diff -urN openafs--mainline--0/src/util/serverLog.c openafs--warning_fixes--0/src/util/serverLog.c
--- openafs--mainline--0/src/util/serverLog.c	2005-04-19 01:14:40.000000000 -0400
+++ openafs--warning_fixes--0/src/util/serverLog.c	2005-05-06 17:45:34.219855407 -0400
@@ -241,7 +241,7 @@
     }
 
     /* Support named pipes as logs by not rotating them */
-    if ((fstat(fileName, &statbuf) == 0)  && (S_ISFIFO(statbuf.st_mode))) {
+    if ((stat(fileName, &statbuf) == 0)  && (S_ISFIFO(statbuf.st_mode))) {
 	isfifo = 1;
     }
 #endif
@@ -314,7 +314,7 @@
     }
 
     /* Support named pipes as logs by not rotating them */
-    if ((fstat(fileName, &statbuf) == 0)  && (S_ISFIFO(statbuf.st_mode))) {
+    if ((stat(fileName, &statbuf) == 0)  && (S_ISFIFO(statbuf.st_mode))) {
 	isfifo = 1;
     }
 #endif

--=-IuzjZ1f6avVT0pAh6S2Y--