system/nxdiag: Fix issues introduced by #1776
Fix compilation issue by properly providing the defconfig name
This commit is contained in:
parent
e1fdbd7936
commit
890524c86f
@ -29,7 +29,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
#include <nuttx/info.h>
|
|
||||||
#include <nuttx/version.h>
|
#include <nuttx/version.h>
|
||||||
|
|
||||||
#include "sysinfo.h"
|
#include "sysinfo.h"
|
||||||
@ -260,7 +259,7 @@ int main(int argc, char *argv[])
|
|||||||
printf("\tBuild: %s\n", CONFIG_VERSION_BUILD);
|
printf("\tBuild: %s\n", CONFIG_VERSION_BUILD);
|
||||||
#endif
|
#endif
|
||||||
printf("\tArch: %s\n", CONFIG_ARCH);
|
printf("\tArch: %s\n", CONFIG_ARCH);
|
||||||
printf("\tConfig: %s\n\n", CONFIG_BASE_DEFCONFIG);
|
printf("\tDefconfig: %s\n\n", CONFIG_BASE_DEFCONFIG);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SYSTEM_NXDIAG_COMP_FLAGS
|
#ifdef CONFIG_SYSTEM_NXDIAG_COMP_FLAGS
|
||||||
|
@ -28,6 +28,14 @@ class validate_flags_arg(argparse.Action):
|
|||||||
# Common functions #
|
# Common functions #
|
||||||
|
|
||||||
|
|
||||||
|
def eprint(*args, **kwargs):
|
||||||
|
"""
|
||||||
|
Prints the arguments passed to stderr.
|
||||||
|
"""
|
||||||
|
|
||||||
|
print(*args, file=sys.stderr, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def get_installed_packages():
|
def get_installed_packages():
|
||||||
"""
|
"""
|
||||||
Gets the list of packages installed on the host system. This function works on
|
Gets the list of packages installed on the host system. This function works on
|
||||||
@ -112,7 +120,7 @@ def get_installed_packages():
|
|||||||
)
|
)
|
||||||
packages.append(f"{name} ({version})")
|
packages.append(f"{name} ({version})")
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
pass
|
eprint("Error: Failed to get installed packages.")
|
||||||
|
|
||||||
elif platform.system() == "Darwin":
|
elif platform.system() == "Darwin":
|
||||||
try:
|
try:
|
||||||
@ -130,7 +138,7 @@ def get_installed_packages():
|
|||||||
version = "Unknown"
|
version = "Unknown"
|
||||||
packages.append(f"{package} ({version})")
|
packages.append(f"{package} ({version})")
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
pass
|
eprint("Error: Failed to get installed packages.")
|
||||||
|
|
||||||
packages.sort()
|
packages.sort()
|
||||||
return packages
|
return packages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user