You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
riscv-pke/user/app_touch.c

18 lines
343 B

#include "user_lib.h"
#include "util/string.h"
#include "util/types.h"
int main(int argc, char *argv[]) {
int fd;
char *filename = argv[0];
printu("\n======== touch command ========\n");
printu("touch: %s\n", filename);
fd = open(filename, O_CREAT);
printu("file descriptor fd: %d\n", fd);
close(fd);
exit(0);
return 0;
}