Re: errno values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27-jan-04, at 19:54, Andre Kirchner wrote:
I made a program that returns error number 13, but I
don't know what error correspond to 13.

Here, have some. It won't print the symbolic name, but the descriptive value instead; shouldn't be too hard to match :-)


Segher





/* perror.c */


#include <string.h>
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char **argv)
{
	if (argc != 2) {
		fprintf(stderr, "Usage: %s <errno>\n", argv[0]);
		return 1;
	}

puts(strerror(atoi(argv[1])));

	return 0;
}


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux