# HG changeset patch # User nick # Date 1012728575 0 # Node ID 0e4cffa369e4b1c6bc06616098d2b1721eb76bff # Parent 382a3c60629e5de599fbbad7ba31c0aabbb0d081 Be more precise diff -r 382a3c60629e -r 0e4cffa369e4 libdha/mtrr.c --- a/libdha/mtrr.c Sun Feb 03 09:28:58 2002 +0000 +++ b/libdha/mtrr.c Sun Feb 03 09:29:35 2002 +0000 @@ -31,18 +31,23 @@ mtrr_fd = fopen("/proc/mtrr","wt"); if(mtrr_fd) { - fprintf(mtrr_fd,"base=0x%08X size=0x%08X type=%s\n",base,size,stype); - printf("base=0x%08X size=0x%08X type=%s\n",base,size,stype); + char sout[256]; + unsigned wr_len; + sprintf(sout,"base=0x%08X size=0x%08X type=%s\n",base,size,stype); + wr_len = fprintf(mtrr_fd,sout); + /*printf("MTRR: %s\n",sout);*/ fclose(mtrr_fd); - return 0; + return wr_len == strlen(sout) ? 0 : EPERM; } return ENOSYS; #else #warning Please port MTRR stuff!!! + return ENOSYS #endif } #else int mtrr_set_type(unsigned base,unsigned size,int type) { + return ENOSYS; } #endif \ No newline at end of file