summaryrefslogtreecommitdiffhomepage
path: root/src/driver
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-19 10:56:58 -0400
committermidipix <writeonce@midipix.org>2016-04-19 14:17:24 -0400
commit0b68ad7a3766033484f46ce4533da7b4f672662a (patch)
tree8aeddff93b01b88fce991ad7ce35b9f04d4ee487 /src/driver
parent4fdf35cdec0bf5e6bad4d805233803767dc6ce08 (diff)
downloadslibtool-0b68ad7a3766033484f46ce4533da7b4f672662a.tar.bz2
slibtool-0b68ad7a3766033484f46ce4533da7b4f672662a.tar.xz
driver: slbt_init_flavor_settings: allow initialization of alternate settings.
Diffstat (limited to 'src/driver')
-rw-r--r--src/driver/slbt_driver_ctx.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 36f1466..df83768 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -425,7 +425,9 @@ static int slbt_init_host_params(
return 0;
}
-static void slbt_init_flavor_settings(struct slbt_common_ctx * cctx)
+static void slbt_init_flavor_settings(
+ struct slbt_common_ctx * cctx,
+ struct slbt_flavor_settings * psettings)
{
const struct slbt_flavor_settings * settings;
@@ -447,7 +449,7 @@ static void slbt_init_flavor_settings(struct slbt_common_ctx * cctx)
else if (!strcmp(settings->imagefmt,"macho"))
cctx->drvflags |= SLBT_DRIVER_IMAGE_PE;
- memcpy(&cctx->settings,settings,sizeof(*settings));
+ memcpy(psettings,settings,sizeof(*settings));
}
static int slbt_init_version_info(
@@ -816,7 +818,9 @@ int slbt_get_driver_ctx(
slbt_free_driver_ctx(&ctx->ctx);
return -1;
} else
- slbt_init_flavor_settings(&ctx->cctx);
+ slbt_init_flavor_settings(
+ &ctx->cctx,
+ &ctx->cctx.settings);
}
/* version info */