return 1;
}
+/**
+ * Flags used by the lsatt command.
+ *
+ * \param \sa com_lsatt().
+ */
enum lsatt_flags {
/** Whether "-a" was given for the lsatt command. */
LSATT_FLAG_SORT_BY_ID = 1,
/** Whether "-l" was given for the lsatt command. */
LSATT_FLAG_LONG = 2,
+ /** Reverse sort order. */
LSATT_FLAG_REVERSE = 4
};
const char *name, void *data)
{
struct remove_attribute_action_data *raad = data;
- int ret = osl_del_row(table, row);
unsigned char bitnum;
+ int ret;
+ ret = get_attribute_bitnum_by_name(name, &bitnum);
if (ret < 0) {
para_printf(&raad->pb, "%s: %s\n", name, PARA_STRERROR(-ret));
return 1;
}
- ret = get_attribute_bitnum_by_name(name, &bitnum);
+ ret = osl_del_row(table, row);
if (ret < 0) {
para_printf(&raad->pb, "%s: %s\n", name, PARA_STRERROR(-ret));
return 1;
return ret;
}
attribute_table = NULL;
- if (ret == -E_NOENT)
+ if (ret >= 0 || is_errno(-ret, ENOENT))
return 1;
return ret;
}