Imported Upstream version 1.6.7
[platform/upstream/cryptsetup.git] / lib / utils_dm.h
index 8af91e8..cd8b653 100644 (file)
@@ -1,14 +1,15 @@
 /*
  * libdevmapper - device-mapper backend for cryptsetup
  *
- * Copyright (C) 2004, Christophe Saout <christophe@saout.de>
+ * Copyright (C) 2004, Jana Saout <jana@saout.de>
  * Copyright (C) 2004-2007, Clemens Fruhwirth <clemens@endorphin.org>
- * Copyright (C) 2009-2012, Red Hat, Inc. All rights reserved.
- * Copyright (C) 2009-2012, Milan Broz
+ * Copyright (C) 2009-2015, Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2009-2015, Milan Broz
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -38,6 +39,10 @@ struct device;
 #define DM_PLAIN64_SUPPORTED  (1 << 3) /* plain64 IV */
 #define DM_DISCARDS_SUPPORTED (1 << 4) /* discards/TRIM option is supported */
 #define DM_VERITY_SUPPORTED   (1 << 5) /* dm-verity target supported */
+#define DM_TCW_SUPPORTED      (1 << 6) /* tcw (TCRYPT CBC with whitening) */
+#define DM_SAME_CPU_CRYPT_SUPPORTED (1 << 7) /* same_cpu_crypt */
+#define DM_SUBMIT_FROM_CRYPT_CPUS_SUPPORTED (1 << 8) /* submit_from_crypt_cpus */
+
 uint32_t dm_flags(void);
 
 #define DM_ACTIVE_DEVICE       (1 << 0)
@@ -99,4 +104,9 @@ int dm_resume_and_reinstate_key(struct crypt_device *cd, const char *name,
 
 const char *dm_get_dir(void);
 
+/* These are DM helpers used only by utils_devpath file */
+int dm_is_dm_device(int major, int minor);
+int dm_is_dm_kernel_name(const char *name);
+char *dm_device_path(const char *prefix, int major, int minor);
+
 #endif /* _UTILS_DM_H */