Skip to content

Commit

Permalink
Add mmcblkN files to devices list
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-utkin committed Jan 7, 2017
1 parent 22c427f commit c43c489
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libdevcheck/libdevcheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ DC_Dev *dc_dev_list_get_entry(DC_DevList *list, int index) {
static void dev_list_build(DC_DevList *dc_devlist) {

int is_whole_disk(const char *name) {
// SD cards have "mmcblkN" for whole devices,
// and "mmcblkNpM" for partitions
if (!strncmp(name, "mmcblk", 6)) {
return !strchr(name + 6, 'p');
}
// taken from util-linux-2.19.1/lib/wholedisk.c
while (*name)
name++;
Expand Down

0 comments on commit c43c489

Please sign in to comment.