Репозитории 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 |
Группа :: Система/Настройка/Пакеты
Пакет: 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();