1.1 --- a/test_files/programs/dstest_exec_payload.c Thu May 09 17:07:06 2024 +0200
1.2 +++ b/test_files/programs/dstest_exec_payload.c Thu May 09 21:24:58 2024 +0200
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * A test of executing code in a new task.
1.6 *
1.7 - * Copyright (C) 2022, 2023 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2022, 2023, 2024 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -20,13 +20,6 @@
1.13 */
1.14
1.15 #include <stdio.h>
1.16 -#include <string.h>
1.17 -
1.18 -/* NOTE: For inclusion in the C library. */
1.19 -
1.20 -#include <fsclient/client.h>
1.21 -#include <systypes/env.h>
1.22 -#include <systypes/fcntl.h>
1.23
1.24
1.25
1.26 @@ -34,29 +27,10 @@
1.27 {
1.28 int i;
1.29
1.30 - /* NOTE: For inclusion in the C library. */
1.31 -
1.32 - file_t *output = client_get_stream(ENV_OUTPUT_STREAM_NAME, O_WRONLY);
1.33 -
1.34 - /* Write the arguments to the output stream. */
1.35 -
1.36 - char buffer[32];
1.37 + for (i = 0; i < argc; i++)
1.38 + printf("Arg #%d: %s\n", i, argv[i]);
1.39
1.40 - for (i = 0; i < argc; i++)
1.41 - {
1.42 - sprintf(buffer, "Arg #%d: ", i);
1.43 - client_write(output, buffer, strlen(buffer));
1.44 - client_write(output, argv[i], strlen(argv[i]));
1.45 - client_write(output, "\n", 1);
1.46 - }
1.47 -
1.48 - client_write(output, "Terminating.\n", 13);
1.49 -
1.50 - /* NOTE: For inclusion in the C library. */
1.51 -
1.52 - client_flush(output);
1.53 -
1.54 - /* NOTE: To test process completion, the output stream is left open. */
1.55 + printf("Terminating.\n");
1.56
1.57 return 0;
1.58 }