I'm using syscall stat
, it returns 0/-1. When -1 is returned it means, error occurred and errno is set as it should be (source: man 2 stat
).
But I want to access errno and print it, how to do that?
I'm using syscall stat
, it returns 0/-1. When -1 is returned it means, error occurred and errno is set as it should be (source: man 2 stat
).
But I want to access errno and print it, how to do that?