j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: laurent Date: 2009-02-05 22:33:23 +0100 (Thu, 05 Feb 2009) New Revision: 447
Modified: openbios-devel/modules/disk-label.c Log: disk-label: retrieve block-size on open
Modified: openbios-devel/modules/disk-label.c =================================================================== --- openbios-devel/modules/disk-label.c 2009-02-05 21:21:59 UTC (rev 446) +++ openbios-devel/modules/disk-label.c 2009-02-05 21:33:23 UTC (rev 447) @@ -24,6 +24,7 @@
ucell offs_hi, offs_lo; ucell size_hi, size_lo; + int block_size; int type; /* partition type or -1 */
ihandle_t part_ih; @@ -114,6 +115,12 @@ di->offs_hi = POP(); di->offs_lo = POP(); di->type = POP(); + di->block_size = 512; + xt = find_ih_method("block-size", di->part_ih); + if (xt) { + call_package(xt, di->part_ih); + di->block_size = POP(); + } }
/* probe for filesystem */ @@ -218,19 +225,7 @@ 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); + PUSH(di->block_size); }
NODE_METHODS( dlabel ) = {