summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/driver/video.c
diff options
context:
space:
mode:
authordzwdz2023-09-09 16:54:13 +0200
committerdzwdz2023-09-09 16:54:13 +0200
commit4516acc2814de7e1420109a9469600a5607eb984 (patch)
treef528afa2d2158c1d06ee203926e8c06251642868 /src/kernel/arch/amd64/driver/video.c
parentb7e5252ab4955039ca548d7f8216bfc432a3bd62 (diff)
kernel: build /kdev/ on the fly
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);
}