Don't define our own ioctls unless we have to.

The way it was, BLKGETSIZE64 wound up being 0x80041272 instead of the
0x80081272 it should be on -m32 builds.  4 isn't the size of 64 bits, so
that results in integer overflow into who knows what space on the stack,
and when we compare it to our gpt header, it's also just plain wrong.

This is all madness, of course, the kernel has exported all of this
stuff since the ancient past.  Use that instead.

Signed-off-by: Peter Jones <pjones@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Tested-by: Michael Tokarev <mjt@tls.msk.ru>
Make a few more return paths print some modicum of error message.

Signed-off-by: Peter Jones <pjones@redhat.com>
Fix a segfault in append_extra_args_ascii()

How that worked at all before was beyond me.

Signed-off-by: Peter Jones <pjones@redhat.com>
One more place we're not printing the error code.

Signed-off-by: Peter Jones <pjones@redhat.com>
Add more error messages and better return codes.

Signed-off-by: Peter Jones <pjones@redhat.com>
manpage lists option '--test' which doesn't seem to exist

I'm passing along this bug report from Debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759714

Here's a quick fix:
Don't call EPERM "not found" when deleting variables.

Signed-off-by: Peter Jones <pjones@redhat.com>
Produce a slightly more succinct error when we get -EPERM on the disk.

Because one error message is enough.

Signed-off-by: Peter Jones <pjones@redhat.com>
Don't error on unset BootOrder when we're trying to add to or rm from it.

Signed-off-by: Peter Jones <pjones@redhat.com>