summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch')
-rw-r--r--meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch44
1 files changed, 24 insertions, 20 deletions
diff --git a/meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch b/meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch
index 2400c98d6a..f1d01fa43c 100644
--- a/meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch
+++ b/meta/recipes-devtools/syslinux/syslinux/0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch
@@ -1,8 +1,7 @@
1From 78d76b87a4b855e6b661ae457283a63f385c04c9 Mon Sep 17 00:00:00 2001 1From efce87e5ab98664c57e5f4e3955a2f3747df5737 Mon Sep 17 00:00:00 2001
2From: Robert Yang <liezhi.yang@windriver.com> 2From: Robert Yang <liezhi.yang@windriver.com>
3Date: Fri, 2 Jan 2015 12:26:46 +0800 3Date: Fri, 2 Jan 2015 12:26:46 +0800
4Subject: [PATCH 8/9] libinstaller/syslinuxext: implement 4Subject: [PATCH] libinstaller/syslinuxext: implement syslinux_patch_bootsect()
5 syslinux_patch_bootsect()
6 5
7Move the related from extlinux/main.c to libinstaller/syslinuxext.c, the 6Move the related from extlinux/main.c to libinstaller/syslinuxext.c, the
8syslinux_patch_bootsect() are used by both extlinux/main.c and 7syslinux_patch_bootsect() are used by both extlinux/main.c and
@@ -12,17 +11,21 @@ Upstream-Status: Submitted
12 11
13Signed-off-by: Robert Yang <liezhi.yang@windriver.com> 12Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
14Tested-by: Du Dolpher <dolpher.du@intel.com> 13Tested-by: Du Dolpher <dolpher.du@intel.com>
14
15Edited to include sysmacros.h
16
17Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
15--- 18---
16 extlinux/Makefile | 3 +- 19 extlinux/Makefile | 3 +-
17 extlinux/main.c | 167 +------------------------------------------- 20 extlinux/main.c | 167 +-----------------------------------
18 libinstaller/syslinuxext.c | 170 +++++++++++++++++++++++++++++++++++++++++++++ 21 libinstaller/syslinuxext.c | 171 +++++++++++++++++++++++++++++++++++++
19 3 files changed, 175 insertions(+), 165 deletions(-) 22 3 files changed, 176 insertions(+), 165 deletions(-)
20 23
21diff --git a/extlinux/Makefile b/extlinux/Makefile 24diff --git a/extlinux/Makefile b/extlinux/Makefile
22index 02d1db5..90dd92f 100644 25index 1721ee54..62a49728 100644
23--- a/extlinux/Makefile 26--- a/extlinux/Makefile
24+++ b/extlinux/Makefile 27+++ b/extlinux/Makefile
25@@ -31,7 +31,8 @@ SRCS = main.c \ 28@@ -32,7 +32,8 @@ SRCS = main.c \
26 ../libinstaller/advio.c \ 29 ../libinstaller/advio.c \
27 ../libinstaller/bootsect_bin.c \ 30 ../libinstaller/bootsect_bin.c \
28 ../libinstaller/ldlinuxc32_bin.c \ 31 ../libinstaller/ldlinuxc32_bin.c \
@@ -33,10 +36,10 @@ index 02d1db5..90dd92f 100644
33 36
34 .SUFFIXES: .c .o .i .s .S 37 .SUFFIXES: .c .o .i .s .S
35diff --git a/extlinux/main.c b/extlinux/main.c 38diff --git a/extlinux/main.c b/extlinux/main.c
36index 09740bd..6fe026e 100644 39index ebff7eae..9add50fb 100644
37--- a/extlinux/main.c 40--- a/extlinux/main.c
38+++ b/extlinux/main.c 41+++ b/extlinux/main.c
39@@ -60,6 +60,7 @@ 42@@ -62,6 +62,7 @@
40 #include "setadv.h" 43 #include "setadv.h"
41 #include "syslxopt.h" /* unified options */ 44 #include "syslxopt.h" /* unified options */
42 #include "mountinfo.h" 45 #include "mountinfo.h"
@@ -44,7 +47,7 @@ index 09740bd..6fe026e 100644
44 47
45 #ifdef DEBUG 48 #ifdef DEBUG
46 # define dprintf printf 49 # define dprintf printf
47@@ -67,10 +68,6 @@ 50@@ -69,10 +70,6 @@
48 # define dprintf(...) ((void)0) 51 # define dprintf(...) ((void)0)
49 #endif 52 #endif
50 53
@@ -55,10 +58,11 @@ index 09740bd..6fe026e 100644
55 /* Since we have unused 2048 bytes in the primary AG of an XFS partition, 58 /* Since we have unused 2048 bytes in the primary AG of an XFS partition,
56 * we will use the first 0~512 bytes starting from 2048 for the Syslinux 59 * we will use the first 0~512 bytes starting from 2048 for the Syslinux
57 * boot sector. 60 * boot sector.
58@@ -92,136 +89,6 @@ static char subvol[BTRFS_SUBVOL_MAX]; 61@@ -93,136 +90,6 @@ static char subvol[BTRFS_SUBVOL_MAX];
62 #define BTRFS_ADV_OFFSET (BTRFS_BOOT_AREA_A_OFFSET + BTRFS_BOOT_AREA_A_SIZE \
59 - 2*ADV_SIZE) 63 - 2*ADV_SIZE)
60 64
61 /* 65-/*
62- * Get the size of a block device 66- * Get the size of a block device
63- */ 67- */
64-static uint64_t get_size(int devfd) 68-static uint64_t get_size(int devfd)
@@ -188,11 +192,10 @@ index 09740bd..6fe026e 100644
188- return rv; 192- return rv;
189-} 193-}
190- 194-
191-/* 195 /*
192 * Query the device geometry and put it into the boot sector. 196 * Query the device geometry and put it into the boot sector.
193 * Map the file and put the map in the boot sector and file. 197 * Map the file and put the map in the boot sector and file.
194 * Stick the "current directory" inode number into the file. 198@@ -233,11 +100,8 @@ ok:
195@@ -231,11 +98,8 @@ ok:
196 static int patch_file_and_bootblock(int fd, const char *dir, int devfd) 199 static int patch_file_and_bootblock(int fd, const char *dir, int devfd)
197 { 200 {
198 struct stat dirst, xdst; 201 struct stat dirst, xdst;
@@ -204,7 +207,7 @@ index 09740bd..6fe026e 100644
204 char *dirpath, *subpath, *xdirpath; 207 char *dirpath, *subpath, *xdirpath;
205 int rv; 208 int rv;
206 209
207@@ -279,33 +143,8 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd) 210@@ -281,33 +145,8 @@ static int patch_file_and_bootblock(int fd, const char *dir, int devfd)
208 /* Now subpath should contain the path relative to the fs base */ 211 /* Now subpath should contain the path relative to the fs base */
209 dprintf("subpath = %s\n", subpath); 212 dprintf("subpath = %s\n", subpath);
210 213
@@ -241,14 +244,15 @@ index 09740bd..6fe026e 100644
241 /* Construct the boot file map */ 244 /* Construct the boot file map */
242 245
243diff --git a/libinstaller/syslinuxext.c b/libinstaller/syslinuxext.c 246diff --git a/libinstaller/syslinuxext.c b/libinstaller/syslinuxext.c
244index bb54cef..5a4423b 100644 247index bb54cefc..9ae82884 100644
245--- a/libinstaller/syslinuxext.c 248--- a/libinstaller/syslinuxext.c
246+++ b/libinstaller/syslinuxext.c 249+++ b/libinstaller/syslinuxext.c
247@@ -1,7 +1,177 @@ 250@@ -1,7 +1,178 @@
248 #define _GNU_SOURCE 251 #define _GNU_SOURCE
249 252
250+#include <sys/stat.h> 253+#include <sys/stat.h>
251+#include <sys/types.h> 254+#include <sys/types.h>
255+#include <sys/sysmacros.h>
252+#include <getopt.h> 256+#include <getopt.h>
253+#include <ext2fs/ext2fs.h> 257+#include <ext2fs/ext2fs.h>
254+ 258+
@@ -423,5 +427,5 @@ index bb54cef..5a4423b 100644
423 } 427 }
424 428
425-- 429--
4261.9.1 4302.17.1
427 431