summaryrefslogtreecommitdiffstats
path: root/tftpTest
diff options
context:
space:
mode:
Diffstat (limited to 'tftpTest')
-rw-r--r--tftpTest/Makefile3
-rw-r--r--tftpTest/test.c10
2 files changed, 7 insertions, 6 deletions
diff --git a/tftpTest/Makefile b/tftpTest/Makefile
index aca93b4..f847297 100644
--- a/tftpTest/Makefile
+++ b/tftpTest/Makefile
@@ -37,7 +37,8 @@ CFLAGS_DEBUG_V += -qrtems_debug # -v
LD_PATHS +=
-LD_LIBS +=
+LD_LIBS += -ltftpfs
+LD_LIBS += -lnetworking
#
# Add your list of files to delete here. The config files
diff --git a/tftpTest/test.c b/tftpTest/test.c
index 0705ae9..f19a918 100644
--- a/tftpTest/test.c
+++ b/tftpTest/test.c
@@ -35,7 +35,7 @@ showRate (unsigned long totalRead)
elapsed = now - then;
if (elapsed) {
rtems_interval ticksPerSecond;
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond);
+ ticksPerSecond = rtems_clock_get_ticks_per_second();
printf (" (%ld bytes/sec)",
(long)(((long long)totalRead * ticksPerSecond)
/ elapsed));
@@ -56,7 +56,7 @@ testRawRead (void)
return;
}
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
+ then = rtems_clock_get_ticks_since_boot();
for (;;) {
nread = read (fd, cbuf, sizeof cbuf);
if (nread < 0) {
@@ -68,7 +68,7 @@ testRawRead (void)
break;
totalRead += nread;
}
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
+ now = rtems_clock_get_ticks_since_boot();
close (fd);
showRate (totalRead);
}
@@ -86,7 +86,7 @@ testFread (void)
return;
}
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then);
+ then = rtems_clock_get_ticks_since_boot();
for (;;) {
nread = fread (cbuf, sizeof cbuf[0], sizeof cbuf, fp);
if (nread < 0) {
@@ -98,7 +98,7 @@ testFread (void)
break;
totalRead += nread;
}
- rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
+ now = rtems_clock_get_ticks_since_boot();
fclose (fp);
showRate (totalRead);
}