Group :: Sistema/Kernel e hardware
RPM: eject
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: eject-2.1.5-alt-supersubmount.patch
Download
Download
--- eject/eject.c
+++ eject/eject.c
@@ -869,6 +869,15 @@ static int MountedDevice(const char *nam
for (mntentry = getmntent(fp); mntentry; mntentry = getmntent(fp)) {
int mtabmaj, mtabmin;
+ if (strcmp(mntentry->mnt_type,"supermount") == 0) {
+ m_option = 1;
+ }
+ if (strcmp(mntentry->mnt_type,"subfs") == 0) {
+ m_option = 1;
+ }
+ if (strcmp(mntentry->mnt_fsname, "none") == 0) {
+ continue;
+ }
GetMajorMinor(mntentry->mnt_fsname, &mtabmaj, &mtabmin);
if (((strcmp(mntentry->mnt_fsname, name) == 0) || (strcmp(mntentry->mnt_dir, name) == 0)) ||
((maj != -1) && (maj == mtabmaj) && (min == mtabmin))) {
@@ -911,6 +920,9 @@ static int MountableDevice(const char *n
for (mntentry = getmntent(fp); mntentry; mntentry = getmntent(fp)) {
if (strcmp(mntentry->mnt_fsname,"#") && strcmp(mntentry->mnt_dir, name) == 0) {
+ if (strcmp(mntentry->mnt_fsname, "none") == 0) {
+ continue;
+ }
endmntent(fp);
*deviceName = strdup(mntentry->mnt_fsname);
*mountName = strdup(mntentry->mnt_dir);
@@ -947,8 +959,17 @@ static void UnmountDevices(const char *p
for (mntentry = getmntent(fp); mntentry; mntentry = getmntent(fp))
{
+ if (strcmp(mntentry->mnt_type,"supermount") == 0) {
+ m_option = 1;
+ }
+ if (strcmp(mntentry->mnt_type,"subfs") == 0) {
+ m_option = 1;
+ }
+ if (strcmp(mntentry->mnt_fsname, "none") == 0) {
+ continue;
+ }
status = regexec(&preg, mntentry->mnt_fsname, 0, 0, 0);
- if (status == 0)
+ if (status == 0 && m_option != 1)
{
if (v_option)
printf(_("%s: unmounting `%s'\n"), programName, mntentry->mnt_fsname);