Silence some minor compiler warnings.

Signed-off-by: Peter Jones <pjones@redhat.com>
Ignore some files so "git status" is clearer.

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

Using libefivar divorces us from the kernel api, which is a very good
thing.  It also means we don't need to know about efi_status_t or efi
error types, or carry our own headers for describing variables.

This also makes device paths > 1024 bytes long work (on newer kernels)

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

Conflicts:
	src/efibootmgr/efibootmgr.c
	src/lib/efi.c
Fix error message that says "delete" on the "activate" case.

bcl found this reviewing it.

Signed-off-by: Peter Jones <pjones@redhat.com>
Don't do unnecessary math.

bcl found this one too - we know len % 5 is 4, because it's tested a few
lines up.

Signed-off-by: Peter Jones <pjones@redhat.com>
Make the error case from make_boot_var() cleaner.

bcl thinks it looks better at the end, and I agree.

Signed-off-by: Peter Jones <pjones@redhat.com>
Fix completely wrong compiler warning.

gcc's data flow analysis still kind of blows.

Signed-off-by: Peter Jones <pjones@redhat.com>
Fix minor compiler warning.

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

valgrind found a couple of errors, one of which fixes some odd behavior
with BootOrder I was seeing.

Signed-off-by: Peter Jones <pjones@redhat.com>
Make tilt_slashes() static.

Signed-off-by: Peter Jones <pjones@redhat.com>
Make --help also -h, and don't have it exit with an error status.

Signed-off-by: Peter Jones <pjones@redhat.com>
Clean up .gitignores some.

Signed-off-by: Peter Jones <pjones@redhat.com>
Remove some dead code.

If anybody's looking for it, it's in git.

Signed-off-by: Peter Jones <pjones@redhat.com>
Fix typo in arg parsing.

Signed-off-by: Peter Jones <pjones@redhat.com>
You really can't free something you put through realloc().

This should make '-u' work again.

Signed-off-by: Peter Jones <pjones@redhat.com>
More work on append_extra_args_unicode()

two problems:
1) strlen off-by-one
2) efichar_from_char() awesomely takes a length in bytes, returns in
   bytes, and operates on efi_char16_t sizes.  This can be somewhat
   confusing.

Signed-off-by: Peter Jones <pjones@redhat.com>
Fix byte assignment in read_boot_u16().

It helps if you put the bytes in the right order, and the parenthesis
around the right things to keep them from being all zero.

Signed-off-by: Peter Jones <pjones@redhat.com>
Do better error checking in read_boot_u16(), and simplify it.

Why am I even doing this stupid bitshifting?

Signed-off-by: Peter Jones <pjones@redhat.com>
Restore old boot order behavior.

Previously we prepended rather than appending new elements to the boot
order.

Signed-off-by: Peter Jones <pjones@redhat.com>
Audit strlen() in append_extra_args_ascii() as well.

Similar code, similar bugs.

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