Commit e192d214 authored by Alessandro Rubini's avatar Alessandro Rubini

bug fix: wrs_version: print errors to stderr not stdout

Without this, the upgrade procedure from v4.0 failed to preserve
the mac address. This fixes the bug which is explained here below.

What happened is that the new filesystem (v4.1) returns UNKNOWN as
fpga type, because no hwinfo is there.  This UNKNOWN should be turned
into the default type LX240T, so the fpga is programmed and everything
proceeds.

However, "UNKNOWN" is intermixed with the (expected) error message,
so no LX240T is selected and loading fpga fails.

Later, "ifconifg wr0" fails to retrieve the mac address, because no
WR drivers are running, and the generation of hwinfo fails as well.
As a result, after the second reboot (see user manual) there MAC
address for WR interfaces was not preserved.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent e0f6fa9e
......@@ -102,7 +102,8 @@ static char *sdb_get(char *fname, char *tagname)
drvdata.f = f;
i = sdbfs_dev_create(&sdb_instance);
if (i != 0) {
printf("Error accessing SDB filesystem in \"%s\"\n",
fprintf(stderr,
"Error accessing SDB filesystem in \"%s\"\n",
SDBFS_NAME);
f = NULL;
return unknown;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment