SHA256
1
0
forked from pool/syslinux

- update isohybrid and mbr & gpt boot code with versions from syslinux-5.00

- fix gpt code in isohybrid and adjust to create a valid partition table for
  our new media layout

OBS-URL: https://build.opensuse.org/package/show/system:install:head/syslinux?expand=0&rev=44
This commit is contained in:
Steffen Winterfeldt 2013-02-04 13:30:17 +00:00 committed by Git OBS Bridge
parent 3fcf0716b5
commit a035b01810
4 changed files with 1112 additions and 60 deletions

View File

@ -1,57 +0,0 @@
diff --git a/utils/isohybrid.c b/utils/isohybrid.c
index 7ee9a7f..8a60531 100644
--- a/utils/isohybrid.c
+++ b/utils/isohybrid.c
@@ -108,6 +108,7 @@ printh(void)
int
check_option(int argc, char *argv[])
{
+ char *err = NULL;
int n = 0, ind = 0;
const char optstr[] = ":h:s:e:o:t:i:fcp?vV";
@@ -135,32 +136,38 @@ check_option(int argc, char *argv[])
switch (n)
{
case 'h':
- if (!sscanf(optarg, "%hu", &head) || head < 1 || head > 256)
+ head = strtoul(optarg, &err, 0);
+ if (head < 1 || head > 256)
errx(1, "invalid head: `%s', 1 <= head <= 256", optarg);
break;
case 's':
- if (!sscanf(optarg, "%hhu", &sector) || sector < 1 || sector > 63)
+ sector = strtoul(optarg, &err, 0);
+ if (sector < 1 || sector > 63)
errx(1, "invalid sector: `%s', 1 <= sector <= 63", optarg);
break;
case 'e':
- if (!sscanf(optarg, "%hhu", &entry) || entry < 1 || entry > 4)
+ entry = strtoul(optarg, &err, 0);
+ if (entry < 1 || entry > 4)
errx(1, "invalid entry: `%s', 1 <= entry <= 4", optarg);
break;
case 'o':
- if (!sscanf(optarg, "%hhu", &offset) || offset > 64)
+ offset = strtoul(optarg, &err, 0);
+ if (*err || offset > 64)
errx(1, "invalid offset: `%s', 0 <= offset <= 64", optarg);
break;
case 't':
- if (!sscanf(optarg, "%hu", &type) || type > 255)
+ type = strtoul(optarg, &err, 0);
+ if (*err || type > 255)
errx(1, "invalid type: `%s', 0 <= type <= 255", optarg);
break;
case 'i':
- if (!sscanf(optarg, "%u", &id))
+ id = strtoul(optarg, &err, 0);
+ if (*err)
errx(1, "invalid id: `%s'", optarg);
break;

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Feb 4 14:29:58 CET 2013 - snwint@suse.de
- update isohybrid and mbr & gpt boot code with versions from syslinux-5.00
- fix gpt code in isohybrid and adjust to create a valid partition table for
our new media layout
-------------------------------------------------------------------
Thu May 31 14:41:55 CEST 2012 - snwint@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package syslinux
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -38,10 +38,10 @@ Patch0: %{name}-%{version}-iso9660.diff
Patch1: %{name}-%{version}-cwd.diff
Patch2: %{name}-%{version}-noinitrd.diff
Patch3: %{name}-%{version}-mboot_bootif.diff
Patch4: %{name}-%{version}-isohybrid-hex-option-parsing.diff
Patch5: %{name}-%{version}-md5pass.diff
Patch6: %{name}-%{version}-libext2fs.diff
Patch7: %{name}-%{version}-gcc47.diff
Patch8: %{name}-%{version}-isohybrid_efi.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -62,10 +62,10 @@ Authors:
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p0
%patch7 -p0
%patch8 -p0
%build
cp %{SOURCE2} .