2002-02-02 05:10:38 +05:30
|
|
|
#include <stdio.h>
|
2002-02-02 04:17:29 +05:30
|
|
|
#include <string.h>
|
|
|
|
#include "proc/whattime.h"
|
|
|
|
#include "proc/version.h"
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
2002-02-02 05:10:38 +05:30
|
|
|
if(argc == 1) {
|
|
|
|
print_uptime();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
if((argc == 2) && (!strcmp(argv[1], "-V"))) {
|
|
|
|
display_version();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
fprintf(stderr, "usage: w -V\n -V display version\n");
|
|
|
|
return 1;
|
2002-02-02 04:17:29 +05:30
|
|
|
}
|