#include "udev_version.h"
#include "logging.h"
#include "udev_rules.h"
-#include "udev_db.h"
/* extract possible {attr} and move str behind it */
size_t bufsize;
if (file_map(filename, &buf, &bufsize) != 0) {
- err("can't open '%s'", filename);
+ err("can't open '%s': %s", filename, strerror(errno));
return -1;
}
import_keys_into_env(udev, buf, bufsize);
return 0;
}
-#define WAIT_LOOP_PER_SECOND 20
+#define WAIT_LOOP_PER_SECOND 50
static int wait_for_sysfs(struct udevice *udev, const char *file, int timeout)
{
char filename[PATH_SIZE];
info("file appeared after %i loops", (timeout * WAIT_LOOP_PER_SECOND) - loop-1);
return 0;
}
+ info("wait for %i mseconds", 1000 / WAIT_LOOP_PER_SECOND);
usleep(1000 * 1000 / WAIT_LOOP_PER_SECOND);
}
- info("waiting for '%s' failed", filename);
+ err("waiting for '%s' failed", filename);
return -1;
}