[kernel] r11840 - people/waldi/s390/s390-tools/debian/patches

Bastian Blank waldi at alioth.debian.org
Tue Jul 15 21:54:47 UTC 2008


Author: waldi
Date: Tue Jul 15 21:54:46 2008
New Revision: 11840

Log:
Restore optional zipl entries.

* debian/patches/series: Add new patch.
* debian/patches/zipl-optional.patch: Add.


Added:
   people/waldi/s390/s390-tools/debian/patches/zipl-optional.patch
Modified:
   people/waldi/s390/s390-tools/debian/patches/series

Modified: people/waldi/s390/s390-tools/debian/patches/series
==============================================================================
--- people/waldi/s390/s390-tools/debian/patches/series	(original)
+++ people/waldi/s390/s390-tools/debian/patches/series	Tue Jul 15 21:54:46 2008
@@ -3,3 +3,4 @@
 install.patch
 install-qetharp.patch
 disable.patch
+zipl-optional.patch

Added: people/waldi/s390/s390-tools/debian/patches/zipl-optional.patch
==============================================================================
--- (empty file)
+++ people/waldi/s390/s390-tools/debian/patches/zipl-optional.patch	Tue Jul 15 21:54:46 2008
@@ -0,0 +1,172 @@
+--- s390-tools.orig/zipl/include/scan.h
++++ s390-tools/zipl/include/scan.h
+@@ -15,7 +15,7 @@
+ 
+ 
+ #define SCAN_SECTION_NUM		6
+-#define SCAN_KEYWORD_NUM		13
++#define SCAN_KEYWORD_NUM		14
+ 
+ enum scan_id {
+ 	scan_id_empty = 0,
+@@ -38,7 +38,8 @@
+ 	scan_keyword_prompt	= 9,
+ 	scan_keyword_timeout	= 10,
+ 	scan_keyword_defaultmenu = 11,
+-	scan_keyword_tape	= 12
++	scan_keyword_tape	= 12,
++	scan_keyword_optional	= 13
+ };
+ 
+ enum scan_section_type {
+--- s390-tools.orig/zipl/src/bootmap.c
++++ s390-tools/zipl/src/bootmap.c
+@@ -794,6 +794,12 @@
+ 		for (i=0; i < job->data.menu.num; i++) {
+ 			switch (job->data.menu.entry[i].id) {
+ 			case job_ipl:
++				if (job->data.menu.entry[i].data.ipl.ignore) {
++					printf("Ignore #%d: IPL section '%s'\n",
++					       job->data.menu.entry[i].pos,
++					       job->data.menu.entry[i].name);
++					break;
++				}
+ 				printf("Adding #%d: IPL section '%s'%s\n",
+ 				       job->data.menu.entry[i].pos,
+ 				       job->data.menu.entry[i].name,
+--- s390-tools.orig/zipl/src/scan.c
++++ s390-tools/zipl/src/scan.c
+@@ -28,22 +28,22 @@
+ 
+ /* Determines which keyword may be present in which section */
+ enum scan_key_state scan_key_table[SCAN_SECTION_NUM][SCAN_KEYWORD_NUM] = {
+-/*	 defa dump dump imag para parm ramd segm targ prom time defa tape
+- *	 ult  to   tofs e    mete file isk  ent  et   pt   out  ultm
++/*	 defa dump dump imag para parm ramd segm targ prom time defa tape opti
++ *	 ult  to   tofs e    mete file isk  ent  et   pt   out  ultm      onal
+  *			     rs                                 enu
+  */
+ /* defaultboot	*/
+-	{opt, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, opt, inv},
++	{opt, inv, inv, inv, inv, inv, inv, inv, inv, inv, inv, opt, inv, inv},
+ /* ipl		*/
+-	{inv, inv, inv, req, opt, opt, opt, inv, req, inv, inv, inv, inv},
++	{inv, inv, inv, req, opt, opt, opt, inv, req, inv, inv, inv, inv, opt},
+ /* segment load */
+-	{inv, inv, inv, inv, inv, inv, inv, req, req, inv, inv, inv, inv},
++	{inv, inv, inv, inv, inv, inv, inv, req, req, inv, inv, inv, inv, inv},
+ /* part dump	*/
+-	{inv, req, inv, inv, inv, inv, inv, inv, opt, inv, inv, inv, inv},
++	{inv, req, inv, inv, inv, inv, inv, inv, opt, inv, inv, inv, inv, inv},
+ /* fs dump	*/
+-	{inv, inv, req, inv, opt, opt, inv, inv, req, inv, inv, inv, inv},
++	{inv, inv, req, inv, opt, opt, inv, inv, req, inv, inv, inv, inv, inv},
+ /* ipl tape	*/
+-	{inv, inv, inv, req, opt, opt, opt, inv, inv, inv, inv, inv, req}
++	{inv, inv, inv, req, opt, opt, opt, inv, inv, inv, inv, inv, req, inv}
+ };
+ 
+ /* Mapping of keyword IDs to strings */
+@@ -63,7 +63,8 @@
+ 	{ "target", scan_keyword_target},
+ 	{ "prompt", scan_keyword_prompt},
+ 	{ "timeout", scan_keyword_timeout},
+-	{ "tape", scan_keyword_tape}
++	{ "tape", scan_keyword_tape},
++	{ "optional", scan_keyword_optional},
+ };
+ 
+ 
+--- s390-tools.orig/zipl/include/job.h
++++ s390-tools/zipl/include/job.h
+@@ -12,6 +12,8 @@
+ #ifndef JOB_H
+ #define JOB_H
+ 
++#include <stdbool.h>
++
+ #include "zipl.h"
+ 
+ 
+@@ -33,6 +35,8 @@
+ 	address_t image_addr;
+ 	address_t parm_addr;
+ 	address_t ramdisk_addr;
++	bool optional;
++	bool ignore;
+ };
+ 
+ struct job_segment_data {
+--- s390-tools.orig/zipl/src/job.c
++++ s390-tools/zipl/src/job.c
+@@ -358,14 +358,20 @@
+ 
+ 
+ static int
+-check_job_ipl_data(struct job_ipl_data *ipl, char* name)
++check_job_ipl_data(struct job_ipl_data *ipl, char* name, bool may_ignore)
+ {
+ 	int rc;
+ 
+ 	if (ipl->image != NULL) {
+ 		rc = misc_check_readable_file(ipl->image);
+ 		if (rc) {
+-			if (name == NULL) {
++			if (may_ignore && ipl->optional) {
++				printf("Ignore section '%s': Image file '%s'\n",
++						name, ipl->image);
++				error_clear_reason();
++				ipl->ignore = true;
++				return 0;
++			} else if (name == NULL) {
+ 				error_text("Image file '%s'", ipl->image);
+ 			} else {
+ 				error_text("Image file '%s' in section '%s'",
+@@ -377,7 +383,13 @@
+ 	if (ipl->ramdisk != NULL) {
+ 		rc = misc_check_readable_file(ipl->ramdisk);
+ 		if (rc) {
+-			if (name == NULL) {
++			if (ipl->optional) {
++				printf("Ignore section '%s': Ramdisc file '%s'\n",
++						name, ipl->ramdisk);
++				error_clear_reason();
++				ipl->ignore = true;
++				return 0;
++			} else if (name == NULL) {
+ 				error_text("Ramdisk file '%s'", ipl->ramdisk);
+ 			} else {
+ 				error_text("Ramdisk file '%s' in section '%s'",
+@@ -466,9 +478,13 @@
+ 		switch (menu->entry[i].id) {
+ 		case job_ipl:
+ 			rc = check_job_ipl_data(&menu->entry[i].data.ipl,
+-						menu->entry[i].name);
++						menu->entry[i].name, true);
+ 			if (rc)
+ 				return rc;
++			if (menu->default_pos == i + 1 && menu->entry[i].data.ipl.ignore) {
++				error_text("Can't ignore default entry.");
++				return -1;
++			}
+ 			break;
+ 		case job_dump_fs:
+ 			rc = check_job_dump_fs_data(
+@@ -560,7 +576,7 @@
+ 	case job_print_version:
+ 		break;
+ 	case job_ipl:
+-		return check_job_ipl_data(&job->data.ipl, job->name);
++		return check_job_ipl_data(&job->data.ipl, job->name, false);
+ 	case job_menu:
+ 		return check_job_menu_data(&job->data.menu);
+ 	case job_segment:
+@@ -767,6 +783,8 @@
+ 					DEFAULT_RAMDISK_ADDRESS;
+ 			}
+ 		}
++		job->data.ipl.optional = data[(int) scan_keyword_optional];
++		job->data.ipl.ignore = false;
+ 		break;
+ 	case section_ipl_tape:
+ 		/* Tape IPL job */



More information about the Kernel-svn-changes mailing list