Remove some system errors from errno.h
[paraslash.git] / attribute.c
index 671ca056d4c0f65d501443a96e45a40fa780cd69..e0a7392fdc99d86f6225c5ac43e1ab690e0bce50 100644 (file)
@@ -99,11 +99,17 @@ int get_attribute_bitnum_by_name(const char *att_name, unsigned char *bitnum)
        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
 };
 
@@ -532,7 +538,7 @@ int attribute_init(struct table_info *ti, const char *db)
                return ret;
        }
        attribute_table = NULL;
-       if (ret == -E_NOENT)
+       if (ret >= 0 || is_errno(-ret, ENOENT))
                return 1;
        return ret;
 }