Пример #1
0
/**
 * Creates a file
 */
void console_touch(char *dir, char *command) {
    memset(senddir, 0, 64);
    strcpy(senddir, dir);
    strcat(senddir, "/");
    strcat(senddir, get_argument(command, 1));

    if(!vfs_touch(senddir)) {
        printk("touch: Error creating file\n");
    }
}
Пример #2
0
FILE kfopen(char* path, uint offset){
	fs_node_t* node = fs_path(df_root, path);
	
	if(node == NULL){
		node = vfs_touch(df_root, path);
		
		if(node == NULL)
			return (FILE) -1;
	}
	
	return fd_create(node, offset);
}