Skip to content

Commit

Permalink
lib: partition: Recursively find subpartitions
Browse files Browse the repository at this point in the history
  • Loading branch information
TravMurav committed Jul 19, 2021
1 parent aa83175 commit d7ac6af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/partition/partition.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ int partition_publish(const char *device, off_t offset)
partdev->label = strdup((char*)name);
partdev->is_gpt = true;

/* Some linux distros make use of subpartitions.
* Scan some devices recursively to publish them. */
if (strcmp(name, "system") == 0 || strcmp(name, "userdata") == 0)
partition_publish(subdevice, 0);

count++;
}
}
Expand Down

0 comments on commit d7ac6af

Please sign in to comment.