NUM_AFT_COLUMNS
};
+/**
+ * Compare two osl objects pointing to hash values.
+ *
+ * \param obj1 Pointer to the first hash object.
+ * \param obj2 Pointer to the second hash object.
+ *
+ * \return The values required for an osl compare function.
+ *
+ * \sa osl_compare_func, uint32_compare().
+ */
+int aft_hash_compare(const struct osl_object *obj1, const struct osl_object *obj2)
+{
+ return hash_compare((HASH_TYPE *)obj1->data, (HASH_TYPE *)obj2->data);
+}
+
static struct osl_column_description aft_cols[] = {
[AFTCOL_HASH] = {
.storage_type = OSL_MAPPED_STORAGE,
.storage_flags = OSL_RBTREE | OSL_FIXED_SIZE | OSL_UNIQUE,
.name = "hash",
- .compare_function = osl_hash_compare,
+ .compare_function = aft_hash_compare,
.data_size = HASH_SIZE
},
[AFTCOL_PATH] = {
PARA_INFO_LOG("request to add %s\n", path);
hs = find_hash_sister(hash);
ret = aft_get_row_of_path(path, &pb);
- if (ret < 0 && ret != -E_RB_KEY_NOT_FOUND)
+ if (ret < 0 && ret != -E_OSL_RB_KEY_NOT_FOUND)
goto out;
if (hs && pb && hs == pb && !(flags & ADD_FLAG_FORCE)) {
if (flags & ADD_FLAG_VERBOSE)
query.size = strlen(path) + 1;
ret = send_callback_request(path_brother_callback, &query,
get_row_pointer_from_result, &pb);
- if (ret < 0 && ret != -E_RB_KEY_NOT_FOUND)
+ if (ret < 0 && ret != -E_OSL_RB_KEY_NOT_FOUND)
goto out_free;
ret = 1;
if (pb && (pad->flags & ADD_FLAG_LAZY)) { /* lazy is really cheap */