summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-12-17 20:26:09 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-12-17 20:26:09 +0000
commit27643e03366da4908a5aad0c5d0b272909eb78de (patch)
treea6d8c9b7274b801845dcbd3bec95476c28b5dd00 /cpukit/libfs
parent2009-12-17 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-27643e03366da4908a5aad0c5d0b272909eb78de.tar.bz2
2009-12-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/src/termios.c, libfs/src/dosfs/msdos_format.c, libfs/src/nfsclient/src/nfs.c, libfs/src/pipe/fifo.c, libnetworking/lib/rtems_bsdnet_ntp.c, libnetworking/lib/tftpDriver.c, libnetworking/rtems/rtems_glue.c, libnetworking/rtems/rtems_select.c: Eliminate uses of deprecated rtems_clock_get() and replace with properly typed routine.
Diffstat (limited to 'cpukit/libfs')
-rw-r--r--cpukit/libfs/src/dosfs/msdos_format.c6
-rw-r--r--cpukit/libfs/src/nfsclient/src/nfs.c33
-rw-r--r--cpukit/libfs/src/pipe/fifo.c2
3 files changed, 21 insertions, 20 deletions
diff --git a/cpukit/libfs/src/dosfs/msdos_format.c b/cpukit/libfs/src/dosfs/msdos_format.c
index 98cb334787..e9d7cc2e5c 100644
--- a/cpukit/libfs/src/dosfs/msdos_format.c
+++ b/cpukit/libfs/src/dosfs/msdos_format.c
@@ -250,11 +250,11 @@ static int msdos_format_gen_volid
{
int ret_val = 0;
int rc;
- rtems_clock_time_value time_value;
+ struct timeval time_value;
- rc = rtems_clock_get(RTEMS_CLOCK_GET_TIME_VALUE,&time_value);
+ rc = rtems_clock_get_tod_timeval(&time_value);
if (rc == RTEMS_SUCCESSFUL) {
- *volid_ptr = time_value.seconds + time_value.microseconds;
+ *volid_ptr = time_value.tv_sec + time_value.tv_sec;
}
else {
*volid_ptr = rand();
diff --git a/cpukit/libfs/src/nfsclient/src/nfs.c b/cpukit/libfs/src/nfsclient/src/nfs.c
index 61e4373ee1..7014055448 100644
--- a/cpukit/libfs/src/nfsclient/src/nfs.c
+++ b/cpukit/libfs/src/nfsclient/src/nfs.c
@@ -2128,7 +2128,8 @@ static int nfs_mknod(
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
-rtems_clock_time_value now;
+
+struct timeval now;
diropres res;
NfsNode node = pathloc->node_access;
mode_t type = S_IFMT & mode;
@@ -2140,7 +2141,7 @@ mode_t type = S_IFMT & mode;
fprintf(stderr,"nfs_mknod: creating %s\n", path);
#endif
- rtems_clock_get(RTEMS_CLOCK_GET_TIME_VALUE, &now);
+ rtems_clock_get_tod_timeval(&now);
SERP_ARGS(node).createarg.name = (filename)path;
SERP_ARGS(node).createarg.attributes.mode = mode;
@@ -2148,10 +2149,10 @@ mode_t type = S_IFMT & mode;
SERP_ARGS(node).createarg.attributes.uid = 0;
SERP_ARGS(node).createarg.attributes.gid = 0;
SERP_ARGS(node).createarg.attributes.size = 0;
- SERP_ARGS(node).createarg.attributes.atime.seconds = now.seconds;
- SERP_ARGS(node).createarg.attributes.atime.useconds = now.microseconds;
- SERP_ARGS(node).createarg.attributes.mtime.seconds = now.seconds;
- SERP_ARGS(node).createarg.attributes.mtime.useconds = now.microseconds;
+ SERP_ARGS(node).createarg.attributes.atime.seconds = now.tv_sec;
+ SERP_ARGS(node).createarg.attributes.atime.useconds = now.tv_usec;
+ SERP_ARGS(node).createarg.attributes.mtime.seconds = now.tv_sec;
+ SERP_ARGS(node).createarg.attributes.mtime.useconds = now.tv_usec;
if ( nfscall( node->nfs->server,
NFSPROC_CREATE,
@@ -2190,7 +2191,7 @@ static int nfs_symlink(
const char *node_name
)
{
-rtems_clock_time_value now;
+struct timeval now;
nfsstat status;
NfsNode node = loc->node_access;
@@ -2199,7 +2200,7 @@ NfsNode node = loc->node_access;
fprintf(stderr,"nfs_symlink: creating %s -> %s\n", link_name, node_name);
#endif
- rtems_clock_get(RTEMS_CLOCK_GET_TIME_VALUE, &now);
+ rtems_clock_get_tod_timeval(&now);
SERP_ARGS(node).symlinkarg.name = (filename)link_name;
SERP_ARGS(node).symlinkarg.to = (nfspath) node_name;
@@ -2209,10 +2210,10 @@ NfsNode node = loc->node_access;
SERP_ARGS(node).symlinkarg.attributes.uid = 0;
SERP_ARGS(node).symlinkarg.attributes.gid = 0;
SERP_ARGS(node).symlinkarg.attributes.size = 0;
- SERP_ARGS(node).symlinkarg.attributes.atime.seconds = now.seconds;
- SERP_ARGS(node).symlinkarg.attributes.atime.useconds = now.microseconds;
- SERP_ARGS(node).symlinkarg.attributes.mtime.seconds = now.seconds;
- SERP_ARGS(node).symlinkarg.attributes.mtime.useconds = now.microseconds;
+ SERP_ARGS(node).symlinkarg.attributes.atime.seconds = now.tv_sec;
+ SERP_ARGS(node).symlinkarg.attributes.atime.useconds = now.tv_usec;
+ SERP_ARGS(node).symlinkarg.attributes.mtime.seconds = now.tv_sec;
+ SERP_ARGS(node).symlinkarg.attributes.mtime.useconds = now.tv_usec;
if ( nfscall( node->nfs->server,
NFSPROC_SYMLINK,
@@ -2918,7 +2919,7 @@ static int
nfs_sattr(NfsNode node, sattr *arg, u_long mask)
{
-rtems_clock_time_value now;
+struct timeval now;
nfstime nfsnow, t;
int e;
u_int mode;
@@ -2926,11 +2927,11 @@ u_int mode;
if (updateAttr(node, 0 /* only if old */))
return -1;
- rtems_clock_get(RTEMS_CLOCK_GET_TIME_VALUE, &now);
+ rtems_clock_get_tod_timeval(&now);
/* TODO: add rtems EPOCH - UNIX EPOCH seconds */
- nfsnow.seconds = now.seconds;
- nfsnow.useconds = now.microseconds;
+ nfsnow.seconds = now.tv_sec;
+ nfsnow.useconds = now.tv_usec;
/* merge permission bits into existing type bits */
mode = SERP_ATTR(node).mode;
diff --git a/cpukit/libfs/src/pipe/fifo.c b/cpukit/libfs/src/pipe/fifo.c
index 846874b080..8f3fe82ddc 100644
--- a/cpukit/libfs/src/pipe/fifo.c
+++ b/cpukit/libfs/src/pipe/fifo.c
@@ -560,6 +560,6 @@ void rtems_pipe_initialize (void)
rtems_fatal_error_occurred (sc);
rtems_interval now;
- rtems_clock_get(RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
+ now = rtems_clock_get_ticks_since_boot();
rtems_pipe_no = now;
}