![]() ![]() Especially if you have to deal often with data, investing some time in doing things efficiently will pay off. And we will include specific use-cases which are common for system administrators and security professionals. Although these sources are a great reference, we will be showing the grep command by example. The man page is very extensive, so is the online help documentation. Why learn the grep command and regular expressions?Īs with every tool, it is often easy to start using it, but hard to really master it. It is common to use it for checking configuration files and searching through log files. We want to leverage the full potential of the grep command, as it can be used in many work-related or personal related activities. But with all information scattered, most people don’t take the time to really learn the most basic commands. One of the reasons to create this blog post is that there are a lot of examples available for the grep command. Searching inside compressed data (avoid using gunzip!).Find lines ending with a specific string.Find lines starting with a specific string.Recursive search through directories and files.Why learn the grep command and regular expressions?.+ zconf_curname(), zconf_lineno(), $2->name, $2->name) ĭiff -git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol. + printd(DEBUG_PARSE, "%s:%d: uses: depends on %s || ! %s\n", + menu_add_dep(expr_alloc_two(E_OR, symexpr, expr_alloc_one(E_NOT, symexpr))) + struct expr *symexpr = expr_alloc_symbol($2) +/* uses symbol: depends on symbol || !symbol */ Printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()) * help option -418,6 +423,16 depends: T_DEPENDS T_ON expr T_EOL Source_stmt: T_SOURCE T_WORD_QUOTE -384,6 +388,7 comment_stmt: comment comment_option_list +++ -57,6 +57,7 static struct menu *current_menu, *current_entry If (sym->type != S_BOOLEAN & sym->type != S_TRISTATE)ĭiff -git a/scripts/kconfig/parser.y b/scripts/kconfig/parser.y + prop->type = P_IMPLY ? "imply" : "uses" + use = prop->type = P_SELECT ? "select" : use = prop->type = P_SELECT ? "select" : "imply" +++ -274,7 +274,9 static void sym_check_prop(struct symbol *sym) "defconfig_list" return T_DEFCONFIG_LIST ĭiff -git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c P_SYMBOL, /* where a symbol is defined */ĭiff -git a/scripts/kconfig/lexer.l b/scripts/kconfig/lexer.l P_RANGE, /* range 7.100 (for a symbol) */ While normal dependencies reduce the upper limit of a symbol (seeĭiff -git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h + To understand how (symbol || !symbol) is actually computed, please see `Menu dependencies`_ + For example: if FOO=y and BAR=m, FOO will be forced to m. + uses BAR, make sure it can reach/use BAR when possible. + Semantically it means, if FOO is enabled (y/m) and has the option: + Equivalent to: depends on symbol || !symbol a/Documentation/kbuild/kconfig-language.rst Scripts/kconfig/parser.y | 15 +++++++++++++++Ħ files changed, 32 insertions(+), 1 deletion(-)ĭiff -git a/Documentation/kbuild/kconfig-language.rst b/Documentation/kbuild/kconfig-language.rst Uses BAR, make sure it can reach/use BAR when possible.įor example: if FOO=y and BAR=m, FOO will be forced to m. Semantically it means, if FOO is enabled (y/m) and has the option: To solve this and hide this weird expression and to avoid repetitionĪcross the tree, we introduce new keyword "uses" to the Kconfig optionsĮquivalent to: depends on symbol || !symbol But, (BAR || !BAR) is reallyĬonfusing for those who don't really get how kconfig tristate arithmetics The 2nd one is the preferred approach, and will guarantee BAR is always Setting FOO=y and BAR=m, FOO will never reach BAR even though both are The first option is not desirable, and will leave the user confused when in FOO's Kconfig add: depends on (BAR || !BAR) use IS_REACHABLE(BAR), everywhere BAR is referenced inside FOO.Ģ. Which might now introduce build/link errors.ġ. Is now broken if it was using imply to force dependency restrictions.Į.g.: FOO needs BAR to be reachable, especially when FOO=y and BAR=m. Messages sorted by: ĭue to the changes to the semantics of imply keyword, which nowĭoesn't force any config options to the implied configs any more.Ī module (FOO) that has a weak dependency on some other modules (BAR).Next in thread: Saeed Mahameed: " net/mlx5: Kconfig: Use "uses" instead of "imply"".Previous message: Daniel Drake: "Re: iommu: Move iommu_group setup to IOMMU core code".Next message: Saeed Mahameed: " net/mlx5: Kconfig: Use "uses" instead of "imply"".Linux-Kernel Archive: Kconfig: Introduce "uses" keyword Kconfig: Introduce "uses" keyword From: Saeed Mahameed ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |