From: Andre Noll Date: Mon, 19 Jan 2015 19:39:21 +0000 (+0100) Subject: setatt: Print meaningful error message. X-Git-Tag: v0.5.5~27 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=385aab3b349e2d60d2ce863abda57e3a3f2c3afd;ds=sidebyside setatt: Print meaningful error message. An attempt to set or unset a non-existing attribute currently results in key not found in rbtree which is a bit cryptic. This commit adds another message that clarifies what went wrong. --- diff --git a/aft.c b/aft.c index a9bc006e..96f65e99 100644 --- a/aft.c +++ b/aft.c @@ -2548,8 +2548,10 @@ static void com_setatt_callback(int fd, const struct osl_object *query) break; p[len - 1] = '\0'; ret = get_attribute_bitnum_by_name(p, &bitnum); - if (ret < 0) + if (ret < 0) { + para_printf(&cad.pb, "attribute not found: %s\n", p); goto out; + } if (c == '+') cad.add_mask |= (1UL << bitnum); else