On 04/08/15 at 04:41pm, Baoquan He wrote:
On 04/08/15 at 02:52pm, Minfei Huang wrote:
> > diff --git a/kdump-lib.sh b/kdump-lib.sh
> > > index 2ad528e..75d7673 100755
> > > --- a/kdump-lib.sh
> > > +++ b/kdump-lib.sh
> > > @@ -135,7 +135,16 @@ get_fs_type_from_target()
> > >
> > > get_mntpoint_from_target()
> > > {
> > > - echo $(findmnt -k -f -n -r -o TARGET $1)
> > > + for _mnt in $(findmnt -k -n -r -o TARGET $1)
> > > + do
> > > + if ! is_bind_mount $_mnt; then
> > > + echo $_mnt
> > > + return
> >
> > You make a change against non bind mount case. non bind mount don't get
> > a mntpoint any more. Is that OK? And I don't see you explain it in patch
> > log.
> >
>
> Yes, the function get_mntpoint_from_target may fail, if all of the mount
> points are in bind mode. If so, kdump will raise the error message, and
> kill itself.
No, I mean a normal machine, just on my personal PC. I plan take a
kdump. Then here it returned a mntpoint from get_mntpoint_from_target,
but now it doesn't since it's not bind mount. Why it does't matter,
could you also explain it? Above what you mentioned is another issue.
Hi, bao.
Ok, I will add the log to explain the case that get_mntpoint_from_target
return NULL.
Thanks
Minfei