• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/support/kconfig/symbol.c
Maxime HadjinlianMaxime Hadjinlian committed ebe6602463027 Dec 2013
Raw file
Source viewDiff to previous
    if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) {
 
1
/*
2
 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
3
 * Released under the terms of the GNU GPL v2.0.
4
 */
5
​
6
#include <ctype.h>
7
#include <stdlib.h>
8
#include <string.h>
9
#include <regex.h>
10
#include <sys/utsname.h>
11
​
12
#include "lkc.h"
13
​
14
struct symbol symbol_yes = {
15
    .name = "y",
16
    .curr = { "y", yes },
17
    .flags = SYMBOL_CONST|SYMBOL_VALID,
18
}, symbol_mod = {
19
    .name = "m",
20
    .curr = { "m", mod },
21
    .flags = SYMBOL_CONST|SYMBOL_VALID,
22
}, symbol_no = {
23
    .name = "n",
24
    .curr = { "n", no },
25
    .flags = SYMBOL_CONST|SYMBOL_VALID,
26
}, symbol_empty = {
27
    .name = "",
28
    .curr = { "", no },
29
    .flags = SYMBOL_VALID,
30
};
31
​
32
struct symbol *sym_defconfig_list;
33
struct symbol *modules_sym;
34
tristate modules_val;
35
​
36
struct expr *sym_env_list;
37
​
38
static void sym_add_default(struct symbol *sym, const char *def)
39
{
40
    struct property *prop = prop_alloc(P_DEFAULT, sym);
41
​
42
    prop->expr = expr_alloc_symbol(sym_lookup(def, SYMBOL_CONST));
43
}
44
​
45
void sym_init(void)
46
{
47
    struct symbol *sym;
48
    struct utsname uts;
49
    static bool inited = false;
50
​
51
    if (inited)
52
        return;
53
    inited = true;
54
​
55
    uname(&uts);
56
​
57
    sym = sym_lookup("UNAME_RELEASE", 0);
58
    sym->type = S_STRING;
59
    sym->flags |= SYMBOL_AUTO;
60
    sym_add_default(sym, uts.release);
61
}
62
​
63
enum symbol_type sym_get_type(struct symbol *sym)
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.