forked from enlightenment/efl
completely change directory structure, lib name, includes, don't even bother trying to use this unless your e is the latest version
SVN revision: 49129
This commit is contained in:
parent
c339222b25
commit
6ad3256a01
|
@ -10,10 +10,8 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in* \
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
|
|
||||||
if BUILD_EEZE_UDEV
|
EEZE_PC = eeze.pc
|
||||||
EEZE_UDEV_PC = eeze_udev.pc
|
pkgconfig_DATA = $(EEZE_PC)
|
||||||
endif
|
|
||||||
pkgconfig_DATA = $(EEZE_UDEV_PC)
|
|
||||||
|
|
||||||
.PHONY: doc
|
.PHONY: doc
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
eeze v?.??
|
eeze v?.??
|
||||||
|
|
||||||
eeze is a collection of libraries that simplify the use of devices. Dependencies may vary, use at your own risk, i before e except after c.
|
eeze is a library to simplify the use of devices. Dependencies may vary, use at your own risk, i before e except after c.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# get rid of that stupid cache mechanism
|
# get rid of that stupid cache mechanism
|
||||||
rm -f config.cache
|
rm -f config.cache
|
||||||
|
|
||||||
AC_INIT([eeze], [0.4.0], [enlightenment-devel@lists.sourceforge.net])
|
AC_INIT([eeze], [0.5.0], [enlightenment-devel@lists.sourceforge.net])
|
||||||
release="ver-pre-svn-05"
|
release="ver-pre-svn-05"
|
||||||
AC_PREREQ([2.52])
|
AC_PREREQ([2.52])
|
||||||
AC_CONFIG_SRCDIR([configure.ac])
|
AC_CONFIG_SRCDIR([configure.ac])
|
||||||
|
@ -25,24 +25,10 @@ VMIN=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $2);}'`
|
||||||
VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
|
VMIC=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $3);}'`
|
||||||
SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
|
SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
|
||||||
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
|
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
|
||||||
eeze_udev_release_info="-release $release"
|
eeze_release_info="-release $release"
|
||||||
AC_SUBST(version_info)
|
AC_SUBST(version_info)
|
||||||
AC_SUBST(eeze_udev_release_info)
|
AC_SUBST(eeze_release_info)
|
||||||
|
|
||||||
modules=""
|
|
||||||
dnl Check enabled modules to build
|
|
||||||
AC_ARG_ENABLE([udev],[AC_HELP_STRING([--disable-udev], [Disable eeze_udev build])])
|
|
||||||
AS_IF(
|
|
||||||
[test "x$enableval" != "xno"],
|
|
||||||
modules+="udev"
|
|
||||||
[enable_eeze_udev="yes"],
|
|
||||||
[enable_eeze_udev=no],
|
|
||||||
)
|
|
||||||
|
|
||||||
if test -z $modules;then
|
|
||||||
AC_MSG_ERROR(you have not selected any modules to build!)
|
|
||||||
fi
|
|
||||||
# pkg-config
|
|
||||||
PKG_PROG_PKG_CONFIG
|
PKG_PROG_PKG_CONFIG
|
||||||
|
|
||||||
# Check whether pkg-config supports Requires.private
|
# Check whether pkg-config supports Requires.private
|
||||||
|
@ -54,11 +40,7 @@ AS_IF(
|
||||||
AC_SUBST(pkgconfig_requires_private)
|
AC_SUBST(pkgconfig_requires_private)
|
||||||
|
|
||||||
PKG_CHECK_MODULES([ECORE], [ecore])
|
PKG_CHECK_MODULES([ECORE], [ecore])
|
||||||
|
PKG_CHECK_MODULES(UDEV, libudev)
|
||||||
AS_IF(
|
|
||||||
[test "x${enable_eeze_udev}" = "xyes"],
|
|
||||||
[PKG_CHECK_MODULES(UDEV, libudev, [], [enable_eeze_udev="no"])]
|
|
||||||
)
|
|
||||||
|
|
||||||
udev_version=$(pkg-config libudev --modversion)
|
udev_version=$(pkg-config libudev --modversion)
|
||||||
|
|
||||||
|
@ -67,9 +49,6 @@ if test $udev_version -lt 142;then
|
||||||
AC_DEFINE([OLD_UDEV_RRRRRRRRRRRRRR],[1],[compat functionality for udev < 142])
|
AC_DEFINE([OLD_UDEV_RRRRRRRRRRRRRR],[1],[compat functionality for udev < 142])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL([BUILD_EEZE_UDEV], [test "x${enable_eeze_udev}" = "xyes"])
|
|
||||||
|
|
||||||
EFL_EDBUS_BUILD=""
|
|
||||||
lt_enable_auto_import=""
|
lt_enable_auto_import=""
|
||||||
AS_CASE(
|
AS_CASE(
|
||||||
["$host_os"],
|
["$host_os"],
|
||||||
|
@ -85,9 +64,8 @@ doc/eeze.dox
|
||||||
doc/Makefile
|
doc/Makefile
|
||||||
src/Makefile
|
src/Makefile
|
||||||
src/lib/Makefile
|
src/lib/Makefile
|
||||||
src/lib/udev/Makefile
|
|
||||||
src/bin/Makefile
|
src/bin/Makefile
|
||||||
eeze_udev.pc
|
eeze.pc
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,9 +81,6 @@ echo "------------------------------------------------------------------------"
|
||||||
echo
|
echo
|
||||||
echo "Configuration Options Summary:"
|
echo "Configuration Options Summary:"
|
||||||
echo
|
echo
|
||||||
echo " Modules:"
|
|
||||||
echo
|
|
||||||
echo " Eeze_Udev..............: $enable_eeze_udev"
|
|
||||||
echo
|
echo
|
||||||
echo "Compilation............: make (or gmake)"
|
echo "Compilation............: make (or gmake)"
|
||||||
echo " CPPFLAGS.............: $CPPFLAGS"
|
echo " CPPFLAGS.............: $CPPFLAGS"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
@file eeze.dox
|
@file eeze.dox
|
||||||
@brief Eeze Misc Libraries
|
@brief Eeze Device Library
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,10 +12,7 @@
|
||||||
|
|
||||||
@section intro What is Eeze?
|
@section intro What is Eeze?
|
||||||
|
|
||||||
Eeze is a collection of various APIs which may or may not be useful
|
Eeze is a library for easily manipulating devices.
|
||||||
to developers working with EFL. The aim is to eliminate the need to
|
|
||||||
learn any api outside of EFL while simultaneously providing an
|
|
||||||
extremely easy way to manipulate external libraries.
|
|
||||||
|
|
||||||
@verbatim
|
@verbatim
|
||||||
Pants
|
Pants
|
||||||
|
|
|
@ -3,9 +3,9 @@ exec_prefix=@exec_prefix@
|
||||||
libdir=@libdir@
|
libdir=@libdir@
|
||||||
includedir=@includedir@
|
includedir=@includedir@
|
||||||
|
|
||||||
Name: eeze_udev
|
Name: eeze
|
||||||
Description: udev convenience library for efl
|
Description: device convenience library for efl
|
||||||
@pkgconfig_requires_private@: ecore libudev
|
@pkgconfig_requires_private@: ecore libudev
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Libs: -L${libdir} -leeze_udev
|
Libs: -L${libdir} -leeze
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
|
@ -1,21 +1,17 @@
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
|
|
||||||
EEZE_CPPFLAGS = \
|
EEZE_CPPFLAGS = \
|
||||||
-I$(top_srcdir)/src/lib/udev \
|
-I$(top_srcdir)/src/lib \
|
||||||
@ECORE_CFLAGS@
|
@ECORE_CFLAGS@
|
||||||
|
|
||||||
LIBS = \
|
LIBS = \
|
||||||
@ECORE_LIBS@
|
@ECORE_LIBS@
|
||||||
|
|
||||||
if BUILD_EEZE_UDEV
|
|
||||||
EEZE_UDEV_PROG = eeze_udev_test
|
EEZE_UDEV_PROG = eeze_udev_test
|
||||||
endif
|
|
||||||
|
|
||||||
bin_PROGRAMS = \
|
bin_PROGRAMS = \
|
||||||
$(EEZE_UDEV_PROG)
|
$(EEZE_UDEV_PROG)
|
||||||
|
|
||||||
if BUILD_EEZE_UDEV
|
|
||||||
eeze_udev_test_SOURCES = eeze_udev_test.c
|
eeze_udev_test_SOURCES = eeze_udev_test.c
|
||||||
eeze_udev_test_CPPFLAGS = $(EEZE_CPPFLAGS)
|
eeze_udev_test_CPPFLAGS = $(EEZE_CPPFLAGS)
|
||||||
eeze_udev_test_LDADD = $(top_builddir)/src/lib/udev/libeeze_udev.la
|
eeze_udev_test_LDADD = $(top_builddir)/src/lib/libeeze.la
|
||||||
endif
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#include <Eeze_Udev.h>
|
#include <Eeze.h>
|
||||||
#include <Ecore.h>
|
#include <Ecore.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This demo program shows how to use some eeze functions. It roughly
|
* This demo program shows how to use some eeze_udev functions. It roughly
|
||||||
* 1kb as of now, TODO is to fix this but I'm too lazy now and it's only
|
* 1kb as of now, TODO is to fix this but I'm too lazy now and it's only
|
||||||
* a demo.
|
* a demo.
|
||||||
*/
|
*/
|
||||||
|
@ -69,7 +69,7 @@ end:
|
||||||
/* and delete the watch */
|
/* and delete the watch */
|
||||||
eeze_udev_watch_del(watch);
|
eeze_udev_watch_del(watch);
|
||||||
/* and shut down eudev */
|
/* and shut down eudev */
|
||||||
eeze_udev_shutdown();
|
eeze_shutdown();
|
||||||
/* and quit the main loop */
|
/* and quit the main loop */
|
||||||
ecore_main_loop_quit();
|
ecore_main_loop_quit();
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ int main()
|
||||||
Eina_Hash *hash;
|
Eina_Hash *hash;
|
||||||
|
|
||||||
ecore_init();
|
ecore_init();
|
||||||
eeze_udev_init();
|
eeze_init();
|
||||||
|
|
||||||
hash = eina_hash_stringshared_new(hash_free);
|
hash = eina_hash_stringshared_new(hash_free);
|
||||||
akbdmouse = malloc(sizeof(kbdmouse));
|
akbdmouse = malloc(sizeof(kbdmouse));
|
||||||
|
|
|
@ -117,8 +117,8 @@ typedef struct Eeze_Udev_Watch Eeze_Udev_Watch;
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EAPI int eeze_udev_init(void);
|
EAPI int eeze_init(void);
|
||||||
EAPI int eeze_udev_shutdown(void);
|
EAPI int eeze_shutdown(void);
|
||||||
|
|
||||||
EAPI Eina_List *eeze_udev_find_similar_from_syspath(const char *syspath);
|
EAPI Eina_List *eeze_udev_find_similar_from_syspath(const char *syspath);
|
||||||
EAPI void eeze_udev_find_unlisted_similar(Eina_List *list);
|
EAPI void eeze_udev_find_unlisted_similar(Eina_List *list);
|
|
@ -1,2 +1,21 @@
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
MAINTAINERCLEANFILES = Makefile.in
|
||||||
SUBDIRS=udev
|
|
||||||
|
AM_CPPFLAGS = @ECORE_CFLAGS@
|
||||||
|
|
||||||
|
lib_LTLIBRARIES = libeeze.la
|
||||||
|
include_HEADERS = Eeze.h
|
||||||
|
|
||||||
|
noinst_HEADERS = eeze_udev_private.h eeze_private.h
|
||||||
|
|
||||||
|
libeeze_la_SOURCES = \
|
||||||
|
Eeze.h \
|
||||||
|
eeze_udev.c \
|
||||||
|
eeze_udev_watch.c \
|
||||||
|
eeze_main.c \
|
||||||
|
eeze_udev_find.c \
|
||||||
|
eeze_udev_walk.c \
|
||||||
|
eeze_udev_private.c
|
||||||
|
|
||||||
|
libeeze_la_LIBADD = @ECORE_LIBS@ @UDEV_LIBS@
|
||||||
|
libeeze_la_LDFLAGS = -no-undefined -version-info @version_info@ @eeze_release_info@
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <Eeze.h>
|
||||||
|
#include "eeze_private.h"
|
||||||
|
#include "eeze_udev_private.h"
|
||||||
|
|
||||||
|
_udev *udev;
|
||||||
|
|
||||||
|
int _eeze_log_dom = -1;
|
||||||
|
int _eeze_init_count = 0;
|
||||||
|
|
||||||
|
EAPI int
|
||||||
|
eeze_init(void)
|
||||||
|
{
|
||||||
|
if (++_eeze_init_count != 1)
|
||||||
|
return _eeze_init_count;
|
||||||
|
|
||||||
|
if (!eina_init())
|
||||||
|
return --_eeze_init_count;
|
||||||
|
|
||||||
|
_eeze_log_dom = eina_log_domain_register
|
||||||
|
("eeze_udev", eeze_COLOR_DEFAULT);
|
||||||
|
|
||||||
|
if (_eeze_log_dom < 0)
|
||||||
|
{
|
||||||
|
EINA_LOG_ERR("Could not register 'eeze_udev' log domain.");
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!((udev) = udev_new()))
|
||||||
|
{
|
||||||
|
EINA_LOG_ERR("Could not initialize udev library!");
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
return _eeze_init_count;
|
||||||
|
fail:
|
||||||
|
eina_log_domain_unregister(_eeze_log_dom);
|
||||||
|
_eeze_log_dom = -1;
|
||||||
|
eina_shutdown();
|
||||||
|
return _eeze_init_count;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI int
|
||||||
|
eeze_shutdown(void)
|
||||||
|
{
|
||||||
|
if (--_eeze_init_count != 0)
|
||||||
|
return _eeze_init_count;
|
||||||
|
|
||||||
|
udev_unref(udev);
|
||||||
|
eina_log_domain_unregister(_eeze_log_dom);
|
||||||
|
_eeze_log_dom = -1;
|
||||||
|
eina_shutdown();
|
||||||
|
return _eeze_init_count;
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
#ifndef EEZE_PRIVATE_H
|
||||||
|
#define EEZE_PRIVATE_H
|
||||||
|
#ifndef eeze_COLOR_DEFAULT
|
||||||
|
#define eeze_COLOR_DEFAULT EINA_COLOR_CYAN
|
||||||
|
#endif
|
||||||
|
extern int _eeze_log_dom;
|
||||||
|
#ifdef ERR
|
||||||
|
#undef ERR
|
||||||
|
#endif
|
||||||
|
#ifdef INF
|
||||||
|
#undef INF
|
||||||
|
#endif
|
||||||
|
#ifdef WARN
|
||||||
|
#undef WARN
|
||||||
|
#endif
|
||||||
|
#ifdef DBG
|
||||||
|
#undef DBG
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define DBG(...) EINA_LOG_DOM_DBG(_eeze_log_dom, __VA_ARGS__)
|
||||||
|
#define INFO(...) EINA_LOG_DOM_INFO(_eeze_log_dom, __VA_ARGS__)
|
||||||
|
#define WARN(...) EINA_LOG_DOM_WARN(_eeze_log_dom, __VA_ARGS__)
|
||||||
|
#define ERR(...) EINA_LOG_DOM_ERR(_eeze_log_dom, __VA_ARGS__)
|
||||||
|
|
||||||
|
#endif
|
|
@ -2,7 +2,8 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <Eeze_Udev.h>
|
#include <Eeze.h>
|
||||||
|
#include "eeze_private.h"
|
||||||
#include "eeze_udev_private.h"
|
#include "eeze_udev_private.h"
|
||||||
|
|
||||||
extern _udev *udev;
|
extern _udev *udev;
|
|
@ -2,8 +2,9 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <Eeze.h>
|
||||||
|
#include "eeze_private.h"
|
||||||
#include "eeze_udev_private.h"
|
#include "eeze_udev_private.h"
|
||||||
#include <Eeze_Udev.h>
|
|
||||||
|
|
||||||
extern _udev *udev;
|
extern _udev *udev;
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <Eeze_Udev.h>
|
#include <Eeze.h>
|
||||||
|
#include "eeze_private.h"
|
||||||
#include "eeze_udev_private.h"
|
#include "eeze_udev_private.h"
|
||||||
|
|
||||||
extern _udev *udev;
|
extern _udev *udev;
|
|
@ -1,27 +1,6 @@
|
||||||
#ifndef EEZE_UDEV_PRIVATE_H
|
#ifndef EEZE_UDEV_PRIVATE_H
|
||||||
#define EEZE_UDEV_PRIVATE_H
|
#define EEZE_UDEV_PRIVATE_H
|
||||||
#include "Eeze_Udev.h"
|
#include "Eeze.h"
|
||||||
#ifndef eeze_COLOR_DEFAULT
|
|
||||||
#define eeze_COLOR_DEFAULT EINA_COLOR_CYAN
|
|
||||||
#endif
|
|
||||||
extern int _eeze_udev_log_dom;
|
|
||||||
#ifdef ERR
|
|
||||||
#undef ERR
|
|
||||||
#endif
|
|
||||||
#ifdef INF
|
|
||||||
#undef INF
|
|
||||||
#endif
|
|
||||||
#ifdef WARN
|
|
||||||
#undef WARN
|
|
||||||
#endif
|
|
||||||
#ifdef DBG
|
|
||||||
#undef DBG
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define DBG(...) EINA_LOG_DOM_DBG(_eeze_udev_log_dom, __VA_ARGS__)
|
|
||||||
#define INFO(...) EINA_LOG_DOM_INFO(_eeze_udev_log_dom, __VA_ARGS__)
|
|
||||||
#define WARN(...) EINA_LOG_DOM_WARN(_eeze_udev_log_dom, __VA_ARGS__)
|
|
||||||
#define ERR(...) EINA_LOG_DOM_ERR(_eeze_udev_log_dom, __VA_ARGS__)
|
|
||||||
|
|
||||||
typedef struct udev _udev;
|
typedef struct udev _udev;
|
||||||
typedef struct udev_list_entry _udev_list_entry;
|
typedef struct udev_list_entry _udev_list_entry;
|
|
@ -2,7 +2,8 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <Eeze_Udev.h>
|
#include <Eeze.h>
|
||||||
|
#include "eeze_private.h"
|
||||||
#include "eeze_udev_private.h"
|
#include "eeze_udev_private.h"
|
||||||
|
|
||||||
extern _udev *udev;
|
extern _udev *udev;
|
|
@ -2,7 +2,8 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <Eeze_Udev.h>
|
#include <Eeze.h>
|
||||||
|
#include "eeze_private.h"
|
||||||
#include "eeze_udev_private.h"
|
#include "eeze_udev_private.h"
|
||||||
|
|
||||||
extern _udev *udev;
|
extern _udev *udev;
|
|
@ -1,24 +0,0 @@
|
||||||
MAINTAINERCLEANFILES = Makefile.in
|
|
||||||
|
|
||||||
AM_CPPFLAGS = @ECORE_CFLAGS@
|
|
||||||
|
|
||||||
if BUILD_EEZE_UDEV
|
|
||||||
|
|
||||||
lib_LTLIBRARIES = libeeze_udev.la
|
|
||||||
include_HEADERS = Eeze_Udev.h
|
|
||||||
|
|
||||||
noinst_HEADERS = eeze_udev_private.h
|
|
||||||
|
|
||||||
libeeze_udev_la_SOURCES = \
|
|
||||||
Eeze_Udev.h \
|
|
||||||
eeze_udev.c \
|
|
||||||
eeze_udev_watch.c \
|
|
||||||
eeze_udev_main.c \
|
|
||||||
eeze_udev_find.c \
|
|
||||||
eeze_udev_walk.c \
|
|
||||||
eeze_udev_private.c
|
|
||||||
|
|
||||||
libeeze_udev_la_LIBADD = @ECORE_LIBS@ @UDEV_LIBS@
|
|
||||||
libeeze_udev_la_LDFLAGS = -no-undefined -version-info @version_info@ @eeze_udev_release_info@
|
|
||||||
|
|
||||||
endif
|
|
|
@ -1,56 +0,0 @@
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
#include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <Eeze_Udev.h>
|
|
||||||
#include "eeze_udev_private.h"
|
|
||||||
|
|
||||||
_udev *udev;
|
|
||||||
|
|
||||||
int _eeze_udev_log_dom = -1;
|
|
||||||
int _eeze_udev_init_count = 0;
|
|
||||||
|
|
||||||
EAPI int
|
|
||||||
eeze_udev_init(void)
|
|
||||||
{
|
|
||||||
if (++_eeze_udev_init_count != 1)
|
|
||||||
return _eeze_udev_init_count;
|
|
||||||
|
|
||||||
if (!eina_init())
|
|
||||||
return --_eeze_udev_init_count;
|
|
||||||
|
|
||||||
_eeze_udev_log_dom = eina_log_domain_register
|
|
||||||
("eeze_udev", eeze_COLOR_DEFAULT);
|
|
||||||
|
|
||||||
if (_eeze_udev_log_dom < 0)
|
|
||||||
{
|
|
||||||
EINA_LOG_ERR("Could not register 'eeze_udev' log domain.");
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!((udev) = udev_new()))
|
|
||||||
{
|
|
||||||
EINA_LOG_ERR("Could not initialize udev library!");
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
return _eeze_udev_init_count;
|
|
||||||
fail:
|
|
||||||
eina_log_domain_unregister(_eeze_udev_log_dom);
|
|
||||||
_eeze_udev_log_dom = -1;
|
|
||||||
eina_shutdown();
|
|
||||||
return _eeze_udev_init_count;
|
|
||||||
}
|
|
||||||
|
|
||||||
EAPI int
|
|
||||||
eeze_udev_shutdown(void)
|
|
||||||
{
|
|
||||||
if (--_eeze_udev_init_count != 0)
|
|
||||||
return _eeze_udev_init_count;
|
|
||||||
|
|
||||||
udev_unref(udev);
|
|
||||||
eina_log_domain_unregister(_eeze_udev_log_dom);
|
|
||||||
_eeze_udev_log_dom = -1;
|
|
||||||
eina_shutdown();
|
|
||||||
return _eeze_udev_init_count;
|
|
||||||
}
|
|
Loading…
Reference in New Issue