#include <dirent.h>
#include <stdarg.h>
#include <string.h>
+#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
(m->options) ? (m->options) : (""));
if (err)
ULOG_ERR("mounting %s (%s) as %s failed (%d) - %s\n",
- pr->dev, pr->type, target, err, strerror(err));
+ pr->dev, pr->type, target, errno, strerror(errno));
else
handle_swapfiles(true);
return err;
err = mount(pr->dev, target, pr->type, 0, "");
if (err)
ULOG_ERR("mounting %s (%s) as %s failed (%d) - %s\n",
- pr->dev, pr->type, target, err, strerror(err));
+ pr->dev, pr->type, target, errno, strerror(errno));
else
handle_swapfiles(true);
return err;
err = umount2(mp, MNT_DETACH);
if (err)
ULOG_ERR("unmounting %s (%s) failed (%d) - %s\n",
- pr->dev, mp, err, strerror(err));
+ pr->dev, mp, errno, strerror(errno));
else
ULOG_INFO("unmounted %s (%s)\n",
pr->dev, mp);
if (err)
ULOG_ERR("umount of %s failed (%d) - %s\n",
- mount_point, err, strerror(err));
+ mount_point, errno, strerror(errno));
free(mount_point);
return 0;
if (err) {
ULOG_ERR("extroot: mounting %s (%s) on %s failed: %d (%s)\n",
- pr->dev, pr->type, path, err, strerror(err));
+ pr->dev, pr->type, path, errno, strerror(errno));
} else if (m->overlay) {
err = check_extroot(path);
if (err)