Skip to content

Commit

Permalink
refactor!: rename fn kprint.kprint to kprint.kwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed May 23, 2023
1 parent 3d61cf9 commit 34d4cf2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kernel/main.v
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub fn kmain() {
serial.early_initialise()

// We're alive
kprint.kprint(c'Welcome to Vinix\n\n')
kprint.kwrite(c'Welcome to Vinix\n\n')

// a dummy call to avoid V warning about an unused `stubs` module
_ := stubs.toupper(0)
Expand Down
2 changes: 1 addition & 1 deletion kernel/modules/kprint/kprint.v
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn syscall_kprint(_ voidptr, message charptr) {
}
}

pub fn kprint(message charptr) {
pub fn kwrite(message charptr) {
msglen := unsafe { u64(C.strlen(message)) }

kprint_lock.acquire()
Expand Down
2 changes: 1 addition & 1 deletion kernel/modules/lib/stubs/file.v
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub fn write(fd int, buf &C.void, count u64) i64 {
lib.kpanic(voidptr(0), c'write to fd != 1 && fd != 2 is a stub')
}

kprint.kprint(charptr(buf))
kprint.kwrite(charptr(buf))

return i64(count)
}
Expand Down

0 comments on commit 34d4cf2

Please sign in to comment.