Imported Upstream version 14.45.0
[platform/upstream/libzypp.git] / zypp / PathInfo.cc
index 3b9e570..08c1a10 100644 (file)
@@ -18,7 +18,7 @@
 #include <fstream>
 #include <iomanip>
 
-#include "zypp/base/Logger.h"
+#include "zypp/base/LogTools.h"
 #include "zypp/base/String.h"
 #include "zypp/base/IOStream.h"
 #include "zypp/base/StrMatcher.h"
@@ -236,24 +236,29 @@ namespace zypp
 
     /******************************************************************
      **
-     **        FUNCTION NAME : PathInfo::major
+     **        FUNCTION NAME : PathInfo::devMajor
      **        FUNCTION TYPE : unsigned int
      */
-    unsigned int PathInfo::major() const
+    unsigned int PathInfo::devMajor() const
     {
       return isBlk() || isChr() ? ::major(statbuf_C.st_rdev) : 0;
     }
 
     /******************************************************************
      **
-     **        FUNCTION NAME : PathInfo::minor
+     **        FUNCTION NAME : PathInfo::devMinor
      **        FUNCTION TYPE : unsigned int
      */
-    unsigned int PathInfo::minor() const
+    unsigned int PathInfo::devMinor() const
     {
       return isBlk() || isChr() ? ::minor(statbuf_C.st_rdev) : 0;
     }
 
+    unsigned int PathInfo::major() const
+    { INT << "Cleanup the code: This method is deprecated" << endl; return devMajor(); }
+    unsigned int PathInfo::minor() const
+    { INT << "Cleanup the code: This method is deprecated" << endl; return devMinor(); }
+
     /******************************************************************
      **
      **        FUNCTION NAME : operator<<
@@ -641,6 +646,9 @@ namespace zypp
                         } );
     }
 
+    std::ostream & operator<<( std::ostream & str, const DirContent & obj )
+    { return dumpRange( str, obj.begin(), obj.end() ); }
+
     ///////////////////////////////////////////////////////////////////
     // is_empty_dir
     ///////////////////////////////////////////////////////////////////
@@ -836,6 +844,7 @@ namespace zypp
       {
         switch ( errno )
         {
+         case EPERM: // /proc/sys/fs/protected_hardlink in proc(5)
           case EXDEV: // oldpath  and  newpath are not on the same mounted file system
             return copy( oldpath, newpath );
             break;