Rename internal locking helpers (avoids conflict when statically linking.)
authorMilan Broz <gmazyland@gmail.com>
Fri, 23 Oct 2009 10:42:56 +0000 (10:42 +0000)
committerMilan Broz <gmazyland@gmail.com>
Fri, 23 Oct 2009 10:42:56 +0000 (10:42 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@132 36d66b0a-2a48-0410-832c-cd162a569da5

lib/internal.h
lib/setup.c
lib/utils.c

index da3c9f7..a49e4d1 100644 (file)
@@ -116,7 +116,7 @@ void logger(struct crypt_device *cd, int class, const char *file, int line, cons
        logger(c, CRYPT_LOG_ERROR, __FILE__, __LINE__, x); \
        set_error(x); } while(0)
 
-int memlock_inc(struct crypt_device *ctx);
-int memlock_dec(struct crypt_device *ctx);
+int crypt_memlock_inc(struct crypt_device *ctx);
+int crypt_memlock_dec(struct crypt_device *ctx);
 
 #endif /* INTERNAL_H */
index 47a60e0..246795b 100644 (file)
@@ -1893,7 +1893,7 @@ void crypt_set_password_verify(struct crypt_device *cd, int password_verify)
 
 int crypt_memory_lock(struct crypt_device *cd, int lock)
 {
-       return lock ? memlock_inc(cd) : memlock_dec(cd);
+       return lock ? crypt_memlock_inc(cd) : crypt_memlock_dec(cd);
 }
 
 // reporting
index d23619e..034595c 100644 (file)
@@ -642,7 +642,7 @@ static int _priority;
 static int _memlock_count = 0;
 
 // return 1 if memory is locked
-int memlock_inc(struct crypt_device *ctx)
+int crypt_memlock_inc(struct crypt_device *ctx)
 {
        if (!_memlock_count++) {
                log_dbg("Locking memory.");
@@ -662,7 +662,7 @@ int memlock_inc(struct crypt_device *ctx)
        return _memlock_count ? 1 : 0;
 }
 
-int memlock_dec(struct crypt_device *ctx)
+int crypt_memlock_dec(struct crypt_device *ctx)
 {
        if (_memlock_count && (!--_memlock_count)) {
                log_dbg("Unlocking memory.");