[Libsysio-commit] HEAD: libsysio/dev stddev.c
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2009-06-24 15:38:56
|
Update of /cvsroot/libsysio/libsysio/dev In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28796 Modified Files: stddev.c Log Message: Both the read and write routines would abort on an unrecognized minor device number. That's, um, sub-optimal. They just return -ENODEV now, as they should have all along. Index: stddev.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/dev/stddev.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -b -B -p -r1.3 -r1.4 --- stddev.c 11 Jul 2008 18:23:56 -0000 1.3 +++ stddev.c 24 Jun 2009 15:38:51 -0000 1.4 @@ -149,7 +149,8 @@ doread(void *cp, size_t n, _SYSIO_OFF_T cc = (ssize_t )n; break; default: - abort(); + cc = -ENODEV; + break; } return cc; } @@ -178,7 +179,8 @@ dowrite(void *cp __IS_UNUSED, cc = -ENOSPC; break; default: - abort(); + cc = -ENODEV; + break; } return cc; } |