Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package linuxrc for openSUSE:Factory checked in at 2023-01-24 19:42:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/linuxrc (Old) and /work/SRC/openSUSE:Factory/.linuxrc.new.32243 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "linuxrc" Tue Jan 24 19:42:24 2023 rev:313 rq:1060465 version:8.19 Changes: -------- --- /work/SRC/openSUSE:Factory/linuxrc/linuxrc.changes 2022-10-27 13:53:16.252291604 +0200 +++ /work/SRC/openSUSE:Factory/.linuxrc.new.32243/linuxrc.changes 2023-01-24 20:25:49.710330737 +0100 @@ -1,0 +2,24 @@ +Mon Jan 23 16:09:55 UTC 2023 - wfe...@opensuse.org + +- merge gh#openSUSE/linuxrc#315 +- fix buffer overflow in debug log (bsc#1207403) +- 8.19 + +-------------------------------------------------------------------- +Mon Jan 23 12:21:50 UTC 2023 - wfe...@opensuse.org + +- merge gh#openSUSE/linuxrc#312 +- be careful switch_to_fb option takes care of textmode setting + (bsc#1206460) +- 8.18 + +-------------------------------------------------------------------- +Mon Jan 23 11:51:55 UTC 2023 - wfe...@opensuse.org + +- merge gh#openSUSE/linuxrc#311 +- support more general wicked firmware devices interface + (jsc#PED-3118, jsc#PED-967) +- add usenbft boot config setting (mainly to aid testing) +- 8.17 + +-------------------------------------------------------------------- Old: ---- linuxrc-8.16.tar.xz New: ---- linuxrc-8.19.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ linuxrc.spec ++++++ --- /var/tmp/diff_new_pack.dEv2Wx/_old 2023-01-24 20:25:50.258333541 +0100 +++ /var/tmp/diff_new_pack.dEv2Wx/_new 2023-01-24 20:25:50.258333541 +0100 @@ -17,7 +17,7 @@ Name: linuxrc -Version: 8.16 +Version: 8.19 Release: 0 Summary: SUSE Installation Program License: GPL-3.0+ ++++++ linuxrc-8.16.tar.xz -> linuxrc-8.19.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-8.16/VERSION new/linuxrc-8.19/VERSION --- old/linuxrc-8.16/VERSION 2022-10-26 17:17:07.000000000 +0200 +++ new/linuxrc-8.19/VERSION 2023-01-23 17:09:55.000000000 +0100 @@ -1 +1 @@ -8.16 +8.19 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-8.16/changelog new/linuxrc-8.19/changelog --- old/linuxrc-8.16/changelog 2022-10-26 17:17:07.000000000 +0200 +++ new/linuxrc-8.19/changelog 2023-01-23 17:09:55.000000000 +0100 @@ -1,3 +1,18 @@ +2023-01-23: 8.19 + - merge gh#openSUSE/linuxrc#315 + - fix buffer overflow in debug log (bsc#1207403) + +2023-01-23: 8.18 + - merge gh#openSUSE/linuxrc#312 + - be careful switch_to_fb option takes care of textmode setting + (bsc#1206460) + +2023-01-23: 8.17 + - merge gh#openSUSE/linuxrc#311 + - support more general wicked firmware devices interface + (jsc#PED-3118, jsc#PED-967) + - add usenbft boot config setting (mainly to aid testing) + 2022-10-26: 8.16 - merge gh#openSUSE/linuxrc#307 - s390x: support PCI-attached networking device (jsc#PED-619) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-8.16/file.c new/linuxrc-8.19/file.c --- old/linuxrc-8.16/file.c 2022-10-26 17:17:07.000000000 +0200 +++ new/linuxrc-8.19/file.c 2023-01-23 17:09:55.000000000 +0100 @@ -315,7 +315,8 @@ { key_sethostname, "SetHostname", kf_cfg + kf_cmd_early }, { key_debugshell, "DebugShell", kf_cfg + kf_cmd + kf_cmd_early }, { key_self_update, "SelfUpdate", kf_cfg + kf_cmd }, - { key_ibft_devices, "IBFTDevices", kf_cfg + kf_cmd }, + { key_firmware_devices, "FirmwareDevices", kf_cfg + kf_cmd }, + { key_firmware_devices, "IBFTDevices", kf_cfg + kf_cmd }, { key_linuxrc_core, "LinuxrcCore", kf_cfg + kf_cmd_early }, { key_norepo, "NoRepo", kf_cfg + kf_cmd }, { key_auto_assembly, "AutoAssembly", kf_cfg + kf_cmd_early }, @@ -328,6 +329,7 @@ { key_switch_to_fb, "SwitchToFB", kf_cfg + kf_cmd_early }, { key_edid, "EDID", kf_cmd_early }, { key_hypervisor, "Hypervisor", kf_cmd_early }, + { key_usenbft, "UseNBFT", kf_cfg + kf_cmd }, }; static struct { @@ -1466,6 +1468,10 @@ if(f->is.numeric) config.withfcoe = f->nvalue; break; + case key_usenbft: + if(f->is.numeric) config.usenbft = f->nvalue; + break; + case key_startshell: if(!*f->value) config.startshell = 1; if(f->is.numeric) config.startshell = f->nvalue; @@ -1844,8 +1850,12 @@ } break; - case key_ibft_devices: - slist_assign_values(&config.ifcfg.ibft, f->value); + case key_firmware_devices: + slist_assign_values(&config.ifcfg.firmware, f->value); + break; + + case key_firmware_types: + slist_assign_values(&config.ifcfg.firmware_types, f->value); break; case key_linuxrc_core: @@ -2076,6 +2086,7 @@ file_write_str(f, key_instsys_id, config.instsys_id); file_write_num(f, key_withiscsi, config.withiscsi); file_write_num(f, key_withfcoe, config.withfcoe); + file_write_num(f, key_usenbft, config.usenbft); file_write_num(f, key_startshell, config.startshell); file_write_num(f, key_y2gdb, config.y2gdb); file_write_num(f, key_kexec_reboot, config.kexec_reboot); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-8.16/file.h new/linuxrc-8.19/file.h --- old/linuxrc-8.16/file.h 2022-10-26 17:17:07.000000000 +0200 +++ new/linuxrc-8.19/file.h 2023-01-23 17:09:55.000000000 +0100 @@ -56,10 +56,10 @@ key_withipoib, key_upgrade, key_media_upgrade, key_ifcfg, key_defaultinstall, key_nanny, key_vlanid, key_sshkey, key_systemboot, key_sethostname, key_debugshell, key_self_update, - key_ibft_devices, key_linuxrc_core, key_norepo, key_auto_assembly, key_autoyast_parse, + key_firmware_devices, key_linuxrc_core, key_norepo, key_auto_assembly, key_autoyast_parse, key_device_auto_config, key_autoyast_passurl, key_rd_zdev, key_insmod_pre, - key_zram, key_zram_root, key_zram_swap, key_extend, key_switch_to_fb, key_edid, - key_hypervisor + key_zram, key_zram_root, key_zram_swap, key_extend, key_switch_to_fb, key_edid, key_hypervisor, + key_usenbft, key_firmware_types } file_key_t; typedef enum { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-8.16/global.h new/linuxrc-8.19/global.h --- old/linuxrc-8.16/global.h 2022-10-26 17:17:07.000000000 +0200 +++ new/linuxrc-8.19/global.h 2023-01-23 17:09:55.000000000 +0100 @@ -437,6 +437,7 @@ unsigned withiscsi; /**< iSCSI parameter */ unsigned withfcoe; /**< FCoE parameter */ unsigned withipoib; /**< IPoIB */ + unsigned usenbft; /**< use NBFT info to activate disk (for yast) */ unsigned restart_method; /**< 0: start new root fs, 1: reboot, 2: halt, 3: kexec */ unsigned efi_vars:1; /**< efi vars exist */ int efi; /**< use efi; -1 = auto */ @@ -721,7 +722,8 @@ slist_t *if_up; /**< network interfaces != lo that are 'up' */ char *current; /**< interface name for last written ifcfg file */ slist_t *to_global; /**< keys that go to global /etc/sysconfig/network/config */ - slist_t *ibft; /**< list of ibft interfaces (not to be configured by linuxrc) */ + slist_t *firmware; /**< list of network interfaces handled by firmware (they are not to be configured by linuxrc) */ + slist_t *firmware_types; /**< list of firmware interfaces types (e.g. ibft, nbft) */ } ifcfg; struct { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-8.16/linuxrc.c new/linuxrc-8.19/linuxrc.c --- old/linuxrc-8.16/linuxrc.c 2022-10-26 17:17:07.000000000 +0200 +++ new/linuxrc-8.19/linuxrc.c 2023-01-23 17:09:55.000000000 +0100 @@ -1036,10 +1036,16 @@ util_run_script("early_setup"); - file_read_info_file("file:/etc/ibft_devices", kf_cfg); + if(util_check_exist("/etc/firmware_devices")) { + file_read_info_file("file:/etc/firmware_devices", kf_cfg); + file_read_info_file("file:/etc/firmware_types", kf_cfg); + } + else if(util_check_exist("/etc/ibft_devices")) { + file_read_info_file("file:/etc/ibft_devices", kf_cfg); + } - // ibft interfaces are handled by wicked - for(sl = config.ifcfg.ibft; sl; sl = sl->next) { + // firmware interfaces are handled by wicked + for(sl = config.ifcfg.firmware; sl; sl = sl->next) { slist_append_str(&config.ifcfg.initial, sl->key); } @@ -1128,6 +1134,7 @@ if(iscsi_check()) config.withiscsi = 1; if(fcoe_check()) config.withfcoe = 1; + if(nbft_check()) config.usenbft = 1; LXRC_WAIT @@ -1493,6 +1500,8 @@ { char *current_console = get_console_device(); + unsigned textmode_initial = config.textmode; + util_set_serial_console(auto2_serial_console()); /* @@ -1517,6 +1526,8 @@ config.console ); kbd_switch_tty(0, 1); + /* restore user-provided textmode setting (util_set_serial_console() might have changed it) */ + config.textmode = textmode_initial; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-8.16/util.c new/linuxrc-8.19/util.c --- old/linuxrc-8.16/util.c 2022-10-26 17:17:07.000000000 +0200 +++ new/linuxrc-8.19/util.c 2023-01-23 17:09:55.000000000 +0100 @@ -1127,7 +1127,7 @@ char *s; hd_data_t *hd_data; slist_t *sl, *sl0 = NULL; - char buf[256]; + char *buf = NULL; language_t *lang; driver_t *drv; @@ -1143,13 +1143,13 @@ } } - sprintf(buf, "product = \"%s\"", config.product); + strprintf(&buf, "product = \"%s\"", config.product); slist_append_str(&sl0, buf); - sprintf(buf, "release version: %s", config.releasever ?: "unset"); + strprintf(&buf, "release version: %s", config.releasever ?: "unset"); slist_append_str(&sl0, buf); - sprintf(buf, + strprintf(&buf, "memory (MB): total %lld, free %lld (%lld), ramdisk %lld", (long long) config.memoryXXX.total >> 20, (long long) config.memoryXXX.current >> 20, @@ -1158,7 +1158,7 @@ ); slist_append_str(&sl0, buf); - sprintf(buf, + strprintf(&buf, "memory limits (MB): min %lld, yast %lld, image %lld", (long long) config.memoryXXX.min_free >> 20, (long long) config.memoryXXX.min_yast >> 20, @@ -1168,38 +1168,45 @@ util_get_ram_size(); - sprintf(buf, + strprintf(&buf, "RAM size (MB): total %lld, min %lld", (long long) (config.memoryXXX.ram >> 20), (long long) (config.memoryXXX.ram_min >> 20) ); slist_append_str(&sl0, buf); - sprintf(buf, "swap file size: %u MB", config.swap_file_size); + strprintf(&buf, "swap file size: %u MB", config.swap_file_size); slist_append_str(&sl0, buf); - sprintf(buf, + strprintf(&buf, "zram: root size \"%s\", swap size \"%s\"", config.zram.root_size ?: "", config.zram.swap_size ?: "" ); slist_append_str(&sl0, buf); - sprintf(buf, + strprintf(&buf, "InstsysID: %s%s", config.instsys_id ?: "unset", config.instsys_complain ? config.instsys_complain == 1 ? " (check)" : " (block)" : "" ); slist_append_str(&sl0, buf); - sprintf(buf, "InitrdID: %s", config.initrd_id ?: "unset"); + strprintf(&buf, "InitrdID: %s", config.initrd_id ?: "unset"); slist_append_str(&sl0, buf); for(sl = config.update.expected_name_list; sl; sl = sl->next) { - sprintf(buf, "expected update: %s", sl->key); + strprintf(&buf, "expected update: %s", sl->key); slist_append_str(&sl0, buf); } + /* + * For the following sequence of add_flag() calls, a large enough buffer + * is needed. add_flag() assumes a minimal buffer size of about + * 50 + maximal flag name length - so 256 should be big enough. + */ + buf = realloc(buf, 256); + sprintf(buf, "flags = "); add_flag(&sl0, buf, config.test, "test"); add_flag(&sl0, buf, config.tmpfs, "tmpfs"); @@ -1246,120 +1253,130 @@ if(*buf) slist_append_str(&sl0, buf); if(config.self_update_url) { - sprintf(buf, "self-update URL: %s", config.self_update_url); + strprintf(&buf, "self-update URL: %s", config.self_update_url); slist_append_str(&sl0, buf); } if(config.core) { - sprintf(buf, "Core Dumps: %s (%sactive)", config.core, config.core_setup ? "" : "not "); + strprintf(&buf, "Core Dumps: %s (%sactive)", config.core, config.core_setup ? "" : "not "); slist_append_str(&sl0, buf); } if(config.extern_scheme) { - strcpy(buf, "additional URL schemes:"); + strprintf(&buf, "additional URL schemes:"); slist_append_str(&sl0, buf); for(sl = config.extern_scheme; sl; sl = sl->next) { if(!sl->key) continue; - sprintf(buf, " %s: %s", sl->key, sl->value ?: ""); + strprintf(&buf, " %s: %s", sl->key, sl->value ?: ""); slist_append_str(&sl0, buf); } } - sprintf(buf, "net_config_mask = 0x%x", net_config_mask()); + strprintf(&buf, "net_config_mask = 0x%x", net_config_mask()); slist_append_str(&sl0, buf); - sprintf(buf, "netsetup = 0x%x/0x%x", config.net.do_setup, config.net.setup); + strprintf(&buf, "netsetup = 0x%x/0x%x", config.net.do_setup, config.net.setup); slist_append_str(&sl0, buf); if((s = url_print(config.url.install, 0))) { slist_append_str(&sl0, "install url:"); - sprintf(buf, " %s", s); + strprintf(&buf, " %s", s); slist_append_str(&sl0, buf); } if((s = url_print(config.url.instsys, 0))) { slist_append_str(&sl0, "instsys url:"); - sprintf(buf, " %s", s); + strprintf(&buf, " %s", s); slist_append_str(&sl0, buf); } if((s = url_print(config.url.proxy, 0))) { slist_append_str(&sl0, "proxy url:"); - sprintf(buf, " %s", s); + strprintf(&buf, " %s", s); slist_append_str(&sl0, buf); } if((s = url_print(config.url.autoyast, 0))) { slist_append_str(&sl0, "autoyast url:"); - sprintf(buf, " %s", s); + strprintf(&buf, " %s", s); slist_append_str(&sl0, buf); } if((s = url_print(config.url.autoyast, 5))) { slist_append_str(&sl0, "autoyast url (ay fmt):"); - sprintf(buf, " %s", s); + strprintf(&buf, " %s", s); slist_append_str(&sl0, buf); } if((s = url_print(config.url.autoyast2, 0))) { slist_append_str(&sl0, "autoyast2 url:"); - sprintf(buf, " %s", s); + strprintf(&buf, " %s", s); slist_append_str(&sl0, buf); } if((s = url_print(config.url.autoyast2, 5))) { slist_append_str(&sl0, "autoyast2 url (ay fmt):"); - sprintf(buf, " %s", s); + strprintf(&buf, " %s", s); slist_append_str(&sl0, buf); } - strcpy(buf, "net devices = ("); + strprintf(&buf, "net devices = ("); for(i = 0, sl = config.net.devices; sl; sl = sl->next) { if(!sl->key) continue; j = !config.net.device || strcmp(sl->key, config.net.device) ? 0 : 1; - sprintf(buf + strlen(buf), "%s%s%s", i ? ", " : " ", sl->key, j ? "*" : ""); - if(sl->value) sprintf(buf + strlen(buf), " [%s]", sl->value); + strprintf(&buf, "%s%s%s%s", buf, i ? ", " : " ", sl->key, j ? "*" : ""); + if(sl->value) strprintf(&buf, "%s [%s]", buf, sl->value); i = 1; } - strcat(buf, " )"); + strprintf(&buf, "%s )", buf); slist_append_str(&sl0, buf); if(config.ifcfg.initial) { - strcpy(buf, "initially configured network interfaces:"); + strprintf(&buf, "initially configured network interfaces:"); slist_append_str(&sl0, buf); for(sl = config.ifcfg.initial; sl; sl = sl->next) { if(!sl->key) continue; - sprintf(buf, " %s", sl->key); + strprintf(&buf, " %s", sl->key); + slist_append_str(&sl0, buf); + } + } + + if(config.ifcfg.firmware) { + strprintf(&buf, "firmware interfaces:"); + slist_append_str(&sl0, buf); + for(sl = config.ifcfg.firmware; sl; sl = sl->next) { + if(!sl->key) continue; + strprintf(&buf, " %s", sl->key); slist_append_str(&sl0, buf); } } - if(config.ifcfg.ibft) { - strcpy(buf, "ibft interfaces:"); + if(config.ifcfg.firmware_types) { + strprintf(&buf, "firmware interface types:"); slist_append_str(&sl0, buf); - for(sl = config.ifcfg.ibft; sl; sl = sl->next) { + for(sl = config.ifcfg.firmware_types; sl; sl = sl->next) { if(!sl->key) continue; - sprintf(buf, " %s", sl->key); + strprintf(&buf, " %s", sl->key); slist_append_str(&sl0, buf); } } if(config.ifcfg.if_state) { - strcpy(buf, "network interface states:"); + strprintf(&buf, "network interface states:"); slist_append_str(&sl0, buf); for(sl = config.ifcfg.if_state; sl; sl = sl->next) { if(!sl->key) continue; - sprintf(buf, " %s: %s", sl->key, sl->value); + strprintf(&buf, " %s: %s", sl->key, sl->value); slist_append_str(&sl0, buf); } } if(config.ifcfg.if_up) { - strcpy(buf, "up interfaces:"); + strprintf(&buf, "up interfaces:"); slist_append_str(&sl0, buf); for(sl = config.ifcfg.if_up; sl; sl = sl->next) { if(!sl->key) continue; - sprintf(buf, " %s", sl->key); + strprintf(&buf, " %s", sl->key); slist_append_str(&sl0, buf); } } @@ -1367,13 +1384,13 @@ if(config.ifcfg.all) { ifcfg_t *ifcfg; slist_t *sl_ifcfg; - strcpy(buf, "ifcfg entries:"); + strprintf(&buf, "ifcfg entries:"); slist_append_str(&sl0, buf); for(ifcfg = config.ifcfg.all; ifcfg; ifcfg = ifcfg->next) { sl_ifcfg = slist_split('\n', ifcfg_print(ifcfg)); for(sl = sl_ifcfg; sl; sl = sl->next) { if(*sl->key || ifcfg->next) { // keep newline between entries - sprintf(buf, "%s", sl->key); + strprintf(&buf, "%s", sl->key); slist_append_str(&sl0, buf); } } @@ -1384,12 +1401,12 @@ if(config.ifcfg.manual) { ifcfg_t *ifcfg = config.ifcfg.manual; slist_t *sl_ifcfg; - strcpy(buf, "manual ifcfg entry:"); + strprintf(&buf, "manual ifcfg entry:"); slist_append_str(&sl0, buf); sl_ifcfg = slist_split('\n', ifcfg_print(ifcfg)); for(sl = sl_ifcfg; sl; sl = sl->next) { if(*sl->key) { - sprintf(buf, "%s", sl->key); + strprintf(&buf, "%s", sl->key); slist_append_str(&sl0, buf); } } @@ -1397,65 +1414,65 @@ } if(config.ifcfg.to_global) { - strcpy(buf, "values to store in global network config file:"); + strprintf(&buf, "values to store in global network config file:"); slist_append_str(&sl0, buf); for(sl = config.ifcfg.to_global; sl; sl = sl->next) { if(!sl->key) continue; - sprintf(buf, " %s", sl->key); + strprintf(&buf, " %s", sl->key); slist_append_str(&sl0, buf); } } if(config.cdid) { - sprintf(buf, "cdrom id = %s", config.cdid); + strprintf(&buf, "cdrom id = %s", config.cdid); slist_append_str(&sl0, buf); } - sprintf(buf, "hostname = %s", inet2print(&config.net.hostname)); + strprintf(&buf, "hostname = %s", inet2print(&config.net.hostname)); slist_append_str(&sl0, buf); - sprintf(buf, "network = %s", inet2print(&config.net.network)); + strprintf(&buf, "network = %s", inet2print(&config.net.network)); slist_append_str(&sl0, buf); - sprintf(buf, "netmask = %s", inet2print(&config.net.netmask)); + strprintf(&buf, "netmask = %s", inet2print(&config.net.netmask)); slist_append_str(&sl0, buf); - sprintf(buf, "gateway = %s", inet2print(&config.net.gateway)); + strprintf(&buf, "gateway = %s", inet2print(&config.net.gateway)); slist_append_str(&sl0, buf); for(i = 0; i < config.net.nameservers; i++) { - sprintf(buf, "nameserver%d = %s", i + 1, inet2print(&config.net.nameserver[i])); + strprintf(&buf, "nameserver%d = %s", i + 1, inet2print(&config.net.nameserver[i])); slist_append_str(&sl0, buf); } if(config.net.vncpassword) { - sprintf(buf, "vncpassword = %s", config.net.vncpassword); + strprintf(&buf, "vncpassword = %s", config.net.vncpassword); slist_append_str(&sl0, buf); } if(config.net.sshpassword) { - sprintf(buf, "password = %s", config.net.sshpassword); + strprintf(&buf, "password = %s", config.net.sshpassword); slist_append_str(&sl0, buf); } if(config.net.sshpassword_enc) { - sprintf(buf, "encrypted password = %s", config.net.sshpassword_enc); + strprintf(&buf, "encrypted password = %s", config.net.sshpassword_enc); slist_append_str(&sl0, buf); } if(config.net.wlan.devices) { - sprintf(buf, "wlan interfaces%s:", config.net.wlan.devices_fixed ? " (fixed)" : ""); + strprintf(&buf, "wlan interfaces%s:", config.net.wlan.devices_fixed ? " (fixed)" : ""); slist_append_str(&sl0, buf); for(sl = config.net.wlan.devices; sl; sl = sl->next) { if(!sl->key) continue; - sprintf(buf, " %s", sl->key); + strprintf(&buf, " %s", sl->key); slist_append_str(&sl0, buf); } } if(config.net.wlan.auth) { static char *wlan_a[] = { "", "open", "wpa psk", "wpa eap" }; - sprintf(buf, "wlan auth = %d (%s)", + strprintf(&buf, "wlan auth = %d (%s)", config.net.wlan.auth, wlan_a[config.net.wlan.auth < sizeof wlan_a / sizeof *wlan_a ? config.net.wlan.auth : 0] ); @@ -1463,73 +1480,73 @@ } if(config.net.wlan.essid) { - sprintf(buf, "wlan essid = \"%s\"", config.net.wlan.essid); + strprintf(&buf, "wlan essid = \"%s\"", config.net.wlan.essid); slist_append_str(&sl0, buf); } if(config.net.wlan.wpa_psk) { - sprintf(buf, "wlan psk = \"%s\"", config.net.wlan.wpa_psk); + strprintf(&buf, "wlan psk = \"%s\"", config.net.wlan.wpa_psk); slist_append_str(&sl0, buf); } if(config.net.wlan.wpa_identity) { - sprintf(buf, "wlan eap id = \"%s\"", config.net.wlan.wpa_identity); + strprintf(&buf, "wlan eap id = \"%s\"", config.net.wlan.wpa_identity); slist_append_str(&sl0, buf); } if(config.net.wlan.wpa_password) { - sprintf(buf, "wlan eap pass = \"%s\"", config.net.wlan.wpa_password); + strprintf(&buf, "wlan eap pass = \"%s\"", config.net.wlan.wpa_password); slist_append_str(&sl0, buf); } - sprintf(buf, + strprintf(&buf, "timeouts: dhcp* = %ds, tftp = %ds", config.net.dhcp_timeout, config.net.tftp_timeout ); slist_append_str(&sl0, buf); if(config.net.retry) { - sprintf(buf, "max connection retries: %d", config.net.retry); + strprintf(&buf, "max connection retries: %d", config.net.retry); slist_append_str(&sl0, buf); } if(config.rootpassword) { - sprintf(buf, "rootpassword = %s", config.rootpassword); + strprintf(&buf, "rootpassword = %s", config.rootpassword); slist_append_str(&sl0, buf); } if(config.net.ifup_wait) { - sprintf(buf, "net config wait = %ds", config.net.ifup_wait); + strprintf(&buf, "net config wait = %ds", config.net.ifup_wait); slist_append_str(&sl0, buf); } lang = current_language(); - sprintf(buf, "language = %s, keymap = %s", lang->locale, config.keymap ?: ""); + strprintf(&buf, "language = %s, keymap = %s", lang->locale, config.keymap ?: ""); slist_append_str(&sl0, buf); - sprintf(buf, + strprintf(&buf, "dud = %d, updates = %d, dir = \"%s\"", config.update.ask, config.update.count, config.update.dir ); slist_append_str(&sl0, buf); if(config.term) { - sprintf(buf, "term = \"%s\"", config.term); + strprintf(&buf, "term = \"%s\"", config.term); slist_append_str(&sl0, buf); } - sprintf(buf, "console = \"%s\"", config.console); - if(config.serial) sprintf(buf + strlen(buf), ", serial line params = \"%s\"", config.serial); + strprintf(&buf, "console = \"%s\"", config.console); + if(config.serial) strprintf(&buf, "%s, serial line params = \"%s\"", buf, config.serial); slist_append_str(&sl0, buf); - sprintf(buf, "esc delay: %dms", config.escdelay); + strprintf(&buf, "esc delay: %dms", config.escdelay); slist_append_str(&sl0, buf); - sprintf(buf, "debug level = %d", config.debug); + strprintf(&buf, "debug level = %d", config.debug); slist_append_str(&sl0, buf); for(i = 0; i < sizeof config.log.dest / sizeof *config.log.dest; i++) { - sprintf(buf, + strprintf(&buf, "log[%d]: mask = 0x%x, name = %s, fd = %d", i, config.log.dest[i].level, @@ -1539,109 +1556,109 @@ slist_append_str(&sl0, buf); } - sprintf(buf, "rootimage = \"%s\"", config.rootimage); + strprintf(&buf, "rootimage = \"%s\"", config.rootimage); slist_append_str(&sl0, buf); if(config.rootimage2) { - sprintf(buf, "rootimage2 = \"%s\"", config.rootimage2); + strprintf(&buf, "rootimage2 = \"%s\"", config.rootimage2); slist_append_str(&sl0, buf); } - sprintf(buf, "rescueimage = \"%s\"", config.rescueimage); + strprintf(&buf, "rescueimage = \"%s\"", config.rescueimage); slist_append_str(&sl0, buf); if(config.extend_option) { - strcpy(buf, "extend option:"); + strprintf(&buf, "extend option:"); slist_append_str(&sl0, buf); for(sl = config.extend_option; sl; sl = sl->next) { if(!sl->key) continue; - sprintf(buf, " %s", sl->key); + strprintf(&buf, " %s", sl->key); slist_append_str(&sl0, buf); } } - sprintf(buf, "setup command = \"%s\"", config.setupcmd); + strprintf(&buf, "setup command = \"%s\"", config.setupcmd); slist_append_str(&sl0, buf); if(config.defaultrepo) { - strcpy(buf, "default repo locations:"); + strprintf(&buf, "default repo locations:"); slist_append_str(&sl0, buf); for(sl = config.defaultrepo; sl; sl = sl->next) { if(!sl->key) continue; - sprintf(buf, " %s", sl->key); + strprintf(&buf, " %s", sl->key); slist_append_str(&sl0, buf); } } if(config.module.broken) { - strcpy(buf, "broken modules:"); + strprintf(&buf, "broken modules:"); slist_append_str(&sl0, buf); for(sl = config.module.broken; sl; sl = sl->next) { if(!sl->key) continue; - sprintf(buf, " %s", sl->key); + strprintf(&buf, " %s", sl->key); slist_append_str(&sl0, buf); } } if(config.module.initrd) { - strcpy(buf, "extra initrd modules:"); + strprintf(&buf, "extra initrd modules:"); slist_append_str(&sl0, buf); for(sl = config.module.initrd; sl; sl = sl->next) { if(!sl->key) continue; - sprintf(buf, " %s", sl->key); + strprintf(&buf, " %s", sl->key); slist_append_str(&sl0, buf); } } if(config.ethtool) { - strcpy(buf, "ethtool options:"); + strprintf(&buf, "ethtool options:"); slist_append_str(&sl0, buf); for(sl = config.ethtool; sl; sl = sl->next) { - sprintf(buf, " %s: %s", sl->key, sl->value); + strprintf(&buf, " %s: %s", sl->key, sl->value); slist_append_str(&sl0, buf); } } if(config.cdroms) { - strcpy(buf, "cdroms:"); + strprintf(&buf, "cdroms:"); slist_append_str(&sl0, buf); for(sl = config.cdroms; sl; sl = sl->next) { if(!sl->key) continue; i = config.cdrom && !strcmp(sl->key, config.cdrom) ? 1 : 0; - sprintf(buf, " %s%s", sl->key, i ? "*" : ""); - if(sl->value) sprintf(buf + strlen(buf), " [%s]", sl->value); + strprintf(&buf, " %s%s", sl->key, i ? "*" : ""); + if(sl->value) strprintf(&buf, "%s [%s]", buf, sl->value); slist_append_str(&sl0, buf); } } if(config.disks) { - strcpy(buf, "disks:"); + strprintf(&buf, "disks:"); slist_append_str(&sl0, buf); for(sl = config.disks; sl; sl = sl->next) { if(!sl->key) continue; - sprintf(buf, " %s", sl->key); - if(sl->value) sprintf(buf + strlen(buf), " [%s]", sl->value); + strprintf(&buf, " %s", sl->key); + if(sl->value) strprintf(&buf, "%s [%s]", buf, sl->value); slist_append_str(&sl0, buf); } } if(config.partitions) { - strcpy(buf, "partitions:"); + strprintf(&buf, "partitions:"); slist_append_str(&sl0, buf); for(sl = config.partitions; sl; sl = sl->next) { if(!sl->key) continue; i = config.device && !strcmp(sl->key, config.device) ? 1 : 0; - sprintf(buf, " %s%s", sl->key, i ? "*" : ""); - if(sl->value) sprintf(buf + strlen(buf), " [%s]", sl->value); + strprintf(&buf, " %s%s", sl->key, i ? "*" : ""); + if(sl->value) strprintf(&buf, "%s [%s]", buf, sl->value); slist_append_str(&sl0, buf); } } if(config.module.drivers) { - strcpy(buf, "new driver info (v d sv sd c cm, module, sysfs, usage):"); + strprintf(&buf, "new driver info (v d sv sd c cm, module, sysfs, usage):"); slist_append_str(&sl0, buf); for(drv = config.module.drivers; drv; drv = drv->next) { - sprintf(buf, " %s, %s, %s, %u", + strprintf(&buf, " %s, %s, %s, %u", print_driverid(drv, 1), drv->name ?: "", drv->sysfs_name ?: "", @@ -1652,46 +1669,46 @@ } if(config.repomd_data) { - strcpy(buf, "repomd-data:"); + strprintf(&buf, "repomd-data:"); slist_append_str(&sl0, buf); for(sl = config.repomd_data; sl; sl = sl->next) { - sprintf(buf, " %s: %s", sl->key, sl->value); + strprintf(&buf, " %s: %s", sl->key, sl->value); slist_append_str(&sl0, buf); } } if(config.digests.supported) { - strcpy(buf, "digest types:"); + strprintf(&buf, "digest types:"); slist_append_str(&sl0, buf); for(sl = config.digests.supported; sl; sl = sl->next) { - sprintf(buf, " %s", sl->key); + strprintf(&buf, " %s", sl->key); slist_append_str(&sl0, buf); } } if(config.digests.list) { - strcpy(buf, "digests:"); + strprintf(&buf, "digests:"); slist_append_str(&sl0, buf); for(sl = config.digests.list; sl; sl = sl->next) { - sprintf(buf, " %s: %s", sl->key, sl->value); + strprintf(&buf, " %s: %s", sl->key, sl->value); slist_append_str(&sl0, buf); } } if(config.ptoptions) { - strcpy(buf, "user defined options:"); + strprintf(&buf, "user defined options:"); slist_append_str(&sl0, buf); for(sl = config.ptoptions; sl; sl = sl->next) { - sprintf(buf, " %s: %s", sl->key, sl->value ?: "<unset>"); + strprintf(&buf, " %s: %s", sl->key, sl->value ?: "<unset>"); slist_append_str(&sl0, buf); } } if(config.module.options) { - strcpy(buf, "module options:"); + strprintf(&buf, "module options:"); slist_append_str(&sl0, buf); for(sl = config.module.options; sl; sl = sl->next) { - sprintf(buf, " %s: %s", sl->key, sl->value); + strprintf(&buf, " %s: %s", sl->key, sl->value); slist_append_str(&sl0, buf); } } @@ -1708,6 +1725,7 @@ } slist_free(sl0); + free(buf); hd_free_hd_data(hd_data); free(hd_data); @@ -4555,6 +4573,17 @@ } +/* + * Don't actually do anything except checking for NBFT data. + * + * NBFT interfaces are handled by wicked. + */ +int nbft_check() +{ + return slist_getentry(config.ifcfg.firmware_types, "nbft") ? 1 : 0; +} + + /* * Get mac address from network interface name. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linuxrc-8.16/util.h new/linuxrc-8.19/util.h --- old/linuxrc-8.16/util.h 2022-10-26 17:17:07.000000000 +0200 +++ new/linuxrc-8.19/util.h 2023-01-23 17:09:55.000000000 +0100 @@ -133,6 +133,7 @@ int fcoe_check(void); int iscsi_check(void); +int nbft_check(void); char *interface_to_mac(char *device); char *mac_to_interface(char *mac, int *max_offset);