From e90b72ec3082588b296956730bd2930cf8d5d671 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Fri, 10 Jul 2026 11:31:46 +0800 Subject: refactor: promote new architecture to repository root Archive the deprecated implementation under lume-legacy, make the new kernel the default root-level build, and update repository entry points without changing kernel behavior. --- src/user/cp.cc | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 src/user/cp.cc (limited to 'src/user/cp.cc') diff --git a/src/user/cp.cc b/src/user/cp.cc deleted file mode 100644 index ca35e82..0000000 --- a/src/user/cp.cc +++ /dev/null @@ -1,52 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Copyright (C) 2026 Richard QIn - */ -#include "ulib/stdio.h" -#include "ulib/stdlib.h" -#include "user/user.h" -#include "common/fcntl.h" - -char buf[512]; - -int main(int argc, char *argv[]) -{ - int fd_src, fd_dst, n; - - if (argc != 3) - { - printf("Usage: cp src dst\n"); - exit(1); - } - - if ((fd_src = open(argv[1], O_RDONLY)) < 0) - { - printf("cp: cannot open source %s\n", argv[1]); - exit(1); - } - - if ((fd_dst = open(argv[2], O_WRONLY | O_CREATE | O_TRUNC)) < 0) - { - printf("cp: cannot create destination %s\n", argv[2]); - close(fd_src); - exit(1); - } - - while ((n = read(fd_src, buf, sizeof(buf))) > 0) - { - if (write(fd_dst, buf, n) != n) - { - printf("cp: write error\n"); - exit(1); - } - } - - if (n < 0) - { - printf("cp: read error\n"); - } - - close(fd_src); - close(fd_dst); - exit(0); -} \ No newline at end of file -- cgit v1.2.3