]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - attribute.c
Get rid of the "table" member in struct table_info.
[paraslash.git] / attribute.c
index 66312b2acb06f5a5919c5a04198db2cae2f0b34a..798a6cc4889fe02c7789fe10b282891fa76bee1f 100644 (file)
@@ -320,7 +320,7 @@ static int com_addatt_callback(const struct osl_object *query,
        if (ret < 0)
                return ret;
        find_greatest_att_bitnum();
-       return mood_reload(); /* FIXME: mood_reload() returns an error */
+       return reload_current_mood(); /* FIXME: mood_reload() returns an error */
 }
 
 int com_addatt(__a_unused int fd, int argc, char * const * const argv)
@@ -355,14 +355,14 @@ static int com_rmatt_callback(const struct osl_object *query,
        find_greatest_att_bitnum();
        if (!atts_removed)
                return 1;
-       return mood_reload(); /* FIXME: Fix mood_reload() */
+       return reload_current_mood();
 }
 
 int com_rmatt(__a_unused int fd, int argc, char * const * const argv)
 {
        if (argc < 2)
                return -E_ATTR_SYNTAX;
-       return send_standard_callback_request(argc, argv, com_rmatt_callback,
+       return send_standard_callback_request(argc - 1, argv + 1, com_rmatt_callback,
                NULL);
 }
 
@@ -373,7 +373,7 @@ int com_rmatt(__a_unused int fd, int argc, char * const * const argv)
  * \param buf Result.
  *
  * This function prints a string of at most 64 characters plus the terminating
- * \p NULL character into \buf which must be provided by the caller and at
+ * \p NULL character into \buf which must be provided by the caller and at
  * least 65 bytes long. The "x" character is used for set attributes and "-" is
  * used for unset attributes.
  *
@@ -466,10 +466,9 @@ int attribute_init(struct table_info *ti, const char *db)
 
        attribute_table_desc.dir = db;
        ti->desc = &attribute_table_desc;
-       ret = osl_open_table(ti->desc, &ti->table);
+       ret = osl_open_table(ti->desc, attribute_table);
        greatest_att_bitnum = -1; /* no atts available */
        if (ret >= 0) {
-               attribute_table = ti->table;
                find_greatest_att_bitnum();
                return ret;
        }