-1

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?

1 Answers1

1

You can get it from errno.

Also you can print the error using strerror

Bharath Kumar
  • 541
  • 3
  • 10