UBI: introduce UBI_ALL constant
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Sun, 20 May 2012 18:14:22 +0000 (21:14 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Thu, 21 Jun 2012 11:46:23 +0000 (14:46 +0300)
Joel will use it in his 'ubi_flush()' extention to specify all eraseblocks.
Also amend the comment for UBI_UNKNOWN - it is used beyond attaching info
structure now.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/ubi/ubi.h
include/linux/mtd/ubi.h

index 5e1182c..38cfb0f 100644 (file)
 /* Background thread name pattern */
 #define UBI_BGT_NAME_PATTERN "ubi_bgt%dd"
 
-/* This marker in the EBA table means that the LEB is um-mapped */
+/*
+ * This marker in the EBA table means that the LEB is um-mapped.
+ * NOTE! It has to have the same value as %UBI_ALL.
+ */
 #define UBI_LEB_UNMAPPED -1
 
 /*
  */
 #define UBI_PROT_QUEUE_LEN 10
 
-/*
- * When a field of the attaching information has this value - its real value is
- * unknown.
- */
+/* The volume ID/LEB number/erase counter is unknown */
 #define UBI_UNKNOWN -1
 
 /*
index 9838dce..f636f5d 100644 (file)
@@ -25,6 +25,9 @@
 #include <linux/types.h>
 #include <mtd/ubi-user.h>
 
+/* All voumes/LEBs */
+#define UBI_ALL -1
+
 /*
  * enum ubi_open_mode - UBI volume open mode constants.
  *