mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-03 12:21:37 +00:00
Move and clean up all testcases from the Pal/test directory into the Pal/regression and add them to CI. Some of them were redundant and thus got removed.
26 lines
555 B
C
26 lines
555 B
C
#include "pal.h"
|
|
#include "pal_debug.h"
|
|
|
|
char str[13] = "Hello World\n";
|
|
|
|
int main(int argc, char** argv, char** envp) {
|
|
pal_printf("start program: %s\n", pal_control.executable);
|
|
|
|
PAL_HANDLE out = DkStreamOpen("dev:tty", PAL_ACCESS_WRONLY, 0, 0, 0);
|
|
|
|
if (out == NULL) {
|
|
pal_printf("DkStreamOpen failed\n");
|
|
return -1;
|
|
}
|
|
|
|
int bytes = DkStreamWrite(out, 0, sizeof(str) - 1, str, NULL);
|
|
|
|
if (bytes < 0) {
|
|
pal_printf("DkStreamWrite failed\n");
|
|
return -1;
|
|
}
|
|
|
|
DkObjectClose(out);
|
|
return 0;
|
|
}
|