[PATCH] boot: Change ":rom%d" boot order rom instance to ":rom%x"
Use hex numbers for the rom instance count in boot order open firmware device naming. The ":rom" suffix isn't part of a standard and it's highly unlikely any rom would have 10 or more drives on it, but this change makes the code more similar to the numbering of other boot order devices. Signed-off-by: Kevin O'Connor <kevin@koconnor.net> --- src/boot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/boot.c b/src/boot.c index 34088c8..f23e9e1 100644 --- a/src/boot.c +++ b/src/boot.c @@ -189,7 +189,7 @@ int bootprio_find_pci_rom(struct pci_device *pci, int instance) char desc[256], *p; p = build_pci_path(desc, sizeof(desc), "*", pci); if (instance) - snprintf(p, desc+sizeof(desc)-p, ":rom%d", instance); + snprintf(p, desc+sizeof(desc)-p, ":rom%x", instance); return find_prio(desc); } @@ -201,7 +201,7 @@ int bootprio_find_named_rom(const char *name, int instance) char desc[256], *p; p = desc + snprintf(desc, sizeof(desc), "/rom@%s", name); if (instance) - snprintf(p, desc+sizeof(desc)-p, ":rom%d", instance); + snprintf(p, desc+sizeof(desc)-p, ":rom%x", instance); return find_prio(desc); } -- 1.9.3
"Kevin O'Connor" <kevin@koconnor.net> writes:
Use hex numbers for the rom instance count in boot order open firmware device naming. The ":rom" suffix isn't part of a standard and it's highly unlikely any rom would have 10 or more drives on it, but this change makes the code more similar to the numbering of other boot order devices.
Reviewed-by: Markus Armbruster <armbru@redhat.com>
On Fr, 2014-08-15 at 16:38 +0200, Markus Armbruster wrote:
"Kevin O'Connor" <kevin@koconnor.net> writes:
Use hex numbers for the rom instance count in boot order open firmware device naming. The ":rom" suffix isn't part of a standard and it's highly unlikely any rom would have 10 or more drives on it, but this change makes the code more similar to the numbering of other boot order devices.
Reviewed-by: Markus Armbruster <armbru@redhat.com>
fyi: cherry-picked both bootindex fixes into 1.7.5-stable branch. cheers, Gerd
participants (3)
-
Gerd Hoffmann -
Kevin O'Connor -
Markus Armbruster