- Fixed argument order to MediaMountException (msg first)
authorMarius Tomaschewski <mt@suse.de>
Thu, 23 Feb 2006 18:25:52 +0000 (18:25 +0000)
committerMarius Tomaschewski <mt@suse.de>
Thu, 23 Feb 2006 18:25:52 +0000 (18:25 +0000)
- Fixed to pass string to mount.mount()
- Adopted to new checkAttached prototype

zypp/media/MediaCD.cc
zypp/media/MediaDISK.cc
zypp/media/MediaNFS.cc
zypp/media/MediaSMB.cc

index 039cb55..a91da08 100644 (file)
@@ -354,7 +354,7 @@ namespace zypp {
              }
            }
 
-           mount.mount (it->name, mountpoint.c_str(), *fsit, options);
+           mount.mount(it->name, mountpoint, *fsit, options);
 
            setMediaSource(media);
 
@@ -381,8 +381,9 @@ namespace zypp {
              {
                ZYPP_CAUGHT(excpt_r);
              }
-             ZYPP_THROW(MediaMountException(it->name, mountpoint,
-               "Unable to verify that the media was mounted"
+             ZYPP_THROW(MediaMountException(
+               "Unable to verify that the media was mounted",
+               it->name, mountpoint
              ));
            }
          }
index 6902ac8..a09337f 100644 (file)
@@ -119,7 +119,7 @@ namespace zypp {
        options="ro";
       }
 
-      mount.mount(_device,mountpoint.c_str(),_filesystem,options);
+      mount.mount(_device,mountpoint,_filesystem,options);
 
       setMediaSource(media);
 
@@ -143,8 +143,9 @@ namespace zypp {
         {
           ZYPP_CAUGHT(excpt_r);
         }
-        ZYPP_THROW(MediaMountException(_device, mountpoint,
-          "Unable to verify that the media was mounted"
+        ZYPP_THROW(MediaMountException(
+          "Unable to verify that the media was mounted",
+         _device, mountpoint
         ));
       }
     }
index 2bdce62..f11faa0 100644 (file)
@@ -117,7 +117,7 @@ namespace zypp {
        options = str::join( optionList, "," );
       }
 
-      mount.mount(path,mountpoint.c_str(),filesystem,options);
+      mount.mount(path,mountpoint,filesystem,options);
 
       setMediaSource(media);
 
@@ -141,8 +141,9 @@ namespace zypp {
         {
           ZYPP_CAUGHT(excpt_r);
         }
-        ZYPP_THROW(MediaMountException(path, mountpoint,
-          "Unable to verify that the media was mounted"
+        ZYPP_THROW(MediaMountException(
+          "Unable to verify that the media was mounted",
+         path, mountpoint
         ));
       }
     }
@@ -157,7 +158,7 @@ namespace zypp {
     bool
     MediaNFS::isAttached() const
     {
-      return checkAttached(false);
+      return checkAttached(false, true);
     }
 
     ///////////////////////////////////////////////////////////////////
index 20b1d76..4633851 100644 (file)
@@ -226,7 +226,7 @@ namespace zypp {
       //
       //////////////////////////////////////////////////////
     
-      mount.mount( path, mountpoint.c_str(), _vfstype,
+      mount.mount( path, mountpoint, _vfstype,
                   options.asString(), environment );
 
       setMediaSource(media);
@@ -251,8 +251,9 @@ namespace zypp {
         {
           ZYPP_CAUGHT(excpt_r);
         }
-        ZYPP_THROW(MediaMountException(path, mountpoint,
-          "Unable to verify that the media was mounted"
+        ZYPP_THROW(MediaMountException(
+          "Unable to verify that the media was mounted",
+         path, mountpoint
         ));
       }
     }
@@ -267,7 +268,7 @@ namespace zypp {
     bool
     MediaSMB::isAttached() const
     {
-      return checkAttached(false);
+      return checkAttached(false, true);
     }
 
     ///////////////////////////////////////////////////////////////////