On 03/17/14 at 10:57am, Vivek Goyal wrote:
On Mon, Mar 17, 2014 at 10:48:46PM +0800, Baoquan He wrote:
[..]
> > > + if [ ! -d $SAVE_PATH ]; then
> > > + perror_exit "Please check if path:$SAVE_PATH has been
created."
> > > + fi
> >
> > Why are you not using check_save_path_fs() you intorduced in previous
> > patch.
> >
> In check_save_path_fs(), the path is consist of $mntpoint and $path,
> while default dump target it's just $path. That function can not be
> reused here.
In that case, let us change the check_save_path_fs() function and let us
pass the full path from the root. All the magic to construct full path
from mount point should hapeen outside the function. (or even with a
separate helper function say make_path(), which takes mount point and
SAVE_PATH as input.
OK, will change.