X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=attribute.c;h=f3f8ea7a45d0fb1136827cc19c8a715fdd3773a6;hp=688d78f1f04032d4d3fd7a74e2b9062d9c7b749c;hb=f60abbe18364a4368fd756f48c79af67d377fca7;hpb=b4418a6993c2c146c6da048d027254c8dd56799e diff --git a/attribute.c b/attribute.c index 688d78f1..f3f8ea7a 100644 --- a/attribute.c +++ b/attribute.c @@ -149,7 +149,7 @@ static int com_lsatt_callback(struct afs_callback_arg *aca) int ret; struct pattern_match_data pmd = { .table = attribute_table, - .loop_col_num = ATTCOL_BITNUM, + .loop_col_num = ATTCOL_NAME, .match_col_num = ATTCOL_NAME, .patterns = {.data = (char *)aca->query.data + sizeof(flags), .size = aca->query.size - sizeof(flags)}, @@ -158,7 +158,7 @@ static int com_lsatt_callback(struct afs_callback_arg *aca) .action = print_attribute }; if (flags & LSATT_FLAG_SORT_BY_ID) - pmd.loop_col_num = ATTCOL_NAME; + pmd.loop_col_num = ATTCOL_BITNUM; if (flags & LSATT_FLAG_REVERSE) pmd.pm_flags |= PM_REVERSE_LOOP; ret = for_each_matching_row(&pmd); @@ -266,7 +266,7 @@ static int com_addatt_callback(struct afs_callback_arg *aca) out: if (ret < 0) para_printf(&aca->pbout, "%s: %s\n", p, para_strerror(-ret)); - return 0; + return ret; } int com_addatt(struct command_context *cc) @@ -508,7 +508,7 @@ static int attribute_open(const char *dir) return ret; } attribute_table = NULL; - if (ret >= 0 || ret == -OSL_ERRNO_TO_PARA_ERROR(E_OSL_NOENT)) + if (ret == -OSL_ERRNO_TO_PARA_ERROR(E_OSL_NOENT)) return 1; return ret; }