# HG changeset patch # User Paul Boddie # Date 1715282698 -7200 # Node ID 607879abac84bf793eecd0dad47f9a6d72ef9cf3 # Parent 13f3ac5bfbdabb2b58b9eaf144787d2b7342e439 Converted the original test payload to standard C library usage. diff -r 13f3ac5bfbda -r 607879abac84 test_files/programs/Makefile --- a/test_files/programs/Makefile Thu May 09 17:07:06 2024 +0200 +++ b/test_files/programs/Makefile Thu May 09 21:24:58 2024 +0200 @@ -13,6 +13,6 @@ SRC_C_ls = ls.c -REQUIRES_LIBS = libc_newlib libfsclient libsystypes libe2access +REQUIRES_LIBS = libe2access include $(L4DIR)/mk/prog.mk diff -r 13f3ac5bfbda -r 607879abac84 test_files/programs/dstest_exec_payload.c --- a/test_files/programs/dstest_exec_payload.c Thu May 09 17:07:06 2024 +0200 +++ b/test_files/programs/dstest_exec_payload.c Thu May 09 21:24:58 2024 +0200 @@ -1,7 +1,7 @@ /* * A test of executing code in a new task. * - * Copyright (C) 2022, 2023 Paul Boddie + * Copyright (C) 2022, 2023, 2024 Paul Boddie * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -20,13 +20,6 @@ */ #include -#include - -/* NOTE: For inclusion in the C library. */ - -#include -#include -#include @@ -34,29 +27,10 @@ { int i; - /* NOTE: For inclusion in the C library. */ - - file_t *output = client_get_stream(ENV_OUTPUT_STREAM_NAME, O_WRONLY); - - /* Write the arguments to the output stream. */ - - char buffer[32]; + for (i = 0; i < argc; i++) + printf("Arg #%d: %s\n", i, argv[i]); - for (i = 0; i < argc; i++) - { - sprintf(buffer, "Arg #%d: ", i); - client_write(output, buffer, strlen(buffer)); - client_write(output, argv[i], strlen(argv[i])); - client_write(output, "\n", 1); - } - - client_write(output, "Terminating.\n", 13); - - /* NOTE: For inclusion in the C library. */ - - client_flush(output); - - /* NOTE: To test process completion, the output stream is left open. */ + printf("Terminating.\n"); return 0; }