Display a more meaningful error when targetcli cannot change "dbroot"
Display a more meaningful error when targetcli cannot change "dbroot"

The "dbroot" configfs parameter allows to set the directory where
persistent information are stored by the kernel, such as persistent
reservations or ALUA.

Targetcli tries to change the value of the "dbroot" parameter from
/var/target/ to /etc/target/. However, if the directory passed to
"dbroot" does not exist, the kernel returns an "invalid argument"
error:

    # targetcli
    [Errno 22] Invalid argument

With this patch, a more meaningful message is displayed instead:

    # targetcli
    Cannot set dbroot to /etc/target. Please check if this directory exists.

This patch fixes issue #103.

Signed-off-by: Christophe Vu-Brugier <1930e27f67e1e10d51770b88cb06d386f1aa46ae@fastmail.fm>

cvubrugier/rtslib-fb