OSDN Git Service
Chih-Wei Huang [Thu, 10 Jan 2019 08:55:07 +0000 (16:55 +0800)]
Android: inital porting of efibootmgr
The libefivar porting is also required.
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
Peter Jones [Wed, 13 Jun 2018 13:41:01 +0000 (09:41 -0400)]
remove extra decl
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Sun, 10 Jun 2018 20:12:10 +0000 (16:12 -0400)]
Bump version to 17
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 8 Jun 2018 20:05:55 +0000 (16:05 -0400)]
Add a bit more logging
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 8 Jun 2018 20:05:37 +0000 (16:05 -0400)]
Propogate verbosity to libefivar 36's internal logging facility
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 8 Jun 2018 20:05:04 +0000 (16:05 -0400)]
Fix an invalid free()
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 8 Jun 2018 20:04:18 +0000 (16:04 -0400)]
efibootmgr -e: improve parsing for efivar-36 compat
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 8 Jun 2018 19:45:34 +0000 (15:45 -0400)]
Make it easier to build with a devel branch of efivar
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 18 Apr 2018 21:36:36 +0000 (17:36 -0400)]
Don't set LIBEFIBOOT_REPORT_GPT_ERRORS=1
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 18 Apr 2018 21:35:49 +0000 (17:35 -0400)]
Change the default partition choice.
This requires efivar >= 36 to actually make sense, unfortunately.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 18 Apr 2018 21:35:05 +0000 (17:35 -0400)]
make_linux_load_option(): add some more efi_error() calls
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 18 Apr 2018 21:34:13 +0000 (17:34 -0400)]
Make.defaults: fix pkg-config invocation for LDFLAGS
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 17 Apr 2018 18:19:06 +0000 (14:19 -0400)]
Work around coverity being a pretty lazy and poor tool.
I mean, come on, at least dynamically import the types you've missed
from the version of GCC that's installed on the system and you're
pretending to emulate.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 11 Apr 2018 20:37:20 +0000 (16:37 -0400)]
Update travis to use some better build scripts
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 11 Apr 2018 16:23:30 +0000 (12:23 -0400)]
travis: Move to common efi-ci-rawhide docker image
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 9 Apr 2018 20:38:51 +0000 (16:38 -0400)]
Bump version to 16
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 9 Apr 2018 20:35:47 +0000 (16:35 -0400)]
Add bumpver in 'make archive'
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 9 Apr 2018 20:29:30 +0000 (16:29 -0400)]
travis: build efivar first...
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 9 Apr 2018 20:26:06 +0000 (16:26 -0400)]
travis: Use the right docker image.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 9 Apr 2018 20:19:29 +0000 (16:19 -0400)]
Update travis/docker stuff.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 9 Apr 2018 20:13:58 +0000 (16:13 -0400)]
Work around some minor clang analyzer complaints.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 9 Apr 2018 20:05:58 +0000 (16:05 -0400)]
Fix uninitialized values for mirror status.
In the case where there's a request for mirroring but it isn't enacted
yet, we'll have above4g and below4g uninitialized, and the comparison to
rabove4g and rbelow4g will be meaningless. So make them 0.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 9 Apr 2018 20:02:03 +0000 (16:02 -0400)]
Fix minor scan-build complaints
clang analyzer doesn't like when we set variables and don't use the
value, because it doesn't understand software maintenance as an ongoing
process.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 9 Apr 2018 19:57:03 +0000 (15:57 -0400)]
Better scan makefiles
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 15 Aug 2017 14:30:42 +0000 (10:30 -0400)]
efibootmgr: fix error check on add_to_boot_order()
Previously the error was checked whether or not we actually /call/
add_to_boot_order(), so sometimes we'll get a failure even though
nothing was even done.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 9 May 2017 16:07:18 +0000 (12:07 -0400)]
Add coverity make rules
Signed-off-by: Peter Jones <pjones@redhat.com>
Robert Bisewski [Tue, 26 Dec 2017 23:35:41 +0000 (17:35 -0600)]
Update docs for old URLs and general formatting.
Frank [Wed, 12 Jul 2017 05:42:04 +0000 (07:42 +0200)]
Fix GitHub URL
Peter Jones [Tue, 9 May 2017 20:46:13 +0000 (16:46 -0400)]
make_linux_load_option(): check data_size correctly.
Coverity noticed that we're not checking data_size for NULLness before
dereferencing it to pass the value to efi_loadopt_create(). So now we
pass a temporary variable and assign it only if it's non-NULL.
Signed-off-by: Peter Jones <pjones@redhat.com>
Josh de Kock [Sun, 12 Mar 2017 11:50:37 +0000 (11:50 +0000)]
unparse_path: remove unneeded include
This fixes an invalid redefinition of wchar_t when compiling with hardened gcc-musl on gentoo.
Peter Jones [Tue, 14 Feb 2017 16:51:54 +0000 (11:51 -0500)]
Bump version to 15
Peter Jones [Mon, 6 Mar 2017 21:24:10 +0000 (16:24 -0500)]
Make conditional default loader path use EFIDIR like fwupdate does.
Signed-off-by: Peter Jones <pjones@redhat.com>
Raymund Will [Fri, 10 Feb 2017 15:35:17 +0000 (16:35 +0100)]
Make default '--loader' build-time configurable.
Each distribution uses a specific 'vendor'-directory in the
'efi' directory on the EFI System Partition to store their
EFI loader. There's little use in hardcoding the value
for just one in 'efibootmgr', which is displayed in '--help'
and used as default without '--loader'.
Simply use
make OS_VENDOR=<vendor> EFI_LOADER=<loader>.efi
to get the desired value. :)
Signed-off-by: Raymund Will <rw@suse.com>
Raymund Will [Mon, 13 Feb 2017 14:33:52 +0000 (15:33 +0100)]
efibootmgr: sanitize `set/get_mirror()`
get_mirror()
- don't short-circuit the assignment of values in case of version mismatch
as `show_mirror()` happily tries to use them nevertheless
- move redundant warning (from `show_mirror()`s PoV) to `set_mirror()`
- add missing `free(data)`
set_mirror()
- skip obsolete second assignment of `data`
- avoid potentially "uninitialized" access to `above/below4g` by protecting
it with `opts.set_mirror_hi/_lo` respectively, thus simplifying the code
down the line
Note: this will prevent unnecessary write-operations!
Signed-off-by: Raymund Will <rw@suse.com>
Martin T. H. Sandsmark [Fri, 30 Dec 2016 13:33:27 +0000 (14:33 +0100)]
Add support for parsing optional data as ucs2
Peter Jones [Mon, 6 Feb 2017 21:34:54 +0000 (16:34 -0500)]
Remove extra const keywords gcc 7 gripes about.
Signed-off-by: Peter Jones <pjones@redhat.com>
steve-mcintyre [Fri, 6 Jan 2017 18:18:47 +0000 (18:18 +0000)]
Don't use -fshort-wchar when building (#63)
It's not needed and is causing build failures with gcc 6. Closes
Debian bug #849651
Signed-off-by: Steve McIntyre <steve@einval.com>
Peter Jones [Tue, 27 Sep 2016 18:43:19 +0000 (14:43 -0400)]
Bump version to 14
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 27 Sep 2016 19:02:13 +0000 (15:02 -0400)]
efibootdump: Get rid of extra debug print
Signed-off-by: Peter Jones <pjones@redhat.com>
Mike Gilbert [Tue, 23 Aug 2016 14:11:12 +0000 (10:11 -0400)]
Move -flto from cflags to CFLAGS
LTO is an optimization that isn't always desired. This change allows it
to be disabled easily.
Peter Jones [Mon, 22 Aug 2016 15:03:08 +0000 (11:03 -0400)]
Don't bother with --default-symver since we've got no library code here.
ld.gold breaks with it, for basically no reason, but we're not really
using it anyway.
Resolves github issue #56.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 22 Aug 2016 14:59:58 +0000 (10:59 -0400)]
Make compiler detection slightly better.
Resolves github issue #57.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 22 Aug 2016 14:49:39 +0000 (10:49 -0400)]
Fix EFIBOOTMGR_VERSION setting and -V output
Signed-off-by: Peter Jones <pjones@redhat.com>
Chris Mayo [Fri, 19 Aug 2016 07:02:47 +0000 (08:02 +0100)]
efibootmgr: fixes in man page synopsis and README
- more --delete-bootnum description fixes
- make -r | -y bold
- delete -H and -U (removed in
83f34d39299)
Chris Mayo [Thu, 18 Aug 2016 18:56:19 +0000 (19:56 +0100)]
Install efibootdump with make
Jonathan [Thu, 18 Aug 2016 08:40:50 +0000 (10:40 +0200)]
Create README.md
Peter Jones [Thu, 11 Aug 2016 15:48:06 +0000 (11:48 -0400)]
Fix a typo in popt options.
Signed-off-by: Peter Jones <pjones@redhat.com>
Chris Mayo [Mon, 15 Aug 2016 18:41:16 +0000 (19:41 +0100)]
efibootmgr: remove "(hex)" from description of --delete-bootnum
Boot entry selected with --bootnum
Peter Jones [Wed, 10 Aug 2016 21:58:07 +0000 (17:58 -0400)]
efibootmgr 13
- Add support for --sysprep and --driver to support UEFI System Prep
Applications and UEFI Drivers.
- use efivar's error reporting facility, and show error traces when
"-v -v" is used.
- Still yet better error codes returned on failures.
- Add -m and -M to support Memory Address Range Mirroring.
- Add efibootdump, to examine Boot* variables found in tarballs in bug
reports and similar.
- miscellaneous bugfixes.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 11 Aug 2016 15:48:06 +0000 (11:48 -0400)]
efibootdump: give it the error.h treatment
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 2 May 2016 14:49:49 +0000 (10:49 -0400)]
Add support for --sysprep and --driver
Maybe this fixes issue rhinstaller/efibootmgr#40 .
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 10 Aug 2016 21:57:56 +0000 (17:57 -0400)]
.spec: fix requirements for newer efivar and man page path.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 10 Aug 2016 21:54:49 +0000 (17:54 -0400)]
efibootmgr: use efivar's error facility.
Peter Jones [Tue, 19 Jul 2016 15:54:17 +0000 (11:54 -0400)]
Stop preceeding our version number with a "0.".
It's useless and it just makes people whine about it not being >1.0.
Signed-off-by: Peter Jones <pjones@redhat.com>
Mike Gilbert [Mon, 30 May 2016 16:06:52 +0000 (12:06 -0400)]
README: update github link
Peter Jones [Tue, 24 May 2016 15:56:33 +0000 (11:56 -0400)]
README: fix netboot command line since we have acpi bits now.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 24 May 2016 15:33:20 +0000 (11:33 -0400)]
efibootmgr: fix usage of efi_loadopt_path() /again/.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 2 May 2016 17:12:58 +0000 (13:12 -0400)]
efibootmgr: fix up a lot of error result codes.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 2 May 2016 15:38:07 +0000 (11:38 -0400)]
Handle "-@ -" correctly again.
This should fix issue #39.
Signed-off-by: Peter Jones <pjones@redhat.com>
Taku Izumi [Fri, 11 Mar 2016 02:45:27 +0000 (11:45 +0900)]
Add lacking description of man for -m and -M option
Currently there's no description of efibootmgr man page
for -m and -M option.
This patch adds the lacking description for -m and -M
option.
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Taku Izumi [Thu, 10 Mar 2016 01:45:57 +0000 (10:45 +0900)]
Add lacking description of man for -m and -M option
Currently there's no description of efibootmgr man page
for -m and -M option.
This patch adds the lacking description for -m and -M
option.
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Peter Jones [Thu, 3 Mar 2016 14:50:03 +0000 (09:50 -0500)]
Explicitly pass a mode to efi_set_variable() in all cases.
We'll have to do this for efivar-0.24 .
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 25 Feb 2016 19:29:37 +0000 (14:29 -0500)]
efibootmgr.spec: allow building on arm
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 25 Feb 2016 19:29:16 +0000 (14:29 -0500)]
efibootmgr.spec: require popt-devel
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 25 Feb 2016 19:16:38 +0000 (14:16 -0500)]
efibootmgr: fix some types the compiler doesn't like.
Basically uint8_t * vs char *.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 25 Feb 2016 15:54:23 +0000 (10:54 -0500)]
efibootdump: add efibootdump
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 25 Feb 2016 15:53:22 +0000 (10:53 -0500)]
efibootnext: add make targets (but not default)
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 25 Feb 2016 15:52:40 +0000 (10:52 -0500)]
efoconman: remove from default make targets for now
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 25 Feb 2016 15:43:40 +0000 (10:43 -0500)]
efibootmgr: update for efivar 0.24
As of 0.24 efi_loadopt_pathlen() and efi_loadopt_path() require a limit
argument to avoid overruns of the input data.
This patch adds reasonable limits to those calls.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 18 Feb 2016 16:10:08 +0000 (11:10 -0500)]
Add -Wextra, because it finds a lot of bugs in GCC6
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 18 Feb 2016 16:05:21 +0000 (11:05 -0500)]
eficonman: intialize poptOptions with named initializers.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 19 Nov 2015 19:48:19 +0000 (14:48 -0500)]
Add efibootnext beginnings
efibootnext will (eventually) attempt to find any suitable boot device
and set it as BootNext. To be used when other variable writes have
failed, in case it will use less space.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 12 Nov 2015 15:56:22 +0000 (10:56 -0500)]
Add eficonman beginnings
Signed-off-by: Peter Jones <pjones@redhat.com>
Taku Izumi [Tue, 26 Jan 2016 05:32:50 +0000 (14:32 +0900)]
Fix insusufficient validation check of -M option
The acceptable range of -M (--mirror-above-4G) option should
be from 0 to 50. So the negative value should be rejected.
Otherwise unintended value can be specified.
e.g.
> efibootmgr -M -3
...
MirroredPercentageAbove4G: 25.00
MirrorMemoryBelow4GB: true
RequestMirroredPercentageAbove4G: 652.36
RequestMirrorMemoryBelow4GB: true
652.36 is invalid value for MirroredPercentageAbove4G and should
not be specified.
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Peter Jones [Thu, 12 Nov 2015 15:57:15 +0000 (10:57 -0500)]
Add LOCALEDIR make goo
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 4 Aug 2015 14:36:31 +0000 (10:36 -0400)]
Simplify directory structure.
We're making a lot less stuff than we did before libefivar.so existed,
and there's not a lot of reason for it. Collapse the directory
structure entirely, and move to more modern makefiles.
Signed-off-by: Peter Jones <pjones@redhat.com>
Timo Gurr [Tue, 30 Jun 2015 09:33:14 +0000 (11:33 +0200)]
Set pkg-config binary as variable
Allow the location of the pkg-config binary to be set using the
parameter PKG_CONFIG. Needed to support cross compilation toolchains.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 25 Jun 2015 13:56:37 +0000 (09:56 -0400)]
Make it a little clearer what's going on when efi_del_variable() fails.
Right now if efi_del_variable() fails we try a couple of things for
compatibility reasons and we have too many different error messages.
Hopefully this makes it clearer.
Signed-off-by: Peter Jones <pjones@redhat.com>
Jody Bruchon [Thu, 21 May 2015 12:16:08 +0000 (08:16 -0400)]
INSTALL: add note about missing efivar.h error
Signed-off-by: Peter Jones <pjones@redhat.com>
Alexis Murzeau [Sat, 18 Apr 2015 21:03:23 +0000 (23:03 +0200)]
Set guid when reading boot entries in read_vars.
set_active_state use boot->guid, so set it to EFI_GLOBAL_GUID.
Shih-Yuan Lee (FourDollars) [Mon, 1 Jun 2015 10:36:40 +0000 (18:36 +0800)]
Delete BootOrder only when necessary.
Signed-off-by: Shih-Yuan Lee (FourDollars) <sylee@ubuntu.com>
Luck, Tony [Tue, 9 Jun 2015 17:14:58 +0000 (10:14 -0700)]
Add -m and -M options to support address range mirror
BIOS and OS pass messages for address range mirror using a pair of
UEFI variables:
MirrorCurrent: Written by BIOS to tell the OS that the platform supports
address range mirror and to say whether mirroring was set up using
the desired parameters
MirrorRequest: Written by OS to tell BIOS new paramters to use on next boot
This is documented in the RAS validation guide for memory address range
mirroring for the Xeon E7-v3 family:
https://software.intel.com/sites/default/files/managed/43/6a/Memory%20Address%20Range%20Mirroring%20Validation%20Guide.pdf
Signed-off-by: Tony Luck <tony.luck@intel.com>
Peter Jones [Thu, 28 May 2015 13:50:37 +0000 (09:50 -0400)]
Update version to 0.12
- use -lefivar and -lefiboot to make device paths and load options.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 28 May 2015 14:16:47 +0000 (10:16 -0400)]
Update build deps in the spec to match what libraries we actually use.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 28 May 2015 13:50:20 +0000 (09:50 -0400)]
Make the release procedure a bit more streamlined.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 27 May 2015 18:22:44 +0000 (14:22 -0400)]
Add some language about efivar in INSTALL
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 27 May 2015 18:06:26 +0000 (14:06 -0400)]
Get rid of pci-utils and zlib deps; we don't need them any more.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 27 May 2015 18:06:06 +0000 (14:06 -0400)]
Make loadopt function names use efivar-0.19 names.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 30 Apr 2015 17:59:00 +0000 (13:59 -0400)]
Get us back to where we were before with network entries.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 30 Apr 2015 15:31:39 +0000 (11:31 -0400)]
We don't need the ucs2/utf8 code either.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 30 Apr 2015 15:23:18 +0000 (11:23 -0400)]
Get rid of efichar.h; it's no longer used.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 30 Apr 2015 15:14:42 +0000 (11:14 -0400)]
Fix the github url once more.
This currently lives under the rhinstaller github account.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 30 Apr 2015 15:08:21 +0000 (11:08 -0400)]
Get rid of manually specified ACPI arguments; we don't need them.
Since we have pretty good detection of acpi hid/uid now, we don't
actually need them to be manually specified anywhere.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 29 Apr 2015 19:13:10 +0000 (15:13 -0400)]
Make -e 1 and -e 3 work again after the libefiboot shuffle.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 7 Apr 2015 20:14:43 +0000 (16:14 -0400)]
Make file boot option creation use libefiboot to create the device path.
(right now network options are horribly broken, but they never really
worked anyway, so... yeah, I'll fix them in a subsequent commit.)
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 31 Mar 2015 14:56:08 +0000 (10:56 -0400)]
Add "efibootmgr -C"; create only without appending to BootOrder
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 31 Mar 2015 14:55:35 +0000 (10:55 -0400)]
Get rid of a lot of DP stuff that efivar does now.
Peter Jones [Mon, 2 Mar 2015 20:23:47 +0000 (15:23 -0500)]
Get run of unparse_path() and unparse_raw()
We don't use these any more.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 27 Feb 2015 18:31:11 +0000 (13:31 -0500)]
Make show_boot_vars use efivars DP formatting code.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 12 Jan 2015 19:15:24 +0000 (14:15 -0500)]
Don't depend on vendor-defined calloc(n, 0) behavior.
If we don't have any boot variables, we know that 0 is free, so just
return that.
Signed-off-by: Peter Jones <pjones@redhat.com>