/DragonOS-0.1.2/kernel/src/libs/libUI/ |
D | screen_manager.c | 32 …struct scm_buffer_info_t *buf = (struct scm_buffer_info_t *)kmalloc(sizeof(struct scm_buffer_info_… in __create_buffer() local 33 if (buf == NULL) in __create_buffer() 35 memset(buf, 0, sizeof(struct scm_buffer_info_t)); in __create_buffer() 36 buf->bit_depth = video_frame_buffer_info.bit_depth; in __create_buffer() 37 buf->flags = SCM_BF_DB; in __create_buffer() 40 buf->flags |= SCM_BF_PIXEL; in __create_buffer() 42 buf->flags |= SCM_BF_TEXT; in __create_buffer() 43 buf->height = video_frame_buffer_info.height; in __create_buffer() 44 buf->width = video_frame_buffer_info.width; in __create_buffer() 45 buf->size = video_frame_buffer_info.size; in __create_buffer() [all …]
|
D | screen_manager.h | 36 int (*install)(struct scm_buffer_info_t *buf); // 安装ui框架的回调函数 40 int (*change)(struct scm_buffer_info_t *buf); // 改变ui框架的帧缓冲区的回调函数 49 struct scm_buffer_info_t *buf; member
|
D | textui.c | 69 int textui_install_handler(struct scm_buffer_info_t *buf) in textui_install_handler() argument 92 int textui_change_handler(struct scm_buffer_info_t *buf) in textui_change_handler() argument 94 memcpy((void *)buf->vaddr, (void *)(textui_framework.buf->vaddr), textui_framework.buf->size); in textui_change_handler() 95 textui_framework.buf = buf; in textui_change_handler() 327 uint16_t chars_per_vline = textui_framework.buf->width / TEXTUI_CHAR_WIDTH; in textui_init() 328 uint16_t total_vlines = textui_framework.buf->height / TEXTUI_CHAR_HEIGHT; in textui_init() 344 __private_info.actual_line = textui_framework.buf->height / TEXTUI_CHAR_HEIGHT; in textui_init()
|
/DragonOS-0.1.2/user/apps/shell/ |
D | shell.c | 22 int shell_readline(int fd, char *buf); 110 void clear_command(int count, char *buf) in clear_command() argument 114 memset(buf, 0, sizeof(buf)); in clear_command() 122 void change_command(char *buf, int type) in change_command() argument 141 strcpy(buf, history_commands[current_command_index]); in change_command() 142 printf("%s", buf); in change_command() 152 int shell_readline(int fd, char *buf) in shell_readline() argument 164 clear_command(count, buf); in shell_readline() 167 change_command(buf, 1); in shell_readline() 168 count = strlen(buf); in shell_readline() [all …]
|
D | cmd_test.c | 12 char buf[512] = {0}; in shell_pipe_test() local 27 ret = read(fd[0], buf, sizeof(buf)); in shell_pipe_test() 28 printf("parent read %d bytes data: %s\n", ret, buf); in shell_pipe_test()
|
D | cmd.c | 251 struct dirent *buf = NULL; in shell_cmd_ls() local 256 buf = readdir(dir); in shell_cmd_ls() 257 if (buf == NULL) in shell_cmd_ls() 261 if (buf->d_type & VFS_IF_DIR) in shell_cmd_ls() 263 else if (buf->d_type & VFS_IF_FILE) in shell_cmd_ls() 265 else if (buf->d_type & VFS_IF_DEVICE) in shell_cmd_ls() 270 sprintf(output_buf, "%s ", buf->d_name); in shell_cmd_ls() 317 char *buf = (char *)malloc(512); in shell_cmd_cat() local 318 memset(buf, 0, 512); in shell_cmd_cat() 321 int l = read(fd, buf, 511); in shell_cmd_cat() [all …]
|
/DragonOS-0.1.2/user/libs/libc/src/ |
D | unistd.c | 28 ssize_t read(int fd, void *buf, size_t count) in read() argument 30 return (ssize_t)syscall_invoke(SYS_READ, fd, (uint64_t)buf, count, 0, 0, 0, 0, 0); in read() 41 ssize_t write(int fd, void const *buf, size_t count) in write() argument 43 return (ssize_t)syscall_invoke(SYS_WRITE, fd, (uint64_t)buf, count, 0, 0, 0, 0, 0); in write() 183 unsigned char buf[32]; in swab() local 190 memcpy(buf, _src, transfer); in swab() 192 memcpy(_dest, buf, transfer); in swab()
|
D | dirent.c | 70 memset((dir->buf), 0, DIR_BUF_SIZE); in readdir() 72 int len = getdents(dir->fd, (struct dirent *)dir->buf, DIR_BUF_SIZE); in readdir() 75 return (struct dirent *)dir->buf; in readdir()
|
D | stdio.h | 34 int sprintf(char *buf, const char *fmt, ...); 35 int vsprintf(char *buf, const char *fmt, va_list args);
|
D | unistd.h | 21 ssize_t read(int fd, void *buf, size_t count); 31 ssize_t write(int fd, void const *buf, size_t count);
|
D | printf.c | 42 char buf[4096]; in printf() local 47 count = vsprintf(buf, fmt, args); in printf() 49 put_string(buf, COLOR_WHITE, COLOR_BLACK); in printf() 53 int sprintf(char *buf, const char *fmt, ...) in sprintf() argument 59 count = vsprintf(buf, fmt, args); in sprintf() 72 int vsprintf(char *buf, const char *fmt, va_list args) in vsprintf() argument 79 str = buf; in vsprintf() 323 *ip = str - buf; in vsprintf() 347 return str - buf; in vsprintf()
|
/DragonOS-0.1.2/kernel/src/filesystem/fat32/ |
D | fat_ent.c | 27 uint32_t *buf = (uint32_t *)kzalloc(fsbi->bytes_per_sec, 0); in fat32_alloc_clusters() local 34 memset(buf, 0, fsbi->bytes_per_sec); in fat32_alloc_clusters() 35 …>fops->transfer(blk->bd_disk, AHCI_CMD_READ_DMA_EXT, fsbi->FAT1_base_sector + i, 1, (uint64_t)buf); in fat32_alloc_clusters() 42 if ((buf[j] & 0x0fffffff) == 0) in fat32_alloc_clusters() 54 kfree(buf); in fat32_alloc_clusters() 132 uint32_t buf[256]; in fat32_read_FAT_entry() local 133 memset(buf, 0, fsbi->bytes_per_sec); in fat32_read_FAT_entry() 137 … fsbi->FAT1_base_sector + (cluster / fat_ent_per_sec), 1, (uint64_t)&buf); in fat32_read_FAT_entry() 140 return buf[cluster & (fat_ent_per_sec - 1)] & 0x0fffffff; in fat32_read_FAT_entry() 157 uint32_t *buf = kzalloc(fsbi->bytes_per_sec, 0); in fat32_write_FAT_entry() local [all …]
|
D | fat32.c | 63 uint8_t *buf = kzalloc(fsbi->bytes_per_clus, 0); in __fat32_search_long_short() local 80 …sk->fops->transfer(blk->bd_disk, AHCI_CMD_READ_DMA_EXT, sector, fsbi->sec_per_clus, (uint64_t)buf); in __fat32_search_long_short() 82 tmp_dEntry = (struct fat32_Directory_t *)buf; in __fat32_search_long_short() 287 kfree(buf); in __fat32_search_long_short() 294 kfree(buf); in __fat32_search_long_short() 300 sinfo->buffer = buf; in __fat32_search_long_short() 304 sinfo->slot_off = tmp_dEntry - (struct fat32_Directory_t *)buf; in __fat32_search_long_short() 376 uint8_t buf[512] = {0}; in fat32_read_superblock() local 377 …bd_disk->fops->transfer(blk->bd_disk, AHCI_CMD_READ_DMA_EXT, blk->bd_start_LBA, 1, (uint64_t)&buf); in fat32_read_superblock() 387 struct fat32_BootSector_t *fbs = (struct fat32_BootSector_t *)buf; in fat32_read_superblock() [all …]
|
/DragonOS-0.1.2/kernel/src/libs/ |
D | unistd.c | 26 unsigned char buf[32]; in swab() local 33 memcpy(buf, _src, transfer); in swab() 35 memcpy(_dest, buf, transfer); in swab()
|
D | printk.c | 54 static int __do_vsprintf(char *buf, const char *fmt, int buf_size, va_list args) in __do_vsprintf() argument 62 str = buf; in __do_vsprintf() 72 end = buf + buf_size; in __do_vsprintf() 310 *ip = str - buf; in __do_vsprintf() 354 return str - buf; in __do_vsprintf() 364 int vsprintf(char *buf, const char *fmt, va_list args) in vsprintf() argument 366 return __do_vsprintf(buf, fmt, -1, args); in vsprintf() 378 int vsnprintf(char *buf, const char *fmt, int buf_size, va_list args) in vsnprintf() argument 380 return __do_vsprintf(buf, fmt, buf_size, args); in vsnprintf() 600 char buf[4096]; // vsprintf()的缓冲区 in printk_color() local [all …]
|
/DragonOS-0.1.2/kernel/src/common/ |
D | stdio.h | 11 extern int vsprintf(char *buf, const char *fmt, va_list args); 13 extern int sprintk(char *buf, const char *fmt, ...);
|
D | printk.h | 50 int vsprintf(char *buf, const char *fmt, va_list args); 61 int vsnprintf(char *buf, const char *fmt, int buf_size, va_list args); 83 int sprintk(char *buf, const char *fmt, ...);
|
/DragonOS-0.1.2/kernel/src/filesystem/ |
D | MBR.c | 14 int MBR_read_partition_table(struct blk_gendisk *gd, void *buf) in MBR_read_partition_table() argument 16 return gd->fops->transfer(gd, AHCI_CMD_READ_DMA_EXT, 0, 1, (uint64_t)buf); in MBR_read_partition_table()
|
/DragonOS-0.1.2/kernel/src/driver/disk/ |
D | ata.c | 24 unsigned char buf[64]; in ata_disk_handler() local 30 buf[js++]=(info.Serial_Number[i] & 0xff); in ata_disk_handler() 32 buf[js] = '\0'; in ata_disk_handler() 33 printk("%s", buf); in ata_disk_handler()
|
/DragonOS-0.1.2/kernel/src/ipc/ |
D | pipe.c | 27 char buf[PIPE_BUFF_SIZE]; member 30 long pipe_read(struct vfs_file_t *file_ptr, char *buf, in pipe_read() argument 53 copy_to_user(buf + i, &pipe_ptr->buf[pipe_ptr->data.read_pos], sizeof(char)); in pipe_read() 63 long pipe_write(struct vfs_file_t *file_ptr, char *buf, in pipe_write() argument 86 copy_from_user(&pipe_ptr->buf[pipe_ptr->data.write_pos], buf + i, sizeof(char)); in pipe_write() 121 memset(pipe_ptr->buf, 0, PIPE_BUFF_SIZE); in pipe_alloc()
|
/DragonOS-0.1.2/kernel/src/filesystem/VFS/ |
D | VFS.c | 215 int vfs_fill_dirent(void *buf, ino_t d_ino, char *name, int namelen, unsigned char type, off_t offs… in vfs_fill_dirent() argument 217 struct dirent *dent = (struct dirent *)buf; in vfs_fill_dirent() 220 if (!(verify_area((uint64_t)buf, sizeof(struct dirent) + namelen))) in vfs_fill_dirent() 224 memset(buf, 0, sizeof(struct dirent) + namelen); in vfs_fill_dirent() 274 char *buf = (char *)kzalloc(last_slash + 2, 0); in vfs_mkdir() local 278 strncpy_from_user(buf, path, last_slash); in vfs_mkdir() 280 strncpy(buf, path, last_slash); in vfs_mkdir() 281 buf[last_slash + 1] = '\0'; in vfs_mkdir() 284 struct vfs_dir_entry_t *parent_dir = vfs_path_walk(buf, 0); in vfs_mkdir() 289 kfree(buf); in vfs_mkdir() [all …]
|
/DragonOS-0.1.2/kernel/src/driver/tty/ |
D | tty.c | 62 long tty_read(struct vfs_file_t *filp, char *buf, int64_t count, long *position) in tty_read() argument 76 long tty_write(struct vfs_file_t *filp, char *buf, int64_t count, long *position) in tty_write() argument
|
/DragonOS-0.1.2/docs/userland/libc/apis/api-list/ |
D | unistd.md | 11 ``ssize_t read(int fd,void *buf,size_t count)`` : 从文件读取 17 ``ssize_t write(int fd,void const *buf,size_t count)`` : 写入文件
|
D | stdio.md | 16 ``int sprintf(char *buf,const char *fmt,...)``` 20 ``int vsprintf(char *buf,const char *fmt,va_list args)``
|
/DragonOS-0.1.2/kernel/src/driver/video/ |
D | video.h | 28 int video_set_refresh_target(struct scm_buffer_info_t *buf);
|