/* --wimboot-config=FILE is short for an
* "add FILE /Windows/System32/WimBootCompress.ini" command.
*/
- struct wimlib_update_command cmd = {
- .op = WIMLIB_UPDATE_OP_ADD,
- .add = {
- .fs_source_path = wimboot_config,
- .wim_target_path =
- T("/Windows/System32/WimBootCompress.ini"),
- .config_file = NULL,
- .add_flags = 0,
- },
- };
+ struct wimlib_update_command cmd;
+
+ cmd.op = WIMLIB_UPDATE_OP_ADD;
+ cmd.add.fs_source_path = wimboot_config;
+ cmd.add.wim_target_path = T("/Windows/System32/WimBootCompress.ini");
+ cmd.add.config_file = NULL;
+ cmd.add.add_flags = 0;
+
ret = wimlib_update_image(wim, image, &cmd, 1,
update_flags, imagex_progress_func);
if (ret)
journaled_link(struct update_command_journal *j,
struct wim_dentry *subject, struct wim_dentry *parent)
{
- struct update_primitive prim = {
- .type = LINK_DENTRY,
- .link = {
- .subject = subject,
- .parent = parent,
- },
- };
+ struct update_primitive prim;
int ret;
+ prim.type = LINK_DENTRY;
+ prim.link.subject = subject;
+ prim.link.parent = parent;
+
ret = record_update_primitive(j, prim);
if (ret)
return ret;
static int
journaled_unlink(struct update_command_journal *j, struct wim_dentry *subject)
{
- int ret;
struct wim_dentry *parent;
+ struct update_primitive prim;
+ int ret;
if (dentry_is_root(subject))
parent = NULL;
else
parent = subject->parent;
- struct update_primitive prim = {
- .type = UNLINK_DENTRY,
- .link = {
- .subject = subject,
- .parent = parent,
- },
- };
+ prim.type = UNLINK_DENTRY;
+ prim.link.subject = subject;
+ prim.link.parent = parent;
ret = record_update_primitive(j, prim);
if (ret)