diff options
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/shell/ash.c b/shell/ash.c index f16d7fb6a..54f004375 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -11371,10 +11371,10 @@ static void FAST_FUNC | |||
11371 | change_epoch(struct var *vepoch, const char *fmt) | 11371 | change_epoch(struct var *vepoch, const char *fmt) |
11372 | { | 11372 | { |
11373 | struct timeval tv; | 11373 | struct timeval tv; |
11374 | char buffer[sizeof("%lu.nnnnnn") + sizeof(long)*3]; | 11374 | char buffer[sizeof("%llu.nnnnnn") + sizeof(long long)*3]; |
11375 | 11375 | ||
11376 | gettimeofday(&tv, NULL); | 11376 | xgettimeofday(&tv); |
11377 | sprintf(buffer, fmt, (unsigned long)tv.tv_sec, (unsigned)tv.tv_usec); | 11377 | sprintf(buffer, fmt, (unsigned long long)tv.tv_sec, (unsigned)tv.tv_usec); |
11378 | setvar(vepoch->var_text, buffer, VNOFUNC); | 11378 | setvar(vepoch->var_text, buffer, VNOFUNC); |
11379 | vepoch->flags &= ~VNOFUNC; | 11379 | vepoch->flags &= ~VNOFUNC; |
11380 | } | 11380 | } |
@@ -11382,13 +11382,13 @@ change_epoch(struct var *vepoch, const char *fmt) | |||
11382 | static void FAST_FUNC | 11382 | static void FAST_FUNC |
11383 | change_seconds(const char *value UNUSED_PARAM) | 11383 | change_seconds(const char *value UNUSED_PARAM) |
11384 | { | 11384 | { |
11385 | change_epoch(&vepochs, "%lu"); | 11385 | change_epoch(&vepochs, "%llu"); |
11386 | } | 11386 | } |
11387 | 11387 | ||
11388 | static void FAST_FUNC | 11388 | static void FAST_FUNC |
11389 | change_realtime(const char *value UNUSED_PARAM) | 11389 | change_realtime(const char *value UNUSED_PARAM) |
11390 | { | 11390 | { |
11391 | change_epoch(&vepochr, "%lu.%06u"); | 11391 | change_epoch(&vepochr, "%llu.%06u"); |
11392 | } | 11392 | } |
11393 | #endif | 11393 | #endif |
11394 | 11394 | ||