Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37747302
en ru br
Репозитории ALT
S:0.5.15lorg2-alt86
5.1: 0.5.15lorg2-alt33.M50P.1
4.1: 0.5.15lorg2-alt20.M41.1
4.0: 0.5.15lorg2-alt18.M40.1
+updates:0.5.15lorg2-alt18
3.0: 0.5.15cnc6-alt16
www.altlinux.org/Changes

Группа :: Система/Настройка/Пакеты
Пакет: apt

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: apt-0.5.15cnc6-alt-umount.patch
Скачать


--- apt-0.5.15cnc6/apt-pkg/contrib/cdromutl.cc~	2005-05-14 13:13:03 +0400
+++ apt-0.5.15cnc6/apt-pkg/contrib/cdromutl.cc	2005-05-14 13:26:05 +0400
@@ -34,6 +34,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <stdio.h>
+#include <mntent.h>
 									/*}}}*/
 
 // IsMounted - Returns true if the mount point is mounted		/*{{{*/
@@ -100,6 +101,22 @@ bool UnmountCdrom(string Path)
       }
       else
       {
+        FILE *f;
+        if ((f = setmntent ("/proc/mounts", "r")) != NULL)
+        {
+          struct mntent *mnt;
+          while ((mnt = getmntent (f)) != NULL)
+	  {
+	    string MntDir(mnt->mnt_dir);
+	    if (MntDir[MntDir.length() - 1] != '/')
+	      MntDir += '/';
+            if ( Path == MntDir )
+              if ((strcmp ("subfs", mnt->mnt_type) == 0) || (strcmp ("supermount", mnt->mnt_type) == 0))
+                _exit(0);
+	  }
+          endmntent (f);
+        }
+
 	 const char *Args[10];
 	 Args[0] = "umount";
 	 Args[1] = Path.c_str();
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin