summaryrefslogtreecommitdiff
path: root/util/sconfig/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/sconfig/main.c')
-rw-r--r--util/sconfig/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index 6c1824a0b1..4ac935e7b1 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -480,7 +480,7 @@ static void set_new_child(struct bus *parent, struct device *child)
struct device *new_device(struct bus *parent,
struct chip_instance *chip_instance,
const int bustype, const char *devnum,
- int enabled)
+ int status)
{
char *tmp;
int path_a;
@@ -511,7 +511,8 @@ struct device *new_device(struct bus *parent,
sprintf(name, "_dev%d", new_d->id);
new_d->name = name;
- new_d->enabled = enabled;
+ new_d->enabled = status & 0x01;
+ new_d->hidden = (status >> 1) & 0x01;
new_d->chip_instance = chip_instance;
chip_instance->ref_count++;
@@ -787,6 +788,7 @@ static void pass1(FILE *fil, struct device *ptr, struct device *next)
fprintf(fil, ptr->path, ptr->path_a, ptr->path_b);
fprintf(fil, "},\n");
fprintf(fil, "\t.enabled = %d,\n", ptr->enabled);
+ fprintf(fil, "\t.hidden = %d,\n", ptr->hidden);
fprintf(fil, "\t.on_mainboard = 1,\n");
if (ptr->subsystem_vendor > 0)
fprintf(fil, "\t.subsystem_vendor = 0x%04x,\n",