[lockdev-devel] [PATCH 1/4] don't hardcode path to lockdev helper
Ludwig Nussel
ludwig.nussel at suse.de
Tue Mar 2 09:22:22 UTC 2010
---
src/Makefile.am | 2 +-
src/lockdev.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index 3b4adda..27d1d13 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,7 +3,7 @@ noinst_PROGRAMS = baudboy
include_HEADERS = lockdev.h baudboy.h ttylock.h
-AM_CPPFLAGS = -include $(top_builddir)/config.h
+AM_CPPFLAGS = -include $(top_builddir)/config.h -DSBINDIR=\"$(sbindir)\"
lockdev_SOURCES = sample.c
lockdev_LDADD = liblockdev.la
diff --git a/src/lockdev.c b/src/lockdev.c
index f36cfb0..67f429d 100644
--- a/src/lockdev.c
+++ b/src/lockdev.c
@@ -130,6 +130,8 @@
#define _LIBLOCKDEV_NO_BAUDBOY_DEFINES
#include "baudboy.h"
+#define LOCKDEV_PATH SBINDIR "/lockdev"
+
/*
* PROTOTYPES for internal functions
* all internal functions names start with _dl_
@@ -933,8 +935,6 @@ ttywait (const char *devname)
return rc;
}
-#define LOCKDEV_PATH "/usr/sbin/lockdev"
-
static int _spawn_helper(const char * argv[])
{
pid_t child;
--
1.6.4.2
More information about the lockdev-devel
mailing list