mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
Kernel: Convert Process::get_syscall_path_argument() to KString
This API now returns a KResultOr<NonnullOwnPtr<KString>> and allocation failures should be propagated everywhere nicely. :^)
This commit is contained in:
parent
66f3ec687b
commit
1123af361d
25 changed files with 42 additions and 42 deletions
|
@ -36,13 +36,12 @@ KResultOr<int> Process::sys$setkeymap(Userspace<const Syscall::SC_setkeymap_para
|
|||
return EFAULT;
|
||||
|
||||
auto map_name = get_syscall_path_argument(params.map_name);
|
||||
if (map_name.is_error()) {
|
||||
if (map_name.is_error())
|
||||
return map_name.error();
|
||||
}
|
||||
if (map_name.value().length() > map_name_max_size) {
|
||||
if (map_name.value()->length() > map_name_max_size)
|
||||
return ENAMETOOLONG;
|
||||
}
|
||||
HIDManagement::the().set_maps(character_map_data, map_name.value());
|
||||
|
||||
HIDManagement::the().set_maps(character_map_data, map_name.value()->view());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue