X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcryptsetup.h;h=ea5700d72f51c875568ed5381073495237cdd883;hb=0b3fd9f5cb35951953ebcff15cc0af7c50858ca9;hp=1afcf433cf40816b78dfffa1cba1d261f59e7291;hpb=6cd353b6260d3be1b8093534d74ce74f82f0040a;p=platform%2Fupstream%2Fcryptsetup.git diff --git a/src/cryptsetup.h b/src/cryptsetup.h index 1afcf43..ea5700d 100644 --- a/src/cryptsetup.h +++ b/src/cryptsetup.h @@ -3,8 +3,8 @@ * * Copyright (C) 2004 Jana Saout * Copyright (C) 2004-2007 Clemens Fruhwirth - * Copyright (C) 2009-2020 Red Hat, Inc. All rights reserved. - * Copyright (C) 2009-2020 Milan Broz + * Copyright (C) 2009-2021 Red Hat, Inc. All rights reserved. + * Copyright (C) 2009-2021 Milan Broz * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -24,6 +24,7 @@ #ifndef CRYPTSETUP_H #define CRYPTSETUP_H +#include #include #include #include @@ -97,7 +98,6 @@ int tools_get_key(const char *prompt, void tools_passphrase_msg(int r); int tools_is_stdin(const char *key_file); int tools_string_to_size(struct crypt_device *cd, const char *s, uint64_t *size); -int tools_is_cipher_null(const char *cipher); void tools_clear_line(void); @@ -116,6 +116,11 @@ int tools_wipe_all_signatures(const char *path); int tools_lookup_crypt_device(struct crypt_device *cd, const char *type, const char *data_device_path, char *name, size_t name_length); +/* each utility is required to implement it */ +void tools_cleanup(void); + +#define FREE_AND_NULL(x) do { free(x); x = NULL; } while (0) + /* Log */ #define log_dbg(x...) clogger(NULL, CRYPT_LOG_DEBUG, __FILE__, __LINE__, x) #define log_std(x...) clogger(NULL, CRYPT_LOG_NORMAL, __FILE__, __LINE__, x)