From: Lawrence S. <ljs...@us...> - 2015-05-21 03:12:32
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via b1d4d7d62b04ab1507a962cf372e171e04a26f6d (commit) from 51634bdb6cfecfe02ddd778edef2cdbc3f8f7e7e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b1d4d7d62b04ab1507a962cf372e171e04a26f6d Author: Lawrence Sebald <ljs...@us...> Date: Wed May 20 23:12:07 2015 -0400 Fix network/isp-settings example. ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/network/isp-settings/Makefile | 4 +-- .../dreamcast/network/isp-settings/isp-settings.c | 35 +++++++++----------- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/examples/dreamcast/network/isp-settings/Makefile b/examples/dreamcast/network/isp-settings/Makefile index 5aedd1b..445700e 100644 --- a/examples/dreamcast/network/isp-settings/Makefile +++ b/examples/dreamcast/network/isp-settings/Makefile @@ -12,8 +12,7 @@ rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \ - $(OBJS) $(OBJEXTRA) $(KOS_LIBS) + kos-cc -o $(TARGET) $(OBJS) $(OBJEXTRA) run: $(TARGET) $(KOS_LOADER) $(TARGET) @@ -21,4 +20,3 @@ run: $(TARGET) dist: rm -f $(OBJS) $(KOS_STRIP) $(TARGET) - diff --git a/examples/dreamcast/network/isp-settings/isp-settings.c b/examples/dreamcast/network/isp-settings/isp-settings.c index cd5845d..c4e6dee 100644 --- a/examples/dreamcast/network/isp-settings/isp-settings.c +++ b/examples/dreamcast/network/isp-settings/isp-settings.c @@ -1,10 +1,12 @@ /* KallistiOS ##version## isp-settings.c - Copyright (C)2004 Dan Potter + Copyright (C) 2004 Dan Potter + Copyright (C) 2015 Lawrence Sebald */ -#include <kos.h> +#include <stdio.h> +#include <dc/flashrom.h> /* This uses the new flashrom ISP settings code, which is based heavily on the info from Sam Steele. Thanks Sam! */ @@ -17,7 +19,7 @@ int main(int argc, char **argv) { printf("Couldn't find any IP-related config info!\n"); } else { - if(cfg.ip_valid) { + if((cfg.valid_fields & FLASHROM_ISP_IP)) { static const char * methods[] = { "DHCP", "Static", @@ -34,38 +36,33 @@ int main(int argc, char **argv) { printf("Hostname: '%s'\n", cfg.hostname); } - if(cfg.email_valid) { + if((cfg.valid_fields & FLASHROM_ISP_EMAIL)) printf("Email: '%s'\n", cfg.email); - } - if(cfg.smtp_valid) { + if((cfg.valid_fields & FLASHROM_ISP_SMTP)) printf("SMTP: '%s'\n", cfg.smtp); - } - if(cfg.pop3_valid) { + if((cfg.valid_fields & FLASHROM_ISP_POP3)) printf("POP3: '%s'\n", cfg.pop3); - } - if(cfg.pop3_login_valid) { + if((cfg.valid_fields & FLASHROM_ISP_POP3_USER)) printf("POP3 Login: '%s'\n", cfg.pop3_login); - } - if(cfg.pop3_passwd_valid) { + if((cfg.valid_fields & FLASHROM_ISP_POP3_PASS)) printf("POP3 Pass: '%s'\n", cfg.pop3_passwd); + + if((cfg.valid_fields & FLASHROM_ISP_PROXY_HOST)) printf("Proxy Host: '%s'\n", cfg.proxy_host); - } - if(cfg.ppp_login_valid) { + if((cfg.valid_fields & FLASHROM_ISP_PROXY_PORT)) printf("Proxy Port: %d\n", cfg.proxy_port); + + if((cfg.valid_fields & FLASHROM_ISP_PPP_USER)) printf("PPP Login: '%s'\n", cfg.ppp_login); - } - if(cfg.ppp_passwd_valid) { + if((cfg.valid_fields & FLASHROM_ISP_PPP_PASS)) printf("PPP Pass: '%s'\n", cfg.ppp_passwd); - } } return 0; } - - hooks/post-receive -- A pseudo Operating System for the Dreamcast. |