On 07/10/14 at 02:04pm, Vivek Goyal wrote:
On Tue, Jun 17, 2014 at 03:07:59PM +0800, WANG Chao wrote:
> In the later patch, the kdump error handler script can reuse some of the
> code in kdump.sh. So introduce a new kdump library kdump-lib-2.sh and
> put the common functions and variables there.
> kdump-lib-2.sh is only used in 2nd kernel, and kdump-lib.sh will
> automatically include it.
I think kdump-lib-2.sh is not very good name. How about
kdump-lib-initramfs.sh and specify that it is used only in the context
of when running from initramfs.
I think kdump-lib-initramfs.sh makes more sense to me. I'll use the
And this comment is confusing. If kdump-lib-2.sh can be used only in
second kernel, and kdump-lib.sh will include it that means it is being
used in first kernel too?
Right. It is confusing even to me when I look back :(
I'll try to make things clear.
Or we are trying to say that kdump-lib-2.sh can be used in both the
contexts while kdump-lib.sh can be used only while generating initramfs
and not while running from inside initramfs?
If yes, then a better naming might be.
kdump-lib-common.sh ----> A more generic library. This can be used in both
kdump-lib.sh --> Library which should be included only in code which runs
during initramfs generation.
How about the following:
kdump-lib.sh ----> A more generic library. This can be used in both
kdump-lib-initramfs.sh --> Library which should be included only in code
which runs during initramfs generation.
In 1st kernel, only kdump-lib.sh will be included. In 2nd kernel, both
kdump-lib.sh and kdump-lib-initramfs.sh will be included.
Does this make sense to you?