From: Bharata B R. <bha...@gm...> - 2015-04-16 09:09:23
|
From: Bharata B Rao <bh...@li...> If drc_index is used with -s option and the drc_index specified doesn't correspond to the first available unused LMB, get_available_lmb() ends up returning first available LMB that doesn't match the requested drc_index. Fix this by explicitly checking for drc_index when drc_index is specified with -s option. Signed-off-by: Bharata B Rao <bh...@li...> --- src/drmgr/drslot_chrp_mem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/drmgr/drslot_chrp_mem.c b/src/drmgr/drslot_chrp_mem.c index c12e363..02ca978 100644 --- a/src/drmgr/drslot_chrp_mem.c +++ b/src/drmgr/drslot_chrp_mem.c @@ -502,6 +502,9 @@ get_available_lmb(struct options *opts, struct dr_node *start_lmb) if ((strcmp(lmb->drc_name, opts->usr_drc_name)) && (lmb->drc_index != drc_index)) continue; + } else if (opts->usr_drc_index) { + if (lmb->drc_index != opts->usr_drc_index) + continue; } if (lmb->unusable) -- 2.1.0 |