From 4fef104bf11fb7b56521c093951b5dc91bac441e Mon Sep 17 00:00:00 2001
From: Zdenek Kabelac <zkabelac@redhat.com>
Date: Mon, 10 Jan 2011 13:42:31 +0000
Subject: [PATCH] Define DM_COOKIE_AUTO_CREATE

TODO: Use it also for already written code.
---
 WHATS_NEW_DM         | 1 +
 libdm/libdevmapper.h | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 20fe90850..4afb8a6cf 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,6 @@
 Version 1.02.61 - 
 ====================================
+  Add DM_COOKIE_AUTO_CREATE to libdevmapper.h.
   Export DM_CONTROL_NODE_UMASK and use it while creating /dev/mapper/control.
 
 Version 1.02.60 - 20th December 2010
diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h
index 994a364f4..eea1a6cf5 100644
--- a/libdm/libdevmapper.h
+++ b/libdm/libdevmapper.h
@@ -1214,6 +1214,11 @@ void dm_udev_set_sync_support(int sync_with_udev);
 int dm_udev_get_sync_support(void);
 void dm_udev_set_checking(int checking);
 int dm_udev_get_checking(void);
+
+/*
+ * Default value to get new auto generated cookie created
+ */
+#define DM_COOKIE_AUTO_CREATE 0
 int dm_udev_create_cookie(uint32_t *cookie);
 int dm_udev_complete(uint32_t cookie);
 int dm_udev_wait(uint32_t cookie);