[Gluster-devel] Newly introduced bug in posix.c:same_file_type() in 2.0.0pre18

Fred Hucht fred at thp.uni-due.de
Tue Feb 17 13:49:27 UTC 2009


Hi,

someone broke posix.c:same_file_type() 2.0.0pre18: The logic was  
exactly reversed and the routine gave 0 for same file types, instead  
if TRUE. The version from 2.0.0rc1 worked...

Here is the patch

*** posix.c.ori	2009-02-14 17:56:28.000000000 +0100
--- posix.c	2009-02-17 14:43:10.241854464 +0100
***************
*** 2719,2725 ****
   static int
   same_file_type (mode_t m1, mode_t m2)
   {
! 	return (S_IFMT & (m1 ^ m2));
   }


--- 2719,2725 ----
   static int
   same_file_type (mode_t m1, mode_t m2)
   {
! 	return (S_IFMT & (m1 ^ m2)) == 0;
   }

Gowda, could you please re-check it and apply the patch?

Have fun,

      Fred

Dr. Fred Hucht <fred at thp.Uni-DuE.de>
Institute for Theoretical Physics
University of Duisburg-Essen, 47048 Duisburg, Germany






More information about the Gluster-devel mailing list