rpms/yaboot/devel yaboot-1.3.13-amigaparts.patch,1.2,1.3

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Jul 25 20:47:03 UTC 2005


Author: pnasrat

Update of /cvs/dist/rpms/yaboot/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv31491

Modified Files:
	yaboot-1.3.13-amigaparts.patch 
Log Message:
new files too

yaboot-1.3.13-amigaparts.patch:
 include/amiga-part.h |   42 +++++++++++++++++
 second/partition.c   |  125 ++++++++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 162 insertions(+), 5 deletions(-)

Index: yaboot-1.3.13-amigaparts.patch
===================================================================
RCS file: /cvs/dist/rpms/yaboot/devel/yaboot-1.3.13-amigaparts.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- yaboot-1.3.13-amigaparts.patch	25 Jul 2005 20:09:44 -0000	1.2
+++ yaboot-1.3.13-amigaparts.patch	25 Jul 2005 20:46:57 -0000	1.3
@@ -1,5 +1,5 @@
 --- yaboot-1.3.13/second/partition.c.amigaparts	2002-09-14 23:12:05.000000000 -0400
-+++ yaboot-1.3.13/second/partition.c	2005-07-25 16:03:32.000000000 -0400
++++ yaboot-1.3.13/second/partition.c	2005-07-25 16:31:32.000000000 -0400
 @@ -1,6 +1,8 @@
  /*
   *  partition.c - partition table support
@@ -17,7 +17,52 @@
  #include "partition.h"
  #include "prom.h"
  #include "string.h"
-@@ -213,6 +216,110 @@
+@@ -64,7 +67,7 @@
+ static void
+ add_new_partition(struct partition_t**	list, int part_number, const char *part_type,
+ 		  const char *part_name, unsigned long part_start, unsigned long part_size,
+-		  unsigned short part_blocksize)
++		  unsigned short part_blocksize, int sys_ind)
+ {
+      struct partition_t*	part;
+      part = (struct partition_t*)malloc(sizeof(struct partition_t));
+@@ -75,6 +78,7 @@
+      part->part_start = part_start;
+      part->part_size = part_size;
+      part->blocksize = part_blocksize;
++     part->sys_ind = sys_ind;
+ 
+      /* Tack this entry onto the list */
+      part->next = *list;
+@@ -146,7 +150,8 @@
+ 		    part->name, /* name */
+ 		    part->start_block + part->data_start, /* start */
+ 		    part->data_count, /* size */
+-		    ptable_block_size );
++		    ptable_block_size,
++		    0);
+      }
+ }
+ 
+@@ -167,14 +172,15 @@
+ 	  (struct fdisk_partition *) (block_buffer + 0x1be);
+ 
+      for (partition=1; partition <= 4 ;partition++, part++) {
+-	  if (part->sys_ind == LINUX_NATIVE) {
++	  if (part->sys_ind == LINUX_NATIVE || part->sys_ind == LINUX_RAID) {
+ 	       add_new_partition(  list,
+ 				   partition,
+ 				   "Linux", /* type */
+ 				   '\0', /* name */
+ 				   swab32(*(unsigned int *)(part->start4)),
+ 				   swab32(*(unsigned int *)(part->size4)),
+-				   512 /*blksize*/ );
++				   512 /*blksize*/,
++				   part->sys_ind /* partition type */ );
+ 	  }
+      }
+ }
+@@ -213,6 +219,111 @@
       return 0;
  }
  
@@ -121,16 +166,21 @@
 +		    '\0', /* name */
 +		    blockspercyl * amiga_block[AMIGA_PART_LOWCYL], /* start */
 +		    blockspercyl * (amiga_block[AMIGA_PART_HIGHCYL] - amiga_block[AMIGA_PART_LOWCYL] + 1), /* size */
-+		    prom_blksize );
++		    prom_blksize,
++		    0 );
 +	}
 +}
 +
  struct partition_t*
  partitions_lookup(const char *device)
  {
-@@ -260,6 +367,9 @@
+@@ -258,8 +369,12 @@
+ 			    '\0',
+ 			    iso_root_block,
  			    0,
- 			    prom_blksize);
+-			    prom_blksize);
++			    prom_blksize,
++			    0);
  	  prom_printf("ISO9660 disk\n");
 +     } else if (_amiga_find_rdb(device, disk, prom_blksize) != -1) {
 +	  /* amiga partition format */
@@ -138,3 +188,48 @@
       } else {
  	  prom_printf("No supported partition table detected\n");
  	  goto bail;
+--- yaboot-1.3.13/include/amiga-part.h.amigaparts	2005-07-25 16:46:13.000000000 -0400
++++ yaboot-1.3.13/include/amiga-part.h	2005-07-25 16:45:48.000000000 -0400
+@@ -0,0 +1,42 @@
++/*
++ *  amiga-part.h - Structure of amiga partition table
++ *
++ *  Copyright (C) 2004 Sven Luther <luther at debian.org>
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License as published by
++ *  the Free Software Foundation; either version 2 of the License, or
++ *  (at your option) any later version.
++ *
++ *  This program is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *  GNU General Public License for more details.
++ *
++ *  You should have received a copy of the GNU General Public License
++ *  along with this program; if not, write to the Free Software
++ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
++ */
++
++#define AMIGA_RDB_MAX	16
++#define AMIGA_ID_RDB	0x5244534B	/* 'RDSK' */
++#define AMIGA_ID_PART	0x50415254	/* 'PART' */
++#define AMIGA_END	0xffffffff
++
++#define AMIGA_ID		0
++#define AMIGA_LENGTH		1
++#define AMIGA_PARTITIONS	7
++#define AMIGA_CYL		16
++#define AMIGA_SECT		17
++#define AMIGA_HEADS		18
++#define AMIGA_RDBLIMIT		33
++
++
++#define AMIGA_PART_NEXT		4
++#define AMIGA_PART_FLAGS	8
++#define AMIGA_PART_LOWCYL	41
++#define AMIGA_PART_HIGHCYL	42
++#define AMIGA_PART_DOSTYPE	48
++
++#define	AMIGA_PART_BOOTABLE	0x1
++#define	AMIGA_PART_NOMOUNT	0x2




More information about the fedora-cvs-commits mailing list