projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49f9b08
)
setatt: Print meaningful error message.
author
Andre Noll
<maan@tuebingen.mpg.de>
Mon, 19 Jan 2015 19:39:21 +0000
(20:39 +0100)
committer
Andre Noll
<maan@tuebingen.mpg.de>
Wed, 22 Jul 2015 08:01:02 +0000
(10:01 +0200)
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.
aft.c
patch
|
blob
|
history
diff --git
a/aft.c
b/aft.c
index a9bc006e110570a9e3551609f619e2062b24df73..96f65e99fbf5b1bd2ae7eb863b864ce77e743c70 100644
(file)
--- 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