Commit 8bf382ad authored by topjohnwu's avatar topjohnwu

Apparently, not every device uses emmc

parent 541ba357
...@@ -191,7 +191,10 @@ void unlock_blocks() { ...@@ -191,7 +191,10 @@ void unlock_blocks() {
return; return;
while((entry = readdir(dir))) { while((entry = readdir(dir))) {
if (entry->d_type == DT_BLK && strstr(entry->d_name, "mmc") != NULL) { if (entry->d_type == DT_BLK &&
strstr(entry->d_name, "ram") == NULL &&
strstr(entry->d_name, "loop") == NULL &&
strstr(entry->d_name, "dm-0") == NULL) {
snprintf(path, sizeof(path), "%s/%s", DEV_BLOCK, entry->d_name); snprintf(path, sizeof(path), "%s/%s", DEV_BLOCK, entry->d_name);
if ((fd = xopen(path, O_RDONLY)) < 0) if ((fd = xopen(path, O_RDONLY)) < 0)
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment