[Crash-utility] [PATCH] extensions, ptdump: Add error message when the crash analyses a live system.
Takao Indoh
indou.takao at jp.fujitsu.com
Tue Jun 13 10:29:00 UTC 2017
Hi Dave, Inoguchi-san,
Sorry for delayed response.
This patch looks good to me.
Thanks,
Takao Indoh
On 2017/06/12 23:31, Dave Anderson wrote:
>
>
> ----- Original Message -----
>>
>>
>> ----- Original Message -----
>>> Hi, Indoh-san,
>>>
>>> ptdump does not support retrieving the trace data from the live system.
>>> However, the current error message does not tell so.
>>> When the crash analyses a live system, ptdump only displays the following
>>> message:
>>>
>>> crash> ptdump foo
>>> ptdump: invalid size request: 0 type: "read page for write"
>>>
>>> I think it's better to have a different message to let users know why error occurs.
>>> Therefore, I added the following error message in ptdump:
>>>
>>> crash> ptdump foo
>>> ptdump: no support on live system
>>>
>>> Please merge this patch.
>>
>> Hello Yugi,
>>
>> In the absence of a response from Takao, I will go ahead and update
>> the package next week.
>>
>> Thanks,
>> Dave
>
> Hi Yugi,
>
> I went ahead and created a ptdump-1.0.6 package with your patch applied:
>
> http://people.redhat.com/anderson/extensions.html#PTDUMP
>
> Thanks,
> Dave
>
>
>>
>>>
>>> ---
>>> ptdump.c | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/ptdump.c b/ptdump.c
>>> index 8d5c367..44b19fb 100644
>>> --- a/ptdump.c
>>> +++ b/ptdump.c
>>> @@ -491,6 +491,9 @@ cmd_ptdump(void)
>>> if (argcnt != 2)
>>> cmd_usage(pc->curcmd, SYNOPSIS);
>>>
>>> + if (ACTIVE())
>>> + error(FATAL, "no support on live system\n");
>>> +
>>> outdir = args[1];
>>> if ((ret = mkdir(outdir, mode))) {
>>> fprintf(fp, "Cannot create directory %s: %d\n", outdir,
>>> ret);
>>> --
>>> 1.8.3.1
>>>
>>> Regards,
>>> --
>>> Yuki Inoguchi
>>>
>>>
>>> --
>>> Crash-utility mailing list
>>> Crash-utility at redhat.com
>>> https://www.redhat.com/mailman/listinfo/crash-utility
>>>
>>
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
>
More information about the Crash-utility
mailing list