#include <sys/mount.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/sysmacros.h>
#include <stdio.h>
#include <fcntl.h>
struct stat s;
if (stat(dev, &s)) {
- ERROR("Failed to stat %s\n", dev);
+ ERROR("Failed to stat %s: %m\n", dev);
return;
}