/*
- * Copyright (C) 2007-2009 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2007-2009 Andre Noll <maan@tuebingen.mpg.de>
*
* Licensed under the GPL v2. For licencing details see COPYING.
*/
return MIN_IDX_COLUMN_DESCRIPTION_SIZE + strlen(name) - 1;
}
+/*
+ * The version used by this instance of the library. Written to the index of
+ * newly created tables.
+ */
#define CURRENT_TABLE_VERSION 1
+
+/*
+ * The lowest library version that is able to use tables of version
+ * CURRENT_TABLE_VERSION. Also written to the index of new tables. If
+ * compat_version(table) > current_version(lib) the table can not be opened.
+ */
+#define COMPAT_TABLE_VERSION 0
+
+/*
+ * The lowest table version this library understands. On open, if
+ * current_version(table) < min_version(lib) the osl_open_table() call
+ * fails.
+ */
#define MIN_TABLE_VERSION 1
-#define MAX_TABLE_VERSION 1
+
+
/** An index header must be at least that many bytes long. */
#define MIN_INDEX_HEADER_SIZE(num_cols) (MIN_IDX_COLUMN_DESCRIPTION_SIZE \
* num_cols + IDX_COLUMN_DESCRIPTIONS)
* \sa FOR_EACH_COLUMN_OF_TYPE, FOR_EACH_MAPPED_COLUMN, FOR_EACH_RBTREE_COLUMN,
* FOR_EACH_DISK_STORAGE_COLUMN, FOR_EACH_VOLATILE_COLUMN, osl_storage_type.
*/
-_static_inline_ int next_column_of_type(enum osl_storage_type type, int col_num,
- const struct osl_table *t,
+_static_inline_ unsigned next_column_of_type(enum osl_storage_type type,
+ unsigned col_num, const struct osl_table *t,
const struct osl_column_description **cd)
{
*cd = NULL;