summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@free.fr>2013-03-10 14:35:41 +0900
committerCedric Bail <cedric.bail@free.fr>2013-03-10 15:58:29 +0900
commit12ceb717ea64105bbebfb45737fa8448ed721f83 (patch)
treec7356021c2f15d135313662339fd20d8f3b51beb
parentae08c6e721899d44c0202abe772d600078e908b9 (diff)
eeze: add a dummy implementation for when libmount is not available.
This implementation doesn't replace libmount, it just provide an empty piece of code that will always fail to do anything. It does simplify Eeze building and use by third party by always providing the API.
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/Makefile_Eeze.am13
-rw-r--r--src/lib/eeze/eeze_disk_dummy.c81
4 files changed, 93 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 966f18a1ee..129e551a20 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12013-03-10 Cedric Bail
2
3 * Eeze: add a dummy implementation of libmount when it is not available.
4
12013-03-08 Igor Murzov 52013-03-08 Igor Murzov
2 6
3 * Add WebP image saver. 7 * Add WebP image saver.
diff --git a/NEWS b/NEWS
index c4dbeb3c85..08ce5debe2 100644
--- a/NEWS
+++ b/NEWS
@@ -71,6 +71,7 @@ Additions:
71 * Edje textblock: Added support for size_range. 71 * Edje textblock: Added support for size_range.
72 * Ecore_x: Add atom related with indicator type. 72 * Ecore_x: Add atom related with indicator type.
73 * Ecore_x: Add manual render code before deiconify 73 * Ecore_x: Add manual render code before deiconify
74 * Eeze: Add a dummy libmount replacement for when libmount is not there.
74 75
75Deprecations: 76Deprecations:
76 * ecore_x: 77 * ecore_x:
diff --git a/src/Makefile_Eeze.am b/src/Makefile_Eeze.am
index 49df4a565e..b4755b9b1f 100644
--- a/src/Makefile_Eeze.am
+++ b/src/Makefile_Eeze.am
@@ -9,7 +9,8 @@ installed_eezemainheadersdir = $(includedir)/eeze-@VMAJ@
9dist_installed_eezemainheaders_DATA = \ 9dist_installed_eezemainheaders_DATA = \
10lib/eeze/Eeze.h \ 10lib/eeze/Eeze.h \
11lib/eeze/Eeze_Net.h \ 11lib/eeze/Eeze_Net.h \
12lib/eeze/Eeze_Sensor.h 12lib/eeze/Eeze_Sensor.h \
13lib/eeze/Eeze_Disk.h
13 14
14# libeeze.la 15# libeeze.la
15lib_eeze_libeeze_la_SOURCES = \ 16lib_eeze_libeeze_la_SOURCES = \
@@ -23,15 +24,13 @@ lib/eeze/eeze_udev_private.c \
23lib/eeze/eeze_udev_private.h \ 24lib/eeze/eeze_udev_private.h \
24lib/eeze/eeze_udev_syspath.c \ 25lib/eeze/eeze_udev_syspath.c \
25lib/eeze/eeze_udev_walk.c \ 26lib/eeze/eeze_udev_walk.c \
26lib/eeze/eeze_udev_watch.c 27lib/eeze/eeze_udev_watch.c \
27
28if HAVE_EEZE_MOUNT
29lib_eeze_libeeze_la_SOURCES += \
30lib/eeze/eeze_disk.c \ 28lib/eeze/eeze_disk.c \
31lib/eeze/eeze_disk_udev.c \ 29lib/eeze/eeze_disk_udev.c \
32lib/eeze/eeze_disk_mount.c \ 30lib/eeze/eeze_disk_mount.c \
33lib/eeze/eeze_disk_private.h 31lib/eeze/eeze_disk_private.h
34dist_installed_eezemainheaders_DATA += lib/eeze/Eeze_Disk.h 32
33if HAVE_EEZE_MOUNT
35if EEZE_LIBMOUNT_BEFORE_219 34if EEZE_LIBMOUNT_BEFORE_219
36lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_libmount_old.c 35lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_libmount_old.c
37else 36else
@@ -41,6 +40,8 @@ else
41lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_libmount.c 40lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_libmount.c
42endif 41endif
43endif 42endif
43else
44lib_eeze_libeeze_la_SOURCES += lib/eeze/eeze_disk_dummy.c
44endif 45endif
45 46
46lib_eeze_libeeze_la_CPPFLAGS = \ 47lib_eeze_libeeze_la_CPPFLAGS = \
diff --git a/src/lib/eeze/eeze_disk_dummy.c b/src/lib/eeze/eeze_disk_dummy.c
new file mode 100644
index 0000000000..678f55fefc
--- /dev/null
+++ b/src/lib/eeze/eeze_disk_dummy.c
@@ -0,0 +1,81 @@
1#ifdef HAVE_CONFIG_H
2#include "config.h"
3#endif
4
5#include <Eeze.h>
6#include <Eeze_Disk.h>
7
8#include "eeze_udev_private.h"
9#include "eeze_disk_private.h"
10
11Eina_Bool
12eeze_libmount_init(void)
13{
14 return EINA_TRUE;
15}
16
17void
18eeze_libmount_shutdown(void)
19{
20}
21
22unsigned long
23eeze_disk_libmount_opts_get(Eeze_Disk *disk EINA_UNUSED)
24{
25 return 0;
26}
27
28Eina_Bool
29eeze_disk_libmount_mounted_get(Eeze_Disk *disk EINA_UNUSED)
30{
31 return EINA_FALSE;
32}
33
34const char *
35eeze_disk_libmount_mp_find_source(const char *mount_point EINA_UNUSED)
36{
37 return NULL;
38}
39
40const char *
41eeze_disk_libmount_mp_lookup_by_uuid(const char *uuid EINA_UNUSED)
42{
43 return NULL;
44}
45
46const char *
47eeze_disk_libmount_mp_lookup_by_label(const char *label EINA_UNUSED)
48{
49 return NULL;
50}
51
52const char *
53eeze_disk_libmount_mp_lookup_by_devpath(const char *devpath EINA_UNUSED)
54{
55 return NULL;
56}
57
58EAPI Eina_Bool
59eeze_mount_tabs_watch(void)
60{
61 ERR("Dummy backend no watching code provided !");
62 return EINA_FALSE;
63}
64
65EAPI void
66eeze_mount_tabs_unwatch(void)
67{
68}
69
70EAPI Eina_Bool
71eeze_mount_mtab_scan(void)
72{
73 return EINA_FALSE;
74}
75
76EAPI Eina_Bool
77eeze_mount_fstab_scan(void)
78{
79 return EINA_FALSE;
80}
81