Hi,
..another one (if the kernel gets renamed from 3.0.0-rc to 3.0) - in order
to help sial scripts that rely on LINUX_RELEASE we should do something
like:
---
extensions/sial.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/extensions/sial.c
+++ b/extensions/sial.c
@@ -621,12 +621,17 @@ How to extract basic set of -D flags fro
if(tok) tok=strtok(NULL, " \t");
if(tok) tok=strtok(NULL, " \t");
if(tok) {
- int two, major, minor, ret;
- ret = sscanf(tok, "%d.%d.%d-", &two, &major,
&minor);
- if( ret == 3) {
- sprintf(banner, "0x%02x%02x%02x", two, major,
minor);
+ int version, patchlevel, sublevel, ret;
+ ret = sscanf(tok, "%d.%d.%d-", &version,
&patchlevel, &sublevel);
+ switch (ret) {
+ case 2:
+ sublevel = 0;
+ case 3:
+ sprintf(banner, "0x%02x%02x%02x", version, patchlevel, sublevel);
dt=sial_add_def(dt, sial_strdup("LINUX_RELEASE"),
sial_strdup(banner));
sial_msg("Core LINUX_RELEASE == '%s'\n",
tok);
+ default:
+ break;
}
}
}