j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: 2008-12-18 21:44:20 +0100 (Thu, 18 Dec 2008) New Revision: 291
Modified: openbios-devel/modules/disk-label.c openbios-devel/modules/mac-parts.c openbios-devel/modules/pc-parts.c openbios-devel/modules/sun-parts.c Log: Add block-size to partition packages.
Yaboot uses "block-size" with disk-label packages.
This patch add block-size to all partitions packages.
Signed-off-by: Laurent Vivier Laurent@lvivier.info
Modified: openbios-devel/modules/disk-label.c =================================================================== --- openbios-devel/modules/disk-label.c 2008-12-15 20:35:31 UTC (rev 290) +++ openbios-devel/modules/disk-label.c 2008-12-18 20:44:20 UTC (rev 291) @@ -200,12 +200,30 @@ PUSH(0); }
+static void +dlabel_block_size( dlabel_info_t *di ) +{ + xt_t xt; + + if( !di->part_ih ) + goto no_handler; + + xt = find_ih_method("block-size", di->part_ih); + if ( !xt ) + goto no_handler; + + call_package( xt , di->part_ih ); + return; +no_handler: + PUSH(512); +} + NODE_METHODS( dlabel ) = { { "open", dlabel_open }, { "close", dlabel_close }, { "offset", dlabel_offset }, { "load", dlabel_load }, - + { "block-size", dlabel_block_size }, { "read", dlabel_read }, { "write", dlabel_write }, { "seek", dlabel_seek },
Modified: openbios-devel/modules/mac-parts.c =================================================================== --- openbios-devel/modules/mac-parts.c 2008-12-15 20:35:31 UTC (rev 290) +++ openbios-devel/modules/mac-parts.c 2008-12-18 20:44:20 UTC (rev 291) @@ -119,6 +119,12 @@ }
static void +macparts_block_size( __attribute__((unused))macparts_info_t *di ) +{ + PUSH(512); +} + +static void macparts_initialize( macparts_info_t *di ) { fword("register-partition-package"); @@ -128,6 +134,7 @@ { "probe", macparts_probe }, { "open", macparts_open }, { "get-info", macparts_get_info }, + { "block-size", macparts_block_size }, { NULL, macparts_initialize }, };
Modified: openbios-devel/modules/pc-parts.c =================================================================== --- openbios-devel/modules/pc-parts.c 2008-12-15 20:35:31 UTC (rev 290) +++ openbios-devel/modules/pc-parts.c 2008-12-18 20:44:20 UTC (rev 291) @@ -186,6 +186,12 @@ }
static void +pcparts_block_size( __attribute__((unused))pcparts_info_t *di ) +{ + PUSH(512); +} + +static void pcparts_initialize( pcparts_info_t *di ) { fword("register-partition-package"); @@ -195,6 +201,7 @@ { "probe", pcparts_probe }, { "open", pcparts_open }, { "get-info", pcparts_get_info }, + { "block-size", pcparts_block_size }, { NULL, pcparts_initialize }, };
Modified: openbios-devel/modules/sun-parts.c =================================================================== --- openbios-devel/modules/sun-parts.c 2008-12-15 20:35:31 UTC (rev 290) +++ openbios-devel/modules/sun-parts.c 2008-12-18 20:44:20 UTC (rev 291) @@ -173,6 +173,12 @@ }
static void +sunparts_block_size( __attribute__((unused))sunparts_info_t *di ) +{ + PUSH(512); +} + +static void sunparts_initialize( __attribute__((unused))sunparts_info_t *di ) { fword("register-partition-package"); @@ -182,6 +188,7 @@ { "probe", sunparts_probe }, { "open", sunparts_open }, { "get-info", sunparts_get_info }, + { "block-size", sunparts_block_size }, { NULL, sunparts_initialize }, };