diff options
author | Erik Troan <ewt@redhat.com> | 2000-05-26 16:19:37 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-05-26 16:19:37 +0000 |
commit | 227fceda9a06651887fa5e8bc0f12f3117e85bb2 (patch) | |
tree | 1f3fb8c49ff5d4207584ac2b652728ed7374a2f0 /loader | |
parent | c4ee6ff38166e8c71f8b717b55a1384a7a7ddbb3 (diff) | |
download | anaconda-227fceda9a06651887fa5e8bc0f12f3117e85bb2.tar.gz anaconda-227fceda9a06651887fa5e8bc0f12f3117e85bb2.tar.xz anaconda-227fceda9a06651887fa5e8bc0f12f3117e85bb2.zip |
*** empty log message ***
Diffstat (limited to 'loader')
-rw-r--r-- | loader/.cvsignore | 1 | ||||
-rw-r--r-- | loader/urltest.c | 35 |
2 files changed, 36 insertions, 0 deletions
diff --git a/loader/.cvsignore b/loader/.cvsignore index a87782caa..47e3b767a 100644 --- a/loader/.cvsignore +++ b/loader/.cvsignore @@ -11,3 +11,4 @@ loader-network-kon loader-pcmcia-kon kon-loader.tr .depend +urltest diff --git a/loader/urltest.c b/loader/urltest.c new file mode 100644 index 000000000..817e4aff3 --- /dev/null +++ b/loader/urltest.c @@ -0,0 +1,35 @@ +#include <newt.h> + +#include "urls.h" + +int main(void) { + struct iurlinfo iu; + char doSecondary; + char buf[1024]; + int fd; + int size; + + newtInit(); + newtCls(); + + memset(&iu, 0, sizeof(iu)); + + iu.protocol = URL_METHOD_FTP; + iu.address = "mercury.devel.redhat.com"; + iu.prefix = "/mnt/redhat/test/oot/i386"; + + iu.protocol = URL_METHOD_HTTP; + iu.address = "mercury.devel.redhat.com"; + iu.prefix = "/"; + + fd = urlinstStartTransfer(&iu, "test.html"); + if (fd >= 0) { + size = read(fd, buf, sizeof(buf)); + buf[size] = '\0'; + urlinstFinishTransfer(&iu, fd); + + newtWinMessage("Got it", "Ok", "Got: '%s'", buf); + } + + newtFinished(); +} |