Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #173 from Seinlin/bug-1008239-v1.4
Browse files Browse the repository at this point in the history
Bug 1008239 v1.4
  • Loading branch information
rvandermeulen committed May 28, 2014
2 parents 84243c4 + fea08a4 commit e1dbe80
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Android.mk
Expand Up @@ -375,15 +375,20 @@ FSTAB_TYPE := recovery
# Linux fstab file format is like:
# /dev/... /system ext4
#
# We will first probe for any line starting with /dev that contains
# /system. If we find any, it means we have a Linux fstab.
# Linux fstab file format is also like(ubifs):
# system /system ubifs
#
# We will first probe for any line starting with '/dev' or
# NOT starting with '/' that contains /system.
# If we find any, it means we have a Linux fstab.
# Otherwise it means it's an Android recovery fstab.
define detect-partitions
$(eval FSTAB_FILE := $(basename $(notdir $(1))))

$(if $(FSTAB_FILE),
$(eval STARTS_WITH_DEV := $(shell grep '^/dev/' $(1) | grep '/system'))
$(if $(filter /system, $(STARTS_WITH_DEV)),
$(eval STARTS_WITH_NAME := $(shell grep -v '^\#' $(1) | grep -v '^/' | grep '/system'))
$(if $(filter /system, $(STARTS_WITH_DEV) $(STARTS_WITH_NAME)),
$(eval FSTAB_TYPE := linux))
$(info Extracting partitions from $(FSTAB_TYPE) fstab ($(1)))
Expand Down

0 comments on commit e1dbe80

Please sign in to comment.