mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +00:00
LibC: Write to the dbg() every time we perror() in userspace
There's a high chance that we're interested in whatever errors come out of perror(), so let's output those on the debugger as well.
This commit is contained in:
parent
91c79440a1
commit
6cd9c020ea
1 changed files with 2 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
#include <AK/LogStream.h>
|
||||
#include <AK/PrintfImplementation.h>
|
||||
#include <AK/ScopedValueRollback.h>
|
||||
#include <AK/StdLibExtras.h>
|
||||
|
@ -424,6 +425,7 @@ int snprintf(char* buffer, size_t size, const char* fmt, ...)
|
|||
|
||||
void perror(const char* s)
|
||||
{
|
||||
dbg() << "perror(): " << strerror(errno);
|
||||
fprintf(stderr, "%s: %s\n", s, strerror(errno));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue