mirror of
https://github.com/AuxXxilium/kmod.git
synced 2024-12-18 20:48:11 +07:00
Use fstat() instead of stat() when possible
This commit is contained in:
parent
0835fc3bf9
commit
b418a82097
@ -339,7 +339,7 @@ KMOD_EXPORT int kmod_module_insert_module(struct kmod_module *mod,
|
||||
return err;
|
||||
}
|
||||
|
||||
stat(mod->path, &st);
|
||||
fstat(fd, &st);
|
||||
|
||||
if ((mmaped_file = mmap(0, st.st_size, PROT_READ,
|
||||
MAP_PRIVATE, fd, 0)) == MAP_FAILED) {
|
||||
|
Loading…
Reference in New Issue
Block a user