Re: [PATCH v3 3/5] selftests/ipc: change test to use ksft framework

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

 



On Fri, 2014-10-03 at 09:36 -0600, Shuah Khan wrote:
>  	msgque.key = ftok(argv[0], 822155650);
>  	if (msgque.key == -1) {
> -		printf("Can't make key\n");
> -		return -errno;
> +		printf("Can't make key: %d\n", -errno);

So printing a numeric value is quite useless when users actually run
into these errors -- which is why I like err() so much. How about using
strerror() instead?

Thanks,
Davidlohr

--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux