From 4c2c6f48b15b69a013beb1faecb6b080d03baf16 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 5 Apr 2011 16:55:51 +0300 Subject: tests: checkfs: fix linker warnings The sys_errlist[errno] is deprecated. We should use strerror(errno) instead. Signed-off-by: Andy Shevchenko Signed-off-by: Artem Bityutskiy --- tests/checkfs/checkfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/checkfs') diff --git a/tests/checkfs/checkfs.c b/tests/checkfs/checkfs.c index 6ca2c0e..3224d2b 100644 --- a/tests/checkfs/checkfs.c +++ b/tests/checkfs/checkfs.c @@ -167,11 +167,11 @@ int setupSerial (const char *dev) { fd = open(dev,O_RDWR | O_NDELAY ); if (fd < 0) { - fprintf(stderr, "%s: %s\n", dev, sys_errlist[errno]); + fprintf(stderr, "%s: %s\n", dev, strerror(errno)); exit(1); } if (tcgetattr(fd, &tios) < 0) { - fprintf(stderr,"Could not get terminal attributes: %s",sys_errlist[errno]); + fprintf(stderr, "Could not get terminal attributes: %s", strerror(errno)); exit(1); } @@ -197,7 +197,7 @@ int setupSerial (const char *dev) { cfsetispeed (&tios, B9600); if (tcsetattr(fd, TCSAFLUSH, &tios) < 0) { - fprintf(stderr,"Could not set attributes: ,%s",sys_errlist[errno]); + fprintf(stderr, "Could not set attributes: ,%s", strerror(errno)); exit(1); } return fd; -- cgit v1.2.3