Merge remote-tracking branch 'qcom_sm8250/lineage-20' into lineage-21
Change-Id: I3159ae2c81329a81f9f6d4feba3fd1324a86b4f6
This commit is contained in:
17
init/Kconfig
17
init/Kconfig
@@ -8,6 +8,23 @@ config DEFCONFIG_LIST
|
||||
default ARCH_DEFCONFIG
|
||||
default "arch/$(ARCH)/defconfig"
|
||||
|
||||
config CC_VERSION_TEXT
|
||||
string
|
||||
default "$(CC_VERSION_TEXT)"
|
||||
help
|
||||
This is used in unclear ways:
|
||||
|
||||
- Re-run Kconfig when the compiler is updated
|
||||
The 'default' property references the environment variable,
|
||||
CC_VERSION_TEXT so it is recorded in include/config/auto.conf.cmd.
|
||||
When the compiler is updated, Kconfig will be invoked.
|
||||
|
||||
- Ensure full rebuild when the compier is updated
|
||||
include/linux/kconfig.h contains this option in the comment line so
|
||||
fixdep adds include/config/cc/version/text.h into the auto-generated
|
||||
dependency. When the compiler is updated, syncconfig will touch it
|
||||
and then every file will be rebuilt.
|
||||
|
||||
config CC_IS_GCC
|
||||
def_bool $(success,$(CC) --version | head -n 1 | grep -q gcc)
|
||||
|
||||
|
||||
@@ -33,4 +33,4 @@ include/generated/compile.h: FORCE
|
||||
@$($(quiet)chk_compile.h)
|
||||
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
|
||||
"$(UTS_MACHINE)" "$(CONFIG_SMP)" "$(CONFIG_PREEMPT)" \
|
||||
"$(CC) $(KBUILD_CFLAGS)" "$(LD)"
|
||||
$(CONFIG_CC_VERSION_TEXT) "$(LD)"
|
||||
|
||||
@@ -167,6 +167,24 @@ static dev_t devt_from_partuuid(const char *uuid_str)
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* match_dev_by_label - callback for finding a partition using its label
|
||||
* @dev: device passed in by the caller
|
||||
* @data: opaque pointer to the label to match
|
||||
*
|
||||
* Returns 1 if the device matches, and 0 otherwise.
|
||||
*/
|
||||
static int match_dev_by_label(struct device *dev, const void *data)
|
||||
{
|
||||
const char *label = data;
|
||||
struct hd_struct *part = dev_to_part(dev);
|
||||
|
||||
if (part->info && !strcmp(label, part->info->volname))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -190,6 +208,8 @@ static dev_t devt_from_partuuid(const char *uuid_str)
|
||||
* a partition with a known unique id.
|
||||
* 8) <major>:<minor> major and minor number of the device separated by
|
||||
* a colon.
|
||||
* 9) PARTLABEL=<name> with name being the GPT partition label.
|
||||
* MSDOS partitions do not support labels!
|
||||
*
|
||||
* If name doesn't have fall into the categories above, we return (0,0).
|
||||
* block_class is used to check if something is a disk name. If the disk
|
||||
@@ -211,6 +231,17 @@ dev_t name_to_dev_t(const char *name)
|
||||
if (!res)
|
||||
goto fail;
|
||||
goto done;
|
||||
} else if (strncmp(name, "PARTLABEL=", 10) == 0) {
|
||||
struct device *dev;
|
||||
|
||||
dev = class_find_device(&block_class, NULL, name + 10,
|
||||
&match_dev_by_label);
|
||||
if (!dev)
|
||||
goto fail;
|
||||
|
||||
res = dev->devt;
|
||||
put_device(dev);
|
||||
goto done;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user