OSDN Git Service

Make vars_del_variable() set errno when the variable size is bad.
authorPeter Jones <pjones@redhat.com>
Thu, 25 Jun 2015 13:33:43 +0000 (09:33 -0400)
committerPeter Jones <pjones@redhat.com>
Thu, 25 Jun 2015 13:44:10 +0000 (09:44 -0400)
commit407a27c4fa14f1637e5af877cccb277874c9f435
tree7c2882d2c347bdbafdc47197be58b888d9d90a63
parenteaaedefb82e88077f35f230994b9325e09550c8e
Make vars_del_variable() set errno when the variable size is bad.

Commit eaaedefb correctly changes this code path so that it tests the
file size correctly, but errno is still untouched, so from the
consumer's point of view, if the real error *does* occur, you'll get
something like:

Could not delete variable: Success

which is obviously nonsense.  Instead, errno should be something about
the size.  So I picked EFBIG.

Signed-off-by: Peter Jones <pjones@redhat.com>
src/vars.c