Commit 05883d6e authored by Jamie McCracken's avatar Jamie McCracken

Added support for Inotify and improved build system.

A number of backend file monitors can now be used with tracker
parent c27e8e26
2006-02-27 Jamie McCracken <jamiemcc@gnome.org>
* Added inotify support
* Optimised inotify move support
* Improved Build system
* Can use an external libextractor if found during compilation
* Fixed some leaks
* Fixed threading issues with new inotify backend
2006-01-14 Jamie McCracken <jamiemcc@gnome.org>
* Updated libtracker to be more usable especially for Nautilus search
......
27th Feb
Added full support for Inotify with optimisations for detected moves.
Also updated build system, fixed leaks and improved stability.
16th January
Added support for Tracker as a Nautilus Search Backend
5 January 2006
Added polling mechanism to watch files in absence of FAM/iNotify or when FAM/iNotify watch limits have been exceeded
......
INTRODUCTION
Tracker is a powerful metadata framework that provides the ability to store, retrieve and search all types of file metadata including user defined ones.
Tracker is a powerful metadata framework that provides the ability to store, retrieve and search all types of file metadata including user defined ones. Tracker is super efficient with your systems memory when compared with some other competing frameworks, which offer less functionality too.
Tracker's features include:
......@@ -26,7 +26,9 @@ INSTALLATION (from source):
You will need to make sure you have the following dependencies installed :
libmysqld.a (version 4.1 or higher) - this is the embedded mysql server lib found in Debian package libmysqlclientXX-dev. RPMs (look for embedded server) can be found at : http://dev.mysql.com/downloads/mysql/4.1.html
libmysqld.a (version 4.1 or higher but not version 5) - this is the embedded mysql server lib found in Debian package libmysqlclient14-dev. RPMs (look for embedded server) can be found at : http://dev.mysql.com/downloads/mysql/4.1.html
(NB tracker does not work with the client.server versions of mysql so you must have the correct embedded server package installed)
libdbus (0.50 +)
......@@ -38,8 +40,16 @@ zlib
libvorbisfile3 (1.1+)
Recommended packages:
libextractor (0.5.9+) (tracker has a version inlined)
wv (1.0.2+)
poppler (pdftotext)
COMPILATION
To compile Tracker uses the following commands :
./configure --prefix=/usr
......@@ -52,6 +62,18 @@ If you install using any other prefix then you might have problems with files no
Compile Options
Tracker has several compiler options to enable/disable certain features. The following is available (all options should be passed as command line parameters to autogen.sh EG ./autogen.sh --disable-fam)
--disable-fam : this option omits support of FAM/GAMIN with tracker
--disable-inotify : this option omits support for inotify with tracker
--enable-libextractor : this option forces the use of the prepackaged version of libextractor in tracker
RUNNING TRACKER
......@@ -65,6 +87,20 @@ you can also pass a directory root to be indexed as a command line parameter. EG
"trackerd /home/jamie/Documents"
You can make sure that tracker only indexes a subset of your home directory by editing the tracker.cfg file in ~/.Tracker (which is created when you first run trackerd) and setting WatchDirectoryRoots to a semi-colon delimited list of directories (full path required!) EG: WatchDirectoryRoots=directory1;directory2;directory3
Tracker And Nautilus Search
Once you have installed Tracker and have some indexed contents, you should now compile Nautilus (ver 2.13.4 or higher) which should auto detect that tracker is installed and automatically compile in tracker support. You are now ready to appreciate a powerful and super efficient c based indexer in all its glory... happy hunting!
To make sure trackerd always start when you login to Gnome, you will need to add it to Gnome-session (select sessions from preferences menu, select startup program tab and then add /usr/bin/trackerd). For non-gnome installations, see the desktop docs for how to auto start an application for your particular desktop.
Tracker and Deskbar applet
Tracker is also integrated in gnome's deskbar applet. Please see them for more info.
COMMAND LINE TOOLS
......@@ -75,6 +111,6 @@ Tracker comes with a number of command line apps that you can use:
"tracker-search SEARCHTERM" - this perfoms a google like search using SEARCHTERM to retrieve all matching files where SEARCHTERM appears in any searchable metadata
"tracker-query" - this reads from STDIN an RDF Query that specifies the search criteria for various fields. It prints to STDOUT all matching files.
"tracker-query" - this reads from STDIN an RDF Query that specifies the search criteria for various fields. It prints to STDOUT all matching files. You can see some example queries in the RDF-Query-examples folder
dnl #########################################################################
AC_DEFUN([AX_COMPARE_VERSION], [
# Used to indicate true or false condition
ax_compare_version=false
# Convert the two version strings to be compared into a format that
# allows a simple string comparison. The end result is that a version
# string of the form 1.12.5-r617 will be converted to the form
# 0001001200050617. In other words, each number is zero padded to four
# digits, and non digits are removed.
AS_VAR_PUSHDEF([A],[ax_compare_version_A])
A=`echo "$1" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
-e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
-e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-e 's/[[^0-9]]//g'`
AS_VAR_PUSHDEF([B],[ax_compare_version_B])
B=`echo "$3" | sed -e 's/\([[0-9]]*\)/Z\1Z/g' \
-e 's/Z\([[0-9]]\)Z/Z0\1Z/g' \
-e 's/Z\([[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-e 's/Z\([[0-9]][[0-9]][[0-9]]\)Z/Z0\1Z/g' \
-e 's/[[^0-9]]//g'`
dnl # In the case of le, ge, lt, and gt, the strings are sorted as necessary
dnl # then the first line is used to determine if the condition is true.
dnl # The sed right after the echo is to remove any indented white space.
m4_case(m4_tolower($2),
[lt],[
ax_compare_version=`echo "x$A
x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/false/;s/x${B}/true/;1q"`
],
[gt],[
ax_compare_version=`echo "x$A
x$B" | sed 's/^ *//' | sort | sed "s/x${A}/false/;s/x${B}/true/;1q"`
],
[le],[
ax_compare_version=`echo "x$A
x$B" | sed 's/^ *//' | sort | sed "s/x${A}/true/;s/x${B}/false/;1q"`
],
[ge],[
ax_compare_version=`echo "x$A
x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"`
],[
dnl Split the operator from the subversion count if present.
m4_bmatch(m4_substr($2,2),
[0],[
# A count of zero means use the length of the shorter version.
# Determine the number of characters in A and B.
ax_compare_version_len_A=`echo "$A" | awk '{print(length)}'`
ax_compare_version_len_B=`echo "$B" | awk '{print(length)}'`
# Set A to no more than B's length and B to no more than A's length.
A=`echo "$A" | sed "s/\(.\{$ax_compare_version_len_B\}\).*/\1/"`
B=`echo "$B" | sed "s/\(.\{$ax_compare_version_len_A\}\).*/\1/"`
],
[[0-9]+],[
# A count greater than zero means use only that many subversions
A=`echo "$A" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"`
],
[.+],[
AC_WARNING(
[illegal OP numeric parameter: $2])
],[])
# Pad zeros at end of numbers to make same length.
ax_compare_version_tmp_A="$A`echo $B | sed 's/./0/g'`"
B="$B`echo $A | sed 's/./0/g'`"
A="$ax_compare_version_tmp_A"
# Check for equality or inequality as necessary.
m4_case(m4_tolower(m4_substr($2,0,2)),
[eq],[
test "x$A" = "x$B" && ax_compare_version=true
],
[ne],[
test "x$A" != "x$B" && ax_compare_version=true
],[
AC_WARNING([illegal OP parameter: $2])
])
])
AS_VAR_POPDEF([A])dnl
AS_VAR_POPDEF([B])dnl
dnl # Execute ACTION-IF-TRUE / ACTION-IF-FALSE.
if test "$ax_compare_version" = "true" ; then
m4_ifvaln([$4],[$4],[:])dnl
m4_ifvaln([$5],[else $5])dnl
fi
]) dnl AX_COMPARE_VERSION
This diff is collapsed.
......@@ -3,7 +3,7 @@
# This file is part of Tracker.
AC_PREREQ(2.57)
AC_INIT([tracker],[0.0.1],[xdg@lists.freedesktop.org])
AC_INIT([tracker],[0.0.2],[xdg@lists.freedesktop.org])
AC_CONFIG_SRCDIR([src/trackerd/trackerd.c])
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
......@@ -16,7 +16,7 @@ AC_SUBST(PACKAGE_URL, [http://www.freedesktop.org/Software/Tracker])
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([extractor.h fam.h fcntl.h stdlib.h string.h sys/time.h unistd.h mysql/mysql.h])
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h unistd.h])
# Check for glib 2.0
PKG_CHECK_MODULES(GLIB2, [ glib-2.0 >= 2.4.0 ] gthread-2.0 >= 2.4.0)
......@@ -24,52 +24,213 @@ AC_SUBST(GLIB2_CFLAGS)
AC_SUBST(GLIB2_LIBS)
# Check for Dbus 0.50 or higher
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.33 dbus-glib-1 >= 0.50 ])
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.50 dbus-glib-1 >= 0.50 ])
AC_SUBST(DBUS_CFLAGS)
AC_SUBST(DBUS_LIBS)
####################################################################
# Embedded Mysql checks
####################################################################
mysql_dir=""
AC_ARG_WITH(mysql,
AC_HELP_STRING([--with-mysql=PATH], [directory where mysql is installed]),
[if test "$with_mysql" = no ; then
AC_MSG_ERROR(you need MySQL for this package. Sorry.)
elif test "$with_mysql" != yes ; then
mysql_dir="$with_mysql/bin"
fi ])
# Try to find the mysql_config program
AC_PATH_PROG(MYSQL_CONFIG, mysql_config, no, $mysql_dir $PATH )
if test "$MYSQL_CONFIG" = no ; then
AC_MSG_ERROR([cannot find mysql_config])
fi
# Check to make sure we have MySQL >= 4.1.0
MYSQL_VERSION=`$MYSQL_CONFIG --version`
AX_COMPARE_VERSION("$MYSQL_VERSION", [ge], [4.1.0],
AC_MSG_RESULT(checking mysql version >= 4.1.0... yes),
AC_MSG_ERROR([Tracker requires version 4.1.* of the embedded MySQL. Please install correct version and then restart compilation]))
AX_COMPARE_VERSION("$MYSQL_VERSION", [lt], [5.0.0],
AC_MSG_RESULT(checking mysql version < 5.0.0... yes),
AC_MSG_ERROR([Tracker requires version 4.1.* of the embedded MySQL (it will not work with version 5 or higher). Please install correct version and then restart compilation]))
# Now make sure we've got mysqld
MYSQL_LIBS=`$MYSQL_CONFIG --libmysqld-libs`
if test $? != 0 ; then
AC_MSG_ERROR(Could not find the MySQL Embedded-server libraries.)
fi
MYSQL_CFLAGS=`$MYSQL_CONFIG --cflags`
MYSQL_CFLAGS=`eval echo $MYSQL_CFLAGS`
MYSQL_LIBS=`eval echo $MYSQL_LIBS`
# Now test that we can actually build with MySQL
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $MYSQL_CFLAGS"
AC_CHECK_HEADER([mysql/mysql.h],,AC_MSG_ERROR([unable to find MySQL header files]))
save_LIBS="$LIBS"
LIBS="$LIBS $MYSQL_LIBS"
CPPFLAGS="$save_CPPFLAGS"
LIBS="$save_LIBS"
AC_SUBST(MYSQL_CFLAGS)
AC_SUBST(MYSQL_LIBS)
###############################################################################
# Check for file monitor backends
###############################################################################
AM_CONDITIONAL(HAVE_INOTIFY, false)
AM_CONDITIONAL(HAVE_FAM, false)
##################################################################
# check for inotify
##################################################################
inotify_support=no
fs_monitor_backends=""
primary_backend="polling only"
AC_CHECK_HEADERS([linux/inotify.h],
[
inotify_support=yes
])
AC_ARG_ENABLE(inotify, [ --disable-inotify build without enabling inotify for file monitoring],
[
inotify_support=no
]
)
if test "$inotify_support" = "yes";
then
AC_DEFINE(HAVE_INOTIFY, [], [Define if we have inotify])
AM_CONDITIONAL(HAVE_INOTIFY, true)
AC_ARG_ENABLE(debug, [ --enable-inotify-debug turn on inotify debugging],
[AC_DEFINE(LIBINOTIFY_DEBUG,, [is debugging enabled?])],)
fs_monitor_backends="${fs_monitor_backends}inotify "
primary_backend="inotify"
fi
##################################################################
# check for FAM/GAMIN
##################################################################
FAM_LIBS=
FAM_CFLAGS=
PKG_CHECK_MODULES(GAMIN, gamin, have_fam=yes, have_fam=no)
if test x"$have_fam" = "xyes"
disable_fam=no
AC_ARG_ENABLE(fam, [ --disable-fam build without enabling fam for file monitoring],
[
disable_fam=yes
]
)
if test "$disable_fam" = "no"
then
FAM_CFLAGS="$GAMIN_CFLAGS"
FAM_LIBS="$GAMIN_LIBS"
AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
else
AC_CHECK_LIB(FAM, FAMOpen,
[AC_CHECK_HEADERS(fam.h,
[AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
FAM_LIBS="-lfam"],
AC_MSG_WARN(*** FAM support will not be built (header files not found) $FAM_MISSING_WARNING ***))],
AC_MSG_WARN(*** FAM support will not be built (FAM library not found) $FAM_MISSING_WARNING ***))
PKG_CHECK_MODULES(GAMIN, gamin, have_fam=yes, have_fam=no)
if test x"$have_fam" = "xyes"
then
AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
AM_CONDITIONAL(HAVE_FAM, true)
if test "$fs_monitor_backends" = ""; then
primary_backend="gamin"
FAM_LIBS="-lgamin-1"
fi
fs_monitor_backends="${fs_monitor_backends}gamin"
else
AC_CHECK_LIB(fam, FAMOpen,
[AC_CHECK_HEADERS(fam.h,
[AC_DEFINE(HAVE_FAM, [], [Define if we have FAM])
AM_CONDITIONAL(HAVE_FAM, true)
if test "$fs_monitor_backends" = ""; then
primary_backend="fam"
FAM_LIBS="-lfam"
fi
fs_monitor_backends="${fs_monitor_backends}fam"],
AC_MSG_WARN(FAM support will not be built (header files not found)))],
AC_MSG_WARN(FAM support will not be built (FAM library not found)))
fi
fi
AC_SUBST(FAM_LIBS)
AC_SUBST(FAM_CFLAGS)
AC_CONFIG_SUBDIRS(src/libextractor)
# ==========================================================================
################################################################################
# check whether we need to compile internal libextractor or use an existing version
################################################################################
AM_CONDITIONAL(USING_INTERNAL_LIBEXTRACTOR, true)
compile_libextractor=yes
extractor_support="building internal version"
AC_CHECK_HEADERS([extractor.h],
[
AM_CONDITIONAL(USING_INTERNAL_LIBEXTRACTOR, false)
compile_libextractor=no
extractor_support="not building - using an existing version found in system"
])
AC_ARG_ENABLE(libextractor, [ --enable-libextractor build with internal version of libextractor],
[
AM_CONDITIONAL(USING_INTERNAL_LIBEXTRACTOR, true)
compile_libextractor=yes
extractor_support="building internal version"
]
)
if test "$compile_libextractor" = "yes";
then
echo "buidling libextractor ...."
AC_CONFIG_SUBDIRS(src/libextractor)
fi
#####################################################
AM_CONFIG_HEADER(src/trackerd/config.h)
AC_CONFIG_FILES([
Makefile
tracker.pc
data/Makefile
data/english/Makefile
filters/Makefile
filters/application/Makefile
filters/text/Makefile
thumbnailers/Makefile
thumbnailers/application/Makefile
src/Makefile
src/text-filters/Makefile
src/text-filters/html_converter/Makefile
src/text-filters/ooo_converter/Makefile
src/tracker-extract/Makefile
src/trackerd/Makefile
src/libtracker/Makefile
Makefile
tracker.pc
data/Makefile
data/english/Makefile
filters/Makefile
filters/application/Makefile
filters/text/Makefile
thumbnailers/Makefile
thumbnailers/application/Makefile
src/Makefile
src/text-filters/Makefile
src/text-filters/html_converter/Makefile
src/text-filters/ooo_converter/Makefile
src/tracker-extract/Makefile
src/trackerd/Makefile
src/libtracker/Makefile
])
AC_OUTPUT
# ==========================================================================
echo "
Tracker-$VERSION:
prefix: ${prefix}
source code location: ${srcdir}
compiler: ${CC}
embedded mysql version : $MYSQL_VERSION
libextractor build: $extractor_support
available file mointor backends : $fs_monitor_backends
file monitor backend to be used : $primary_backend
"
......@@ -164,7 +164,7 @@ create table if not exists FilePending
Counter tinyint default 0,
FileUri varchar (255) not null,
MimeType varchar (64),
IsDir bool default 0,
IsDir tinyint default 0,
primary key (ID),
key (FileID),
......
SUBDIRS =text-filters trackerd libextractor libtracker tracker-extract
if USING_INTERNAL_LIBEXTRACTOR
extractor_dir = libextractor
endif
SUBDIRS =text-filters trackerd libtracker tracker-extract $(extractor_dir)
This diff is collapsed.
This diff is collapsed.
......@@ -7,7 +7,7 @@ INCLUDES = \
lib_LTLIBRARIES = libtracker.la
libtracker_la_LIBADD = $(GLIB2_LIBS) \
$(DBU
$(DBUS_LIBS)
libtracker_la_SOURCES = tracker.c
include_HEADERS = tracker.h tracker-client.h
......
......@@ -2,6 +2,7 @@ bin_PROGRAMS = htmless
htmless_SOURCES = \
htmless.c \
htmless.h \
chckfile.c \
gettag.c
bin_PROGRAMS = o3totxt
o3totxt_SOURCES = o3read.c o3totxt.c
o3totxt_SOURCES = o3read.c o3totxt.c o3read.h
......@@ -4,6 +4,12 @@ bin_PROGRAMS = tracker-extract
tracker_extract_SOURCES = tracker-extract.c
tracker_extract_LDADD = $(GLIB2_LIBS) $(top_builddir)/src/libextractor/src/main/libextractor.la
if USING_INTERNAL_LIBEXTRACTOR
extractor_ldadd = $(top_builddir)/src/libextractor/src/main/libextractor.la
else
extractor_ldadd = -lextractor
endif
tracker_extract_LDADD = $(GLIB2_LIBS) $(extractor_ldadd)
......@@ -14,12 +14,12 @@
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <stdlib.h>
#include <string.h>
#include <string.h>
#include <unistd.h>
#include <glib.h>
#include "../libextractor/src/include/extractor.h"
......
mysql_flags = -D_THREAD_SAFE -D_REENTRANT
mysql_libs = -L$(libdir) -lmysqld -lz -lm -lcrypt -lstdc++ -lpthread
additional_mysql_flags = -D_THREAD_SAFE -D_REENTRANT
INCLUDES = \
-DDATADIR=\""$(datadir)"\" \
$(GLIB2_CFLAGS) \
$(FAM_CFLAGS) \
$(DBUS_CFLAGS) \
$(mysql_flags) \
$(MYSQL_CFLAGS) \
$(additional_mysql_flags) \
-g -W -Wall
if HAVE_INOTIFY
inotify_sources = \
linux-inotify-syscalls.h \
tracker-inotify.c \
tracker-inotify.h
else
if HAVE_FAM
fam_sources = \
tracker-fam.c \
tracker-fam.h
endif
endif
bin_PROGRAMS = trackerd
trackerd_SOURCES = \
$(inotify_sources) \
$(fam_sources) \
trackerd.c \
tracker-db.c \
tracker-db.h \
......@@ -21,8 +37,6 @@ trackerd_SOURCES = \
tracker-dbus.h \
tracker-dbus-methods.c \
tracker-dbus-methods.h \
tracker-fam.c \
tracker-fam.h \
tracker-metadata.c \
tracker-metadata.h \
tracker-rdf-query.c \
......@@ -32,16 +46,23 @@ trackerd_SOURCES = \
xdgmime.c \
xdgmime.h \
xdgmimealias.c \
xdgmimealias.h \
xdgmimecache.c \
xdgmimecache.h \
xdgmimeglob.c \
xdgmimeglob.h \
xdgmimeint.c \
xdgmimeint.h \
xdgmimemagic.c \
xdgmimeparent.c
xdgmimemagic.h \
xdgmimeparent.c \
xdgmimeparent.h
trackerd_LDADD = $(GLIB2_LIBS) \
$(FAM_LIBS) \
$(DBUS_LIBS) \
$(mysql_libs)
$(MYSQL_LIBS) \
-lstdc++
EXTRA_DIST =
/*
* linux-inotify-syscalls.h - temporary shim for syscalls
* Copyright © 2005 Ryan Lortie <desrt@desrt.ca>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of version 2.1 of the GNU Lesser General
* Public as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110
*
* $Id$
*/
#ifndef _linux_inotify_syscalls_h_
#define _linux_inotify_syscalls_h_
#include <asm/types.h>
#include <sys/syscall.h>
#include <unistd.h>
#if defined(__i386__)
# define __NR_inotify_init 291
# define __NR_inotify_add_watch 292
# define __NR_inotify_rm_watch 293
#elif defined(__x86_64__)
# define __NR_inotify_init 253
# define __NR_inotify_add_watch 254
# define __NR_inotify_rm_watch 255
#elif defined(__alpha__)
# define __NR_inotify_init 444
# define __NR_inotify_add_watch 445
# define __NR_inotify_rm_watch 446
#elif defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__)
# define __NR_inotify_init 275
# define __NR_inotify_add_watch 276
# define __NR_inotify_rm_watch 277
#elif defined(__sparc__) || defined (__sparc64__)
# define __NR_inotify_init 151
# define __NR_inotify_add_watch 152
# define __NR_inotify_rm_watch 156
#elif defined (__ia64__)
# define __NR_inotify_init 1277
# define __NR_inotify_add_watch 1278
# define __NR_inotify_rm_watch 1279
#elif defined (__s390__) || defined (__s390x__)
# define __NR_inotify_init 284
# define __NR_inotify_add_watch 285
# define __NR_inotify_rm_watch 286
#elif defined (__arm__)
# define __NR_inotify_init 316
# define __NR_inotify_add_watch 317
# define __NR_inotify_rm_watch 318
#elif defined (__SH4__)
# define __NR_inotify_init 290
# define __NR_inotify_add_watch 291
# define __NR_inotify_rm_watch 292
#elif defined (__SH5__)
# define __NR_inotify_init 318
# define __NR_inotify_add_watch 319
# define __NR_inotify_rm_watch 320
#else
# error "Unsupported architecture"
#endif
static inline int
inotify_init (void)
{
return syscall( __NR_inotify_init );
}
static inline int
inotify_add_watch( int fd, const char *name, guint32 mask )
{
return syscall( __NR_inotify_add_watch, fd, name, mask );
}
static inline int
inotify_rm_watch( int fd, gint32 wd )
{
return syscall( __NR_inotify_rm_watch, fd, wd );
}
#endif /* _linux_inotify_syscalls_h_ */
......@@ -5,7 +5,7 @@
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <mysql/mysql.h>
#include "tracker-db.h"
......@@ -260,7 +260,7 @@ tracker_db_exec_stmt (MYSQL_STMT *stmt, int param_count, ...)
length[i] = strlen (params[i]);
/* Bind input buffers */
bind[i].buffer_type = MYSQL_TYPE_STRING;
bind[i].buffer_type = MYSQL_TYPE_VAR_STRING;
bind[i].buffer = (char *)params[i];
bind[i].buffer_length = 2048;