| 645 | | #if 0 |
| 646 | | int ConsoleGetCurrentName(char* buf, int size) |
| 647 | | { |
| 648 | | struct File* file=¤t->files[0]; |
| 649 | | int index=DEV_ID_MINOR(file->vNode->devId); |
| 650 | | |
| 651 | | /* FIXME: Check if device is actually open! */ |
| 652 | | |
| 653 | | sprintf(buf, "Console%d", index); |
| 654 | | |
| 655 | | return 0; |
| 656 | | } |
| 657 | | #endif |
| | 645 | int ConsoleGetCurrent(struct KeFsEntry** dest, struct KeFsEntry* src) |
| | 646 | { |
| | 647 | struct VNode* vNode = current->files[0].vNode; |
| | 648 | struct KeFsEntry* entry = (struct KeFsEntry*)vNode->id; |
| | 649 | struct KeObject* object = (struct KeObject*)entry->file; |
| | 650 | |
| | 651 | *dest = object->dir; |
| | 652 | |
| | 653 | return 0; |
| | 654 | } |
| 700 | | ConfigAddIntEntry(dir, "flags", &consoles[i].flags); |
| 701 | | ConfigAddIntEntry(dir, "rows", &rows); /* TODO: Read-only. Info entry */ |
| 702 | | ConfigAddIntEntry(dir, "cols", &cols); |
| 703 | | ConfigAddIntEntry(dir, "cursorRow", &consoles[i].currY); |
| 704 | | ConfigAddIntEntry(dir, "cursorCol", &consoles[i].currX); |
| 705 | | #endif |
| | 696 | IcFsAddIntEntry(dir, "flags", &consoles[i].flags, VFS_ATTR_RW); |
| | 697 | IcFsAddIntEntry(dir, "rows", &rows, VFS_ATTR_READ); |
| | 698 | IcFsAddIntEntry(dir, "cols", &cols, VFS_ATTR_READ); |
| | 699 | IcFsAddIntEntry(dir, "cursorRow", &consoles[i].currY, VFS_ATTR_RW); |
| | 700 | IcFsAddIntEntry(dir, "cursorCol", &consoles[i].currX, VFS_ATTR_RW); |