lkml.org 
[lkml]   [1999]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: CD-RW
Date
From
alex.buell@tahallah.demon.co.uk said:

[...]

> Here's a patch to get rid of sys_errlist and replace it with strerror.
> That is what POSIX tells us to do, right?
>
> Only in em-4.0.15-lt-new: em
> diff -ur em-4.0.15-lt/lock.c em-4.0.15-lt-new/lock.c
> --- em-4.0.15-lt/lock.c Sun May 16 08:04:17 1999
> +++ em-4.0.15-lt-new/lock.c Mon May 24 13:50:57 1999
> @@ -153,7 +153,7 @@
> strcpy(obuf, errstr);
> strcat(obuf, " - ");
> if (errno < sys_nerr)
> - strcat(obuf, sys_errlist[errno]);
> + strcat(obuf, strerror(errno));
> else
> strcat(obuf, "(can not get system error message)");
> mlwrite(obuf);

The while "if (errno < sys_nerr)" can be safely replaced by:
strcat(obuf, strerror(errno));

as the manual page assures that a reasonable message is given if the errno
is unknown.
--
Horst von Brand vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viña del Mar, Chile +56 32 672616


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:51    [from the cache]
©2003-2011 Jasper Spaans