Re: crash fails with incompatible arguments on current kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks Sebastian.
Dave - the patch looks good 
And yes, as you pointed out, the helper macros could use a new define
for LINUX_3_X_X.
Add this to the linuxdefs[]  list:
{"LINUX_3_X_X",         "(((LINUX_RELEASE) & 0xff0000) == 0x020000)"},

      -Luc

> -----Original Message-----
> From: crash-utility-bounces@xxxxxxxxxx [mailto:crash-utility-
> bounces@xxxxxxxxxx] On Behalf Of Sebastian Ott
> Sent: Monday, June 06, 2011 4:07 PM
> To: crash-utility@xxxxxxxxxx
> Subject: Re:  crash fails with incompatible arguments
on current
> kernel
> 
> 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;
>                          }
>                      }
>                  }
> 
> --
> Crash-utility mailing list
> Crash-utility@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/crash-utility


Confidentiality Notice: This e-mail (including any attachments) is intended only for the recipients named above. It may contain confidential or privileged information and should not be read, copied or otherwise used by any other person. If you are not a named recipient, please notify the sender of that fact and delete the e-mail from your system.



--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility


[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux