r5425: Convert function tables to new structure (with description)
[samba.git] / source / utils / net / net_time.c
index 7668a42b8ca514ac4041627c835b469ebf1b3c3f..5f318ac4ea5beacbf81523f01d46bb3c31b11522 100644 (file)
@@ -28,7 +28,6 @@
  * Code for getting the remote time
  */
 
-
 int net_time(struct net_context *ctx, int argc, const char **argv)
 {
        NTSTATUS status;
@@ -41,8 +40,7 @@ int net_time(struct net_context *ctx, int argc, const char **argv)
        if (argc > 0 && argv[0]) {
                server_name = argv[0];
        } else {
-               DEBUG(0,("net_time: server name needed!\n"));
-               return -1;
+               return net_time_usage(ctx, argc, argv);
        }
 
        libnetctx = libnet_context_init();
@@ -64,9 +62,9 @@ int net_time(struct net_context *ctx, int argc, const char **argv)
                return -1;
        }
 
-       ZERO_ARRAY(timestr);
+       ZERO_STRUCT(timestr);
        tm = localtime(&r.generic.out.time);
-       sys_strftime(timestr, sizeof(timestr)-1, "%c %Z",tm);
+       strftime(timestr, sizeof(timestr)-1, "%c %Z",tm);
 
        printf("%s\n",timestr);
 
@@ -77,12 +75,6 @@ int net_time(struct net_context *ctx, int argc, const char **argv)
 
 int net_time_usage(struct net_context *ctx, int argc, const char **argv)
 {
-       d_printf("net_time_usage: TODO\n");
-       return 0;       
-}
-
-int net_time_help(struct net_context *ctx, int argc, const char **argv)
-{
-       d_printf("net_time_help: TODO\n");
+       d_printf("net time <server> [options]\n");
        return 0;       
 }