1 // SPDX-License-Identifier: BSD-2-Clause 2 /* 3 * Copyright (c) 2020, Huawei Technologies Co., Ltd 4 */ 5 6 #include <stdio.h> 7 #include <stdlib.h> 8 #include <unistd.h> 9 write(int fd,const void * buf,size_t count)10ssize_t write(int fd, const void *buf, size_t count) 11 { 12 if (fd != 1 && fd != 2) 13 abort(); 14 15 return printf("%*s", (int)count, (char *)buf); 16 } 17