add more detail in automount error message

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
Dwight Engen 2013-10-15 13:50:58 -04:00 committed by Serge Hallyn
parent f10e04e361
commit c414be2526

View File

@ -800,10 +800,11 @@ static int lxc_mount_auto_mounts(struct lxc_conf *conf, int flags, struct cgroup
}
r = mount(source, destination, default_mounts[i].fstype, default_mounts[i].flags, default_mounts[i].options);
saved_errno = errno;
if (r < 0)
SYSERROR("error mounting %s on %s", source, destination);
free(source);
free(destination);
if (r < 0) {
SYSERROR("error mounting %s", default_mounts[i].destination);
errno = saved_errno;
return -1;
}