----- Mail Original -----
De: "Marc Koschewski" <[email protected]>
À: "mathieu taillefumier" <[email protected]>
Cc: "Mike Blumenkrantz" <[email protected]>, "enlightenment-devel"
<[email protected]>
Envoyé: Jeudi 10 Février 2011 23h19:32 GMT +01:00 Amsterdam / Berlin / Berne /
Rome / Stockholm / Vienne
Objet: Re: [E-devel] util-linux 2.19 breaks eeze compile
* [email protected] <[email protected]> [2011-02-10
22:37:48 +0100]:
To me? To Mike?
I was thinking to the mailing list in general. enclosed to the email, the patch
I prepared to fix your issue. You have two options either wait for the problem
to be fix, (under way I think) or temporally apply this patch to eeze tree
(maybe good to do that on a separate copy). Personally, I would choose the
first option (i.e. wait) except if you can not afford to wait. The patch is
straightforward. So it is as you wish. I am being using this patch for few days
now without trouble.
Mathieu
>
> ----- Mail Original -----
> De: "Mike Blumenkrantz" <[email protected]>
> À: "mathieu taillefumier" <[email protected]>
> Cc: "enlightenment-devel" <[email protected]>, "Marc
> Koschewski" <[email protected]>
> Envoyé: Jeudi 10 Février 2011 22h22:03 GMT +01:00 Amsterdam / Berlin / Berne
> / Rome / Stockholm / Vienne
> Objet: Re: [E-devel] util-linux 2.19 breaks eeze compile
>
> On Thu, 10 Feb 2011 22:14:45 +0100 (CET)
> [email protected] wrote:
>
> > Hi Mike and Marc
> >
> > I am working on a patch fixing this problem. I already have the code but it
> > was not well written. I just did the modifications for following e17 in svn.
> > Just give me few hours for having a patch that is clean enough for been
> > submitted.
> >
> > Mathieu
> > ----- Mail Original -----
> > De: "Mike Blumenkrantz" <[email protected]>
> > À: "Marc Koschewski" <[email protected]>
> > Cc: "enlightenment-devel" <[email protected]>
> > Envoyé: Jeudi 10 Février 2011 21h46:44 GMT +01:00 Amsterdam / Berlin /
> > Berne / Rome / Stockholm / Vienne Objet: Re: [E-devel] util-linux 2.19
> > breaks
> > eeze compile
> >
> > On Thu, 10 Feb 2011 21:32:44 +0100
> > Marc Koschewski <[email protected]> wrote:
> >
> > >
> > > Hi there,
> > >
> > > I upgraded util-linux to 2.19 and this came up:
> > >
> > > make[3]: Entering directory `/home/marc/cvs/e17/eeze/src/lib'
> > > CC eeze_disk_libmount.lo
> > > eeze_disk_libmount.c:12:25: schwerwiegender Fehler: mount/mount.h: Datei
> > > oder Verzeichnis nicht gefunden
> > > Kompilierung beendet.
> > > make[3]: *** [eeze_disk_libmount.lo] Fehler 1
> > >
> > > Regards,
> > > Marc
> > >
> > known bug, will be fixed soon
> >
> Don't bother, I have other local commits that are going in as well.
>
> Well I just finished the patch. I can still send it if you want
>
> --
> Mike Blumenkrantz
> Zentific: NULL pointer dereferences now 50% off!
>
--
Marc Koschewski
Index: src/lib/eeze_disk_libmount.c
===================================================================
--- src/lib/eeze_disk_libmount.c (revision 56898)
+++ src/lib/eeze_disk_libmount.c (working copy)
@@ -9,11 +9,21 @@
#include <Ecore.h>
#include <Eeze.h>
#include <Eeze_Disk.h>
-#include <mount/mount.h>
+#if (LIBMOUNT_VER > 218)
+# include <libmount/libmount.h>
+/* they changed the name of the different structure */
+typedef struct libmnt_table mnt_tab;
+typedef struct libmnt_lock mnt_lock;
+typedef struct libmnt_fs mnt_fs;
+#else
+# include <mount/mount.h>
+#endif
+
#include "eeze_udev_private.h"
#include "eeze_disk_private.h"
+
/**
* @addtogroup disk Disk
* @{
@@ -39,7 +49,11 @@
static Eina_Bool
_eeze_mount_lock_mtab(void)
{
+
+#if LIBMOUNT_VER == 218
DBG("Locking mlock: %s", mnt_lock_get_linkfile(_eeze_mtab_lock));
+#endif
+
#if 0
#warning this code is broken with current libmount!
if (mnt_lock_file(_eeze_mtab_lock))
@@ -54,7 +68,9 @@
static void
_eeze_mount_unlock_mtab(void)
{
+#if LIBMOUNT_VER == 218
DBG("Unlocking mlock: %s", mnt_lock_get_linkfile(_eeze_mtab_lock));
+#endif
mnt_unlock_file(_eeze_mtab_lock);
}
@@ -67,6 +83,11 @@
{
mnt_tab *tab;
+#if LIBMOUNT_VER > 218
+ tab = mnt_new_table_from_file(filename);
+ if (tab)
+ return tab;
+#else
if (!(tab = mnt_new_tab(filename)))
return NULL;
if (!mnt_tab_parse_file(tab))
@@ -83,6 +104,7 @@
/* system error */
ERR("%s", mnt_tab_get_name(tab));
mnt_free_tab(tab);
+#endif
return NULL;
}
@@ -114,11 +136,19 @@
goto error;
}
+#if LIBMOUNT_VER > 218
+ mnt_free_table(bak);
+#else
mnt_free_tab(bak);
+#endif
return;
error:
+#if LIBMOUNT_VER > 218
+ mnt_free_table(_eeze_mount_mtab);
+#else
mnt_free_tab(_eeze_mount_mtab);
+#endif
_eeze_mount_mtab = bak;
}
@@ -133,8 +163,18 @@
{
if (_eeze_mtab_lock)
return EINA_TRUE;
+#if LIBMOUNT_VER < 219
if (!(_eeze_mtab_lock = mnt_new_lock(NULL, 0)))
return EINA_FALSE;
+#else
+ /*
+ * They also check the arguments and return NULL if the arguments
+ * are both zero or the file name is zero
+ */
+
+ if (!(_eeze_mtab_lock = mnt_new_lock("/etc/mtab", 0)))
+ return EINA_FALSE;
+#endif
return EINA_TRUE;
}
@@ -161,8 +201,11 @@
if (!eeze_mount_mtab_scan() || !eeze_mount_fstab_scan())
return EINA_FALSE;
-
+#if LIBMOUNT_VER > 218
+ mnt = mnt_table_find_srcpath(_eeze_mount_mtab, eeze_disk_devpath_get(disk), MNT_ITER_BACKWARD);
+#else
mnt = mnt_tab_find_srcpath(_eeze_mount_mtab, eeze_disk_devpath_get(disk), MNT_ITER_BACKWARD);
+#endif
if (!mnt)
return EINA_FALSE;
@@ -185,10 +228,15 @@
if (!eeze_mount_mtab_scan() || !eeze_mount_fstab_scan())
return NULL;
- mnt = mnt_tab_find_target(_eeze_mount_mtab, mount_point, MNT_ITER_BACKWARD);
+#if LIBMOUNT_VER > 218
+ mnt = mnt_table_find_target(_eeze_mount_mtab, mount_point, MNT_ITER_BACKWARD);
if (!mnt)
+ mnt = mnt_table_find_target(_eeze_mount_fstab, mount_point, MNT_ITER_BACKWARD);
+#else
+ mnt = mnt_tab_find_target(_eeze_mount_mtab, mount_point, MNT_ITER_BACKWARD);
+ if (!mnt)
mnt = mnt_tab_find_target(_eeze_mount_fstab, mount_point, MNT_ITER_BACKWARD);
-
+#endif
if (!mnt)
return NULL;
@@ -208,9 +256,11 @@
if (!eeze_mount_mtab_scan() || !eeze_mount_fstab_scan())
return NULL;
-
+#if LIBMOUNT_VER > 218
+ mnt = mnt_table_find_tag(_eeze_mount_fstab, "UUID", uuid, MNT_ITER_BACKWARD);
+#else
mnt = mnt_tab_find_tag(_eeze_mount_fstab, "UUID", uuid, MNT_ITER_BACKWARD);
-
+#endif
if (!mnt)
return NULL;
@@ -230,9 +280,11 @@
if (!eeze_mount_mtab_scan() || !eeze_mount_fstab_scan())
return NULL;
-
+#if LIBMOUNT_VER > 218
+ mnt = mnt_table_find_tag(_eeze_mount_fstab, "LABEL", label, MNT_ITER_BACKWARD);
+#else
mnt = mnt_tab_find_tag(_eeze_mount_fstab, "LABEL", label, MNT_ITER_BACKWARD);
-
+#endif
if (!mnt)
return NULL;
@@ -253,10 +305,15 @@
if (!eeze_mount_mtab_scan() || !eeze_mount_fstab_scan())
return NULL;
+#if LIBMOUNT_VER > 218
+ mnt = mnt_table_find_srcpath(_eeze_mount_mtab, devpath, MNT_ITER_BACKWARD);
+ if (!mnt)
+ mnt = mnt_table_find_srcpath(_eeze_mount_fstab, devpath, MNT_ITER_BACKWARD);
+#else
mnt = mnt_tab_find_srcpath(_eeze_mount_mtab, devpath, MNT_ITER_BACKWARD);
if (!mnt)
mnt = mnt_tab_find_srcpath(_eeze_mount_fstab, devpath, MNT_ITER_BACKWARD);
-
+#endif
if (!mnt)
return NULL;
@@ -295,12 +352,20 @@
if (!bak)
goto error;
+#if LIBMOUNT_VER > 218
+ mnt_free_table(_eeze_mount_mtab);
+#else
mnt_free_tab(_eeze_mount_mtab);
+#endif
_eeze_mount_mtab = bak;
if (!(bak = _eeze_mount_tab_parse("/etc/fstab")))
goto error;
- mnt_free_tab(_eeze_mount_fstab);
+#if LIBMOUNT_VER > 218
+ mnt_free_table(_eeze_mount_fstab);
+#else
+ mnt_free_table(_eeze_mount_fstab);
+#endif
_eeze_mount_fstab = bak;
_mtab_mon = ecore_file_monitor_add("/etc/mtab", _eeze_mount_tab_watcher, (void*)1);
@@ -315,7 +380,11 @@
else
{
ERR("Could not parse /etc/fstab!");
+#if LIBMOUNT_VER > 218
+ mnt_free_table(_eeze_mount_mtab);
+#else
mnt_free_tab(_eeze_mount_mtab);
+#endif
}
return EINA_FALSE;
}
@@ -361,8 +430,13 @@
_eeze_mount_unlock_mtab();
if (!bak)
goto error;
+#if LIBMOUNT_VER > 218
if (_eeze_mount_mtab)
- mnt_free_tab(_eeze_mount_mtab);
+ mnt_free_table(_eeze_mount_mtab);
+#else
+ if (_eeze_mount_mtab)
+ mnt_free_table(_eeze_mount_mtab);
+#endif
_eeze_mount_mtab = bak;
return EINA_TRUE;
@@ -392,8 +466,13 @@
bak = _eeze_mount_tab_parse("/etc/fstab");
if (!bak)
goto error;
+#if LIBMOUNT_VER > 218
if (_eeze_mount_fstab)
+ mnt_free_table(_eeze_mount_fstab);
+#else
+ if (_eeze_mount_fstab)
mnt_free_tab(_eeze_mount_fstab);
+#endif
_eeze_mount_fstab = bak;
return EINA_TRUE;
Index: configure.ac
===================================================================
--- configure.ac (revision 56898)
+++ configure.ac (working copy)
@@ -95,15 +95,31 @@
AC_DEFINE([OLD_UDEV_RRRRRRRRRRRRRR],[1],[compat functionality for udev < 148])
fi
-eeze_mount=
-PKG_CHECK_EXISTS([mount >= 2.18.0],
+eeze_mount="no"
+PKG_CHECK_EXISTS([mount >= 2.19.0],
[
AC_DEFINE([HAVE_EEZE_MOUNT], [1], [Eeze is mount-capable])
+
+ AC_DEFINE([LIBMOUNT_VER], [219], [Eeze uses util-linux 2.19 or higher])
AM_CONDITIONAL([HAVE_EEZE_MOUNT], [true])
+ AM_CONDITIONAL([LIBMOUNT_VER], [true])
eeze_mount="yes"
- ],
+ ])
+
+PKG_CHECK_EXISTS([mount = 2.18.0],
+ [
+ AC_DEFINE([HAVE_EEZE_MOUNT], [1], [Eeze is mount-capable])
+ AC_DEFINE([LIBMOUNT_VER], [218], [Eeze uses util-linux 2.19 or higher])
+ AM_CONDITIONAL([LIBMOUNT_VER], [true])
+ AM_CONDITIONAL([HAVE_EEZE_MOUNT], [true])
+ eeze_mount="yes"
+ ])
+
+if test "x$eeze_mount" = "xno"; then
AM_CONDITIONAL([HAVE_EEZE_MOUNT], [false])
-)
+ AM_CONDITIONAL([LIBMOUNT_VER], [false])
+fi
+
if test "x$eeze_mount" = "xyes";then
with_mount="/bin/mount"
with_umount="/bin/umount"
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel