This program which is fromhttp://www.kernel.org/doc/man-p...kie.3.html
It also stated that if error happens, write should return -1;
But I found that returning -1 will crash the program. The reason is
explained in this bugzilla report.http://sourceware.org/bugzilla/show_bug.cgi?id 74
But glibc did fix the above bug.
Linux driver will also return negative value when error happens, Does
it have the same problem as the program here?
memfile_write(void *c, const char *buf, size_t size)
Copyright © 2001-2013 GNT Media