Skip to content

Commit 60b3a97

Browse files
committed
confd: Coding style
1 parent e534c0b commit 60b3a97

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/confd/src/infix-system-software.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,24 +63,24 @@ static int infix_system_sw_set_boot_order(sr_session_ctx_t *session, uint32_t su
6363
const sr_val_t *val = &input[i];
6464

6565
if (i != 0)
66-
strlcat(boot_order, " ", sizeof(boot_order));
67-
strlcat(boot_order, val->data.string_val, sizeof(boot_order));
68-
}
69-
70-
if (fexist("/sys/firmware/devicetree/base/chosen/u-boot,version")) {
71-
if (systemf("fw_setenv BOOT_ORDER %s", boot_order)) {
72-
ERROR("Set-boot-order: Failed to set boot order in U-Boot");
73-
return SR_ERR_INTERNAL;
74-
}
75-
} else if (fexist("/mnt/aux/grub/grubenv")) {
76-
if (systemf("grub-editenv /mnt/aux/grub/grubenv set ORDER=\"%s\"", boot_order)) {
77-
ERROR("Set-boot-order: Failed to set boot order in Grub");
78-
return SR_ERR_INTERNAL;
79-
}
80-
} else {
81-
ERROR("No supported boot loader found");
82-
return SR_ERR_UNSUPPORTED;
83-
}
66+
strlcat(boot_order, " ", sizeof(boot_order));
67+
strlcat(boot_order, val->data.string_val, sizeof(boot_order));
68+
}
69+
70+
if (fexist("/sys/firmware/devicetree/base/chosen/u-boot,version")) {
71+
if (systemf("fw_setenv BOOT_ORDER %s", boot_order)) {
72+
ERROR("Set-boot-order: Failed to set boot order in U-Boot");
73+
return SR_ERR_INTERNAL;
74+
}
75+
} else if (fexist("/mnt/aux/grub/grubenv")) {
76+
if (systemf("grub-editenv /mnt/aux/grub/grubenv set ORDER=\"%s\"", boot_order)) {
77+
ERROR("Set-boot-order: Failed to set boot order in Grub");
78+
return SR_ERR_INTERNAL;
79+
}
80+
} else {
81+
ERROR("No supported boot loader found");
82+
return SR_ERR_UNSUPPORTED;
83+
}
8484

8585
return SR_ERR_OK;
8686
}

0 commit comments

Comments
 (0)