X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=attribute.c;h=af3dfb063be01ea0a8ec8c63cde0457d0dd5a600;hb=77960b7b4c6e5b03c5ef2fe897c5e00395b9ae15;hp=86fc36d7615f2f7f702126015eb8176540fcce37;hpb=8211954fc3390c0fa19cca788b03336a37aa9dc0;p=paraslash.git diff --git a/attribute.c b/attribute.c index 86fc36d7..af3dfb06 100644 --- a/attribute.c +++ b/attribute.c @@ -37,8 +37,7 @@ static struct osl_column_description att_cols[] = { } }; -static const struct osl_table_description attribute_table_desc = { - .dir = DATABASE_DIR, +static struct osl_table_description attribute_table_desc = { .name = "attributes", .num_columns = NUM_ATT_COLUMNS, .flags = 0, @@ -107,7 +106,7 @@ static int log_attribute(struct osl_row *row, void *private_data) } /* FIXME: Need callback */ -int com_lsatt(int fd, int argc, const char **argv) +int com_lsatt(int fd, int argc, char * const * const argv) { struct private_laa_data pld = {.fd = fd, .flags = 0}; int i; @@ -174,7 +173,8 @@ static int com_setatt_callback(const struct osl_object *query, } if (!add_mask && !del_mask) return -E_ATTR_SYNTAX; - PARA_DEBUG_LOG("masks: %llx:%llx\n", add_mask, del_mask); + PARA_DEBUG_LOG("masks: %llx:%llx\n",(long long unsigned)add_mask, + (long long unsigned)del_mask); for (; p < (char *)query->data + query->size; p += len + 1) { /* TODO: fnmatch */ struct afs_info old_afsi, new_afsi; struct osl_row *aft_row; @@ -200,7 +200,7 @@ static int com_setatt_callback(const struct osl_object *query, return 1; } -int com_setatt(__a_unused int fd, int argc, const char **argv) +int com_setatt(__a_unused int fd, int argc, char * const * const argv) { if (argc < 2) return -E_ATTR_SYNTAX; @@ -276,7 +276,7 @@ static int com_addatt_callback(const struct osl_object *query, return mood_reload(); } -int com_addatt(__a_unused int fd, int argc, const char **argv) +int com_addatt(__a_unused int fd, int argc, char * const * const argv) { if (argc < 2) return -E_ATTR_SYNTAX; @@ -311,7 +311,7 @@ static int com_rmatt_callback(const struct osl_object *query, return mood_reload(); } -int com_rmatt(__a_unused int fd, int argc, const char **argv) +int com_rmatt(__a_unused int fd, int argc, char * const * const argv) { if (argc < 2) return -E_ATTR_SYNTAX; @@ -379,10 +379,11 @@ void attribute_shutdown(enum osl_close_flags flags) osl_close_table(attribute_table, flags); } -int attribute_init(struct table_info *ti) +int attribute_init(struct table_info *ti, const char *db) { int ret; + attribute_table_desc.dir = db; ti->desc = &attribute_table_desc; ret = osl_open_table(ti->desc, &ti->table); greatest_att_bitnum = -1; /* no atts available */