OSDN Git Service
Peter Jones [Mon, 14 Apr 2014 21:19:57 +0000 (17:19 -0400)]
Make nvme work with "-e 3".
This will force a long-form NVME device path.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 14 Apr 2014 20:49:12 +0000 (16:49 -0400)]
Add support for displaying NVME device paths.
This doesn't actually let you /use/ them yet, but it does show them if
they're there.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 14 Apr 2014 20:39:42 +0000 (16:39 -0400)]
Get a lot more picky with our compiler warnings.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 2 Apr 2014 14:04:52 +0000 (10:04 -0400)]
Filenames and github - the worst of both worlds.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 1 Apr 2014 18:53:43 +0000 (14:53 -0400)]
Call it 0.7
This has been around for a while, and it's not going to get any more
testing without some exposure. Let's give it a shot.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 13 Mar 2014 01:31:45 +0000 (21:31 -0400)]
Fix device path size and allocation in make_file_path_device_path()
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 6 Mar 2014 20:05:58 +0000 (15:05 -0500)]
Fix a missing error return.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 7 Feb 2014 18:33:17 +0000 (13:33 -0500)]
Add a --keep option to preserve the old BootOrder entries when using -o.
So basically if you've got a boot order of:
0000,0001,0018,001A,0019
And you do "efibootmgr -o 001A --keep", you'll get:
001A,0000,0001,0018,0019
And if you subsequently do "efibootmgr -o 0002 --keep" you'll get:
0002,001A,0000,0001,0018,0019
This is to work around a buggy firmware reported in rhbz#889509 ,
which will erroneously try to re-populate BootOrder /and create new
Boot#### entries to do so/ if you supply a BootOrder without the
defaults in it.
This firmware is garbage.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 6 Feb 2014 15:08:24 +0000 (10:08 -0500)]
Add SATA(x,y,z) device path unparsing.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 19:26:00 +0000 (14:26 -0500)]
Get the correct size for device path in our optional data blob.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 18:46:53 +0000 (13:46 -0500)]
Add some requires to our spec file for efivar-libs and efivar-devel.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 18:46:10 +0000 (13:46 -0500)]
Make Vendor-Defined Message paths show up the same way as in "bcfg boot dump".
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 18:45:39 +0000 (13:45 -0500)]
Make FvFile show up the same way it does in "bcfg boot dump".
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 05:38:20 +0000 (00:38 -0500)]
Handle bogus malformed variables somewhat more gracefully.
Because previously we tried to dump what it was saying, but that really
just means crashing.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 05:09:17 +0000 (00:09 -0500)]
Fix gpg path in "make archive".
Still pointed at .tar.gz while everything else says .tar.bz2
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 04:53:22 +0000 (23:53 -0500)]
Make the man page not mention proc, and make it mention efivarfs.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 04:50:19 +0000 (23:50 -0500)]
Merge the old TODO and the new one.
Oops.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 04:47:26 +0000 (23:47 -0500)]
Update urls in README.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 04:40:01 +0000 (23:40 -0500)]
Update TODO.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 04:26:47 +0000 (23:26 -0500)]
Get rid of the 1024-byte limit on ESP file path.
Not that I think 1024 was something we were going to hit there, but...
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 04:02:25 +0000 (23:02 -0500)]
Handle some other device paths.
Add support for Vendor-Defined Messaging Device Paths as well as
FVFILE() and FVVOL()
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 5 Feb 2014 03:39:00 +0000 (22:39 -0500)]
Get rid of 1024-byte limit for displaying variables as well.
This basically makes all of unparse_path() and its derivatives into
snprintf()-like functions, so we don't have to have static buffers.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 4 Feb 2014 23:51:45 +0000 (18:51 -0500)]
Add a TODO here so I can keep track of what is yet to be done.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 10 Sep 2013 18:46:00 +0000 (14:46 -0400)]
Typo fix.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Tue, 10 Sep 2013 15:25:41 +0000 (11:25 -0400)]
Correctly fill out sa_family for MAC address device types.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 6 Sep 2013 18:49:28 +0000 (14:49 -0400)]
Handle virtio network devices.
Just like virtio scsi devices, look up their bus/device/function by the
virtio device instead of the traditional way.
Signed-off-by: Peter Jones <pjones@redhat.com>
Tested-and-reviewed-by: Laszlo Ersek <lersek@redhat.com>
Laszlo Ersek [Mon, 9 Sep 2013 09:37:39 +0000 (11:37 +0200)]
'-h' is a valid option, recognize it
This completes commit
e562a948.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Peter Jones [Fri, 6 Sep 2013 20:18:12 +0000 (16:18 -0400)]
Ignore patches.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 6 Sep 2013 20:17:20 +0000 (16:17 -0400)]
Remove 40-character limit on file paths in /boot.
This is totally unnecessary now; the only real point before was
everything was fixed size to keep it within 1024.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 6 Sep 2013 18:46:18 +0000 (14:46 -0400)]
Don't allow negative boot numbers.
In the case where you typo the command line and do:
efibootmgr -b -a blah blah blah
instead of
efibootmgr -b 0001 -a blah blah blah
sscanf(..., "%X", &num) happily produces a successful return code and a
value of -10. This later results in us creating a boot variable named
BootFFFFFFFF6 , which is clearly not okay. So if we've got a negative
number there, it's probably not what the user wanted.
Bounds check the whole thing.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 6 Sep 2013 18:16:24 +0000 (14:16 -0400)]
Make make_linux_load_option() slightly more readable.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 6 Sep 2013 15:31:03 +0000 (11:31 -0400)]
Make add_extra_args_file() work properly.
Two things:
1) make it actually return the data
2) _ascii() and _unicode() will get invoked in some cases, and they need
to handle the case where they do nothing.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 6 Sep 2013 15:23:16 +0000 (11:23 -0400)]
Audit strlen() in append_extra_args_ascii() as well.
Similar code, similar bugs.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 6 Sep 2013 15:13:39 +0000 (11:13 -0400)]
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>
Peter Jones [Fri, 6 Sep 2013 15:02:13 +0000 (11:02 -0400)]
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>
Peter Jones [Fri, 6 Sep 2013 14:57:50 +0000 (10:57 -0400)]
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>
Peter Jones [Fri, 6 Sep 2013 14:43:35 +0000 (10:43 -0400)]
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>
Peter Jones [Fri, 6 Sep 2013 14:24:22 +0000 (10:24 -0400)]
You really can't free something you put through realloc().
This should make '-u' work again.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 6 Sep 2013 14:10:18 +0000 (10:10 -0400)]
Fix typo in arg parsing.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 6 Sep 2013 14:00:40 +0000 (10:00 -0400)]
Remove some dead code.
If anybody's looking for it, it's in git.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Fri, 6 Sep 2013 13:01:14 +0000 (09:01 -0400)]
Clean up .gitignores some.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 5 Sep 2013 19:53:06 +0000 (15:53 -0400)]
Make --help also -h, and don't have it exit with an error status.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 5 Sep 2013 19:52:50 +0000 (15:52 -0400)]
Make tilt_slashes() static.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 5 Sep 2013 18:29:35 +0000 (14:29 -0400)]
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>
Peter Jones [Thu, 5 Sep 2013 18:16:42 +0000 (14:16 -0400)]
Fix minor compiler warning.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 5 Sep 2013 18:15:53 +0000 (14:15 -0400)]
Fix completely wrong compiler warning.
gcc's data flow analysis still kind of blows.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 5 Sep 2013 17:46:43 +0000 (13:46 -0400)]
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>
Peter Jones [Thu, 5 Sep 2013 17:41:31 +0000 (13:41 -0400)]
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>
Peter Jones [Thu, 5 Sep 2013 17:39:17 +0000 (13:39 -0400)]
Fix error message that says "delete" on the "activate" case.
bcl found this reviewing it.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 4 Sep 2013 22:48:05 +0000 (18:48 -0400)]
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
Peter Jones [Wed, 4 Sep 2013 22:46:56 +0000 (18:46 -0400)]
Ignore some files so "git status" is clearer.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Wed, 4 Sep 2013 22:46:34 +0000 (18:46 -0400)]
Silence some minor compiler warnings.
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Mon, 13 Jan 2014 21:08:16 +0000 (16:08 -0500)]
Release 0.6.1
Signed-off-by: Peter Jones <pjones@redhat.com>
Peter Jones [Thu, 5 Sep 2013 18:01:25 +0000 (14:01 -0400)]
Modernize "make tarball" for our glorious git future.
Signed-off-by: Peter Jones <pjones@redhat.com>
Daniel Jared Dominguez [Mon, 13 Jan 2014 19:20:56 +0000 (13:20 -0600)]
Prepping for move to GitHub. Updated documentation to refer to new maintainer and new git repository.
Daniel Jared Dominguez [Mon, 13 Jan 2014 18:56:25 +0000 (12:56 -0600)]
From: Colin Watson <cjwatson@ubuntu.com>
Fix -w option to leave an existing unique MBR signature intact. This makes the
implementation match the documentation.
Daniel Jared Dominguez [Mon, 13 Jan 2014 18:45:42 +0000 (12:45 -0600)]
From: Bdale Garbee <bdale@gag.com>
change computeroutput to programlisting to fix man page formatting issue,
update rules to use docbook source for man page, closes Debian bug #680716
Jordan Hargrave [Fri, 18 Oct 2013 18:49:59 +0000 (13:49 -0500)]
Fix unchecked malloc calls.
Resolves: rhbz#715216
From Peter Jones@Redhat
Jordan Hargrave [Fri, 18 Oct 2013 18:34:24 +0000 (13:34 -0500)]
produce virtio-scsi device paths under EDD 3.0
Patch from Laszlo Ersek@RedHat
Jordan Hargrave [Fri, 18 Oct 2013 18:29:40 +0000 (13:29 -0500)]
prevent out-of-bounds access with SCSI_IOCTL_GET_PCI
Patch from Laszlo Ersek@RedHat
Jordan Hargrave [Fri, 18 Oct 2013 18:15:46 +0000 (13:15 -0500)]
disk_get_virt_pci(): generalize to arbitrary major & minor device numbers
Patch from Laszlo Ersek@RedHat
Jordan Hargrave [Fri, 18 Oct 2013 18:04:26 +0000 (13:04 -0500)]
disk_info_from_fd(): group output parameters into struct disk_info
Patch from Laszlo Ersek@RedHat
Jordan Hargrave [Fri, 18 Oct 2013 17:39:58 +0000 (12:39 -0500)]
produce virtio-blk device paths under EDD 3.0
Patch from Laszlo Ersek@RedHat
Jordan Hargrave [Fri, 18 Oct 2013 17:26:18 +0000 (12:26 -0500)]
disk_get_pci(): expose detected interface type
Patch from Laszlo Ersek@RedHat
Jordan Hargrave [Fri, 18 Oct 2013 17:14:45 +0000 (12:14 -0500)]
disk_info_from_fd(): get major/minor from buf.st_rdev
Patch from Laszlo Ersek@RedHat
Jordan Hargrave [Tue, 2 Jul 2013 15:28:12 +0000 (10:28 -0500)]
Add support for UNIX-style path names (forward-slash)
Submitted by Keshav Padram [the.ridikulus.rat@gmail.com]
Jordan Hargrave [Tue, 29 Jan 2013 20:37:33 +0000 (14:37 -0600)]
Update manpage email
Jordan Hargrave [Wed, 23 Jan 2013 18:36:32 +0000 (12:36 -0600)]
Bump efibootmgr version to include latest changes
Jordan Hargrave [Thu, 29 Nov 2012 16:11:43 +0000 (10:11 -0600)]
Add patches from fedora release
* Wed Nov 28 2012 Matthew Garrett <mjg59@srcf.ucam.org> - 0.5.4-14
- efibootmgr-0.5.4-Work-around-broken-Apple-firmware.patch
Resolves: #873629
- efibootmgr-0.5.4-Remove-device-path-padding-on-non-Itanium.patch - improve
spec conformance
Jordan Hargrave [Tue, 24 Apr 2012 17:58:57 +0000 (12:58 -0500)]
From: Lane Winner<lane.winner@oracle.com>
make_boot_var does not check for failed status with create_variable.
This can result in a memory leak.
Additionally the user should be notified of the problem.
We encounter this issue on one system after filling up the UEFI boot list
with dummy devices.
The patch fix the problem. It was verified on a Mensa system using RHEL 6.0
Signed-off-by: Yinghai Lu<yinghai@kernel.org>
Peter Jones [Wed, 14 Jul 2010 18:26:49 +0000 (11:26 -0700)]
Handle sector_size != 512.
Disks can have 4kB sectors now, so don't just bail out when that's the
case.
Matt Domsch [Thu, 23 Jul 2009 19:20:19 +0000 (14:20 -0500)]
fix disk minor number discovery
Raymund Will noted disk_info_from_fd() incorrectly used logical &&
instead of bitwise & when obtaining the minor number.
Reported in https://bugzilla.novell.com/show_bug.cgi?id=524529#c1
Matt Domsch [Thu, 23 Jul 2009 19:18:11 +0000 (14:18 -0500)]
fix minor memory leak
David Binderman noted new_data was being allocated but not freed. Not
a big deal as the program exits soon thereafter (and is thus freed),
but worth fixing anyhow.
Fixes https://bugzilla.novell.com/show_bug.cgi?id=524529#c1
Matt Domsch [Fri, 11 Jan 2008 21:09:12 +0000 (15:09 -0600)]
update ChangeLog
Matt Domsch [Fri, 11 Jan 2008 21:08:12 +0000 (15:08 -0600)]
replacing elilo < 3.6-6, not -5
per conversation with clumens.
Matt Domsch [Thu, 3 Jan 2008 18:19:28 +0000 (12:19 -0600)]
RPM spec rewrite for Fedora inclusion
efibootmgr is being split out of the elilo SRPM in Fedora, into its
own SRPM.
Matt Domsch [Thu, 3 Jan 2008 18:18:31 +0000 (12:18 -0600)]
Makefile cleanups
bump version
take an EXTRA_CFLAGS argument so rpmbuild can give us it's CFLAGS
without overriding ours.
exclude .git and *~ files from the tarball.
Matt Domsch [Thu, 3 Jan 2008 18:16:35 +0000 (12:16 -0600)]
src/lib/efi.c: include linux/types.h
patch from Fedora.
Matt Domsch [Thu, 3 Jan 2008 18:15:18 +0000 (12:15 -0600)]
make sure GPT_HEADER_SIGNATURE is a 64-bit value
patch from Debian / Ubuntu 0.5.3-3ubuntu1.
Matt Domsch [Mon, 12 Nov 2007 19:31:32 +0000 (13:31 -0600)]
avoid more unaligned access warnings
Matt Domsch [Mon, 12 Nov 2007 18:25:42 +0000 (12:25 -0600)]
cleanup a few unaligned access warnings
Matt Domsch [Mon, 12 Nov 2007 18:12:37 +0000 (12:12 -0600)]
cleanup exit values a little
Doug Chapman [Mon, 12 Nov 2007 16:32:12 +0000 (11:32 -0500)]
patch to make efibootmgr have non-zero exit code on errors
We have some automated tools that use efibootmgr which are having a hard
time detecting when efibootmgr fails since it exits with 0 on many
failures. This patch catches (most) errors and exits with non-zero. I
also added several error messages for to make it more obvious what was
wrong with the command line arguments.
Signed-off-by: Matt Domsch <Matt_Domsch@dell.com>
Matt Domsch [Mon, 9 Jul 2007 16:47:50 +0000 (16:47 +0000)]
add -lz to libs, needed when libpci happens to need it
Matt Domsch [Mon, 9 Jul 2007 16:23:34 +0000 (16:23 +0000)]
apply patch from Dave Jiang <djiang@mvista.com> to enable cross-building
Matt Domsch [Thu, 11 Aug 2005 17:37:04 +0000 (17:37 +0000)]
v0.5.2.2
Matt Domsch [Thu, 11 Aug 2005 17:36:29 +0000 (17:36 +0000)]
document -@ option
Matt Domsch [Thu, 11 Aug 2005 16:55:20 +0000 (16:55 +0000)]
make efi_variable_t.DataSize be unsigned long, to match kernel implementation. This isn't ideal, I'd prefer to be able to have a 32-bit efibootmgr on a 64-bit kernel, but with efi_status_t being a long also, we're already stuck with needing a native copy.
Matt Domsch [Wed, 10 Aug 2005 15:59:33 +0000 (15:59 +0000)]
clean up extra_opts_file handling
Matt Domsch [Wed, 10 Aug 2005 15:28:30 +0000 (15:28 +0000)]
new option -@ grabs extra variable args from a file
Matt Domsch [Wed, 10 Aug 2005 05:34:53 +0000 (05:34 +0000)]
add -g flag, move _FILE_OFFSET_BITS=64 to Makefile
Matt Domsch [Wed, 10 Aug 2005 05:30:14 +0000 (05:30 +0000)]
v0.5.2
Matt Domsch [Wed, 10 Aug 2005 05:28:23 +0000 (05:28 +0000)]
move _FILE_OFFSET_BITS definition into Makefile
Matt Domsch [Tue, 26 Jul 2005 19:37:11 +0000 (19:37 +0000)]
parse PCI domain information in make_net_load_option() on 2.6 kernels
Matt Domsch [Tue, 26 Jul 2005 19:32:24 +0000 (19:32 +0000)]
properly free allocated memory (caught by valgrind)
Matt Domsch [Tue, 8 Mar 2005 22:54:53 +0000 (22:54 +0000)]
applied patch from Alex Williamson which causes BootXXXX values to be printed in uppercase hex rather than lowercase. This also now allows the full 64K boot entries, rather than requiring they start with a zero. Release 0.5.1
Matt Domsch [Thu, 26 Aug 2004 21:02:14 +0000 (21:02 +0000)]
put linux.dell.com in spec file
Matt Domsch [Thu, 26 Aug 2004 20:27:28 +0000 (20:27 +0000)]
version 0.5.0-test4 released as v0.5.0 with no code changes
Matt Domsch [Wed, 9 Jun 2004 21:51:19 +0000 (21:51 +0000)]
Add PCI parent devices to device path for netboot and EDD30 entries
Matt Domsch [Wed, 9 Jun 2004 21:50:22 +0000 (21:50 +0000)]
changelog for version 0.5.0-test4