Re: [PATCH v2] selftest/vm clarify error statement in gup_test

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

 



On 4/5/22 4:33 PM, Matthew Wilcox wrote:
On Tue, Apr 05, 2022 at 09:48:09PM +0000, Sidhartha Kumar wrote:
-		perror("open");
-		exit(1);
+		switch (errno) {
+		case EACCES:
+			if (getuid())
+				printf("Please run this test as root\n");

Shouldn't all these be fprintf(stderr, ...); ?



printf() is consistent with the other messages in this file. Either
works.

thanks,
-- Shuah




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux