summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/driver/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/arch/amd64/driver/video.c')
-rw-r--r--src/kernel/arch/amd64/driver/video.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/arch/amd64/driver/video.c b/src/kernel/arch/amd64/driver/video.c
index 5a7fc8f..390e8dd 100644
--- a/src/kernel/arch/amd64/driver/video.c
+++ b/src/kernel/arch/amd64/driver/video.c
@@ -21,9 +21,9 @@ static int handle(VfsReq *req) {
switch (req->type) {
case VFSOP_OPEN:
if (!req->input.kern) panic_invalid_state();
- if (req->input.len == 1) {
+ if (req->input.len == 0) {
return H_ROOT;
- } else if (req->input.len == namelen + 1 && !memcmp(req->input.buf_kern + 1, namebuf, namelen)) {
+ } else if (req->input.len == namelen && !memcmp(req->input.buf_kern, namebuf, namelen)) {
return H_FB;
} else {
return -1;
@@ -65,5 +65,5 @@ void video_init(GfxInfo fb_) {
fb = fb_;
snprintf(namebuf, sizeof namebuf, "%ux%ux%u", fb.width, fb.height, fb.bpp);
namelen = strlen(namebuf);
- vfs_root_register("/kdev/video", accept);
+ vfs_root_register("/kdev/video/", accept);
}