X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=attribute.c;h=d74ec92839c2c3753ebadf1caf2a06d2f109645e;hp=867e24b9ee705561a18ee5460a2a4f92438c56a2;hb=72f619fd387991489fe47af8f00f21172e1f9939;hpb=79d6515d49cdb0a91ff7c4a599f2d63cb5678032 diff --git a/attribute.c b/attribute.c index 867e24b9..d74ec928 100644 --- a/attribute.c +++ b/attribute.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1997-2013 Andre Noll + * Copyright (C) 1997 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -162,7 +162,7 @@ static void com_lsatt_callback(int fd, const struct osl_object *query) }; 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 *)query->data + sizeof(laad.flags), .size = query->size - sizeof(laad.flags)}, @@ -171,7 +171,7 @@ static void com_lsatt_callback(int fd, const struct osl_object *query) .action = print_attribute }; if (laad.flags & LSATT_FLAG_SORT_BY_ID) - pmd.loop_col_num = ATTCOL_NAME; + pmd.loop_col_num = ATTCOL_BITNUM; if (laad.flags & LSATT_FLAG_REVERSE) pmd.pm_flags |= PM_REVERSE_LOOP; for_each_matching_row(&pmd); @@ -355,7 +355,7 @@ int com_mvatt(struct command_context *cc) struct remove_attribute_action_data { /** Message buffer. */ struct para_buffer pb; - /** Numver of attributes removed. */ + /** Number of attributes removed. */ int num_removed; /** Bitwise "or" of the removed attributes. */ uint64_t mask_of_removed_atts; @@ -438,7 +438,7 @@ int com_rmatt(struct command_context *cc) * used for unset attributes. * * In practice, not all 64 attributes are defined. In this case, the function - * only prints \a N + 1 charaters where \a N is the greatest id of a defined + * only prints \a N + 1 characters where \a N is the greatest id of a defined * attribute. */ void get_attribute_bitmap(const uint64_t *atts, char *buf) @@ -531,7 +531,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; }