mirror of
https://github.com/vivier/EMILE.git
synced 2024-09-10 01:54:31 +00:00
Manage vga, modem and printer properties
This commit is contained in:
parent
c4b4ee30ac
commit
14a1b857f2
@ -139,6 +139,14 @@ static int get_info(char *image, int verbose)
|
|||||||
"vga", property) != -1)
|
"vga", property) != -1)
|
||||||
printf("vga %s\n", property);
|
printf("vga %s\n", property);
|
||||||
|
|
||||||
|
if (config_get_property(configuration,
|
||||||
|
"modem", property) != -1)
|
||||||
|
printf("modem %s\n", property);
|
||||||
|
|
||||||
|
if (config_get_property(configuration,
|
||||||
|
"printer", property) != -1)
|
||||||
|
printf("printer %s\n", property);
|
||||||
|
|
||||||
current = 0;
|
current = 0;
|
||||||
for (index = 0; index < 20; index++)
|
for (index = 0; index < 20; index++)
|
||||||
{
|
{
|
||||||
@ -228,8 +236,6 @@ static int set_config(char *image, int verbose, char *config_path,
|
|||||||
}
|
}
|
||||||
configuration[0] = 0;
|
configuration[0] = 0;
|
||||||
|
|
||||||
config_set_property(configuration, "vga", "default");
|
|
||||||
|
|
||||||
if (!emile_config_get(config, CONFIG_GESTALTID, &gestaltid))
|
if (!emile_config_get(config, CONFIG_GESTALTID, &gestaltid))
|
||||||
{
|
{
|
||||||
sprintf(buf, "%d", gestaltid);
|
sprintf(buf, "%d", gestaltid);
|
||||||
@ -248,6 +254,15 @@ static int set_config(char *image, int verbose, char *config_path,
|
|||||||
config_set_property(configuration, "timeout", buf);
|
config_set_property(configuration, "timeout", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!emile_config_get(config, CONFIG_VGA, buf))
|
||||||
|
config_set_property(configuration, "vga", buf);
|
||||||
|
|
||||||
|
if (!emile_config_get(config, CONFIG_MODEM, buf))
|
||||||
|
config_set_property(configuration, "modem", buf);
|
||||||
|
|
||||||
|
if (!emile_config_get(config, CONFIG_PRINTER, buf))
|
||||||
|
config_set_property(configuration, "printer", buf);
|
||||||
|
|
||||||
kernel_ondisk = NULL;
|
kernel_ondisk = NULL;
|
||||||
ramdisk_ondisk = NULL;
|
ramdisk_ondisk = NULL;
|
||||||
emile_config_read_first_entry(config);
|
emile_config_read_first_entry(config);
|
||||||
|
@ -432,8 +432,6 @@ static char *set_config(emile_config *config, int drive)
|
|||||||
|
|
||||||
configuration[0] = 0;
|
configuration[0] = 0;
|
||||||
|
|
||||||
config_set_property(configuration, "vga", "default");
|
|
||||||
|
|
||||||
if (!emile_config_get(config, CONFIG_GESTALTID, &gestaltid))
|
if (!emile_config_get(config, CONFIG_GESTALTID, &gestaltid))
|
||||||
{
|
{
|
||||||
sprintf(buf, "%d", gestaltid);
|
sprintf(buf, "%d", gestaltid);
|
||||||
@ -452,6 +450,17 @@ static char *set_config(emile_config *config, int drive)
|
|||||||
config_set_property(configuration, "timeout", buf);
|
config_set_property(configuration, "timeout", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!emile_config_get(config, CONFIG_VGA, buf))
|
||||||
|
config_set_property(configuration, "vga", buf);
|
||||||
|
else
|
||||||
|
config_set_property(configuration, "vga", "default");
|
||||||
|
|
||||||
|
if (!emile_config_get(config, CONFIG_MODEM, buf))
|
||||||
|
config_set_property(configuration, "modem", buf);
|
||||||
|
|
||||||
|
if (!emile_config_get(config, CONFIG_PRINTER, buf))
|
||||||
|
config_set_property(configuration, "printer", buf);
|
||||||
|
|
||||||
emile_config_read_first_entry(config);
|
emile_config_read_first_entry(config);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
@ -324,6 +324,9 @@ int emile_config_get(emile_config* config, int tag, ...)
|
|||||||
case CONFIG_PARTITION:
|
case CONFIG_PARTITION:
|
||||||
case CONFIG_FIRST_LEVEL:
|
case CONFIG_FIRST_LEVEL:
|
||||||
case CONFIG_SECOND_LEVEL:
|
case CONFIG_SECOND_LEVEL:
|
||||||
|
case CONFIG_VGA:
|
||||||
|
case CONFIG_MODEM:
|
||||||
|
case CONFIG_PRINTER:
|
||||||
s = va_arg(arg, char**);
|
s = va_arg(arg, char**);
|
||||||
*s = get_tag(config->header, tag);
|
*s = get_tag(config->header, tag);
|
||||||
ret = (*s == NULL) ? -1 : 0;
|
ret = (*s == NULL) ? -1 : 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user