aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/od.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-02-05 20:48:43 -0800
committerRob Landley <rob@landley.net>2020-02-06 11:36:51 -0600
commit01bf7f6e61d13c57aa6159262af43792793afcae (patch)
treea3ea4d4bf7c12002c19fb40776c0499d85f971c8 /toys/posix/od.c
parentb07b8878da56c633d90eb6f9d5f9737e0bfe62df (diff)
downloadtoybox-01bf7f6e61d13c57aa6159262af43792793afcae.tar.gz
chattr: improve error messages.
When chattr fails in production, it helps to see what it was trying to do. Reuse the lsattr format but without the '-'s. Only read the flags if we have any intention of changing them: `chattr -p 123` has no reason to read the flags. Only write the flags back if they actually change: `chattr +a` shouldn't do anything if that flag is already set, for example. Switch -p and -v to perror_msg() instead of perror_exit() in case they're used with -R. (I suspect that the uses of DIRTREE_ABORT are mistakes given -R, but I'll leave them until I actually hit this.)
Diffstat (limited to 'toys/posix/od.c')
0 files changed, 0 insertions, 0 deletions