[Mplayer-cvslog] CVS: main/libdha mtrr.c,1.1,1.2
Nick Kurshev
nick at mplayer.dev.hu
Sun Feb 3 10:29:38 CET 2002
Update of /cvsroot/mplayer/main/libdha
In directory mplayer:/var/tmp.root/cvs-serv26957/main/libdha
Modified Files:
mtrr.c
Log Message:
Be more precise
Index: mtrr.c
===================================================================
RCS file: /cvsroot/mplayer/main/libdha/mtrr.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mtrr.c 2 Feb 2002 12:14:56 -0000 1.1
+++ mtrr.c 3 Feb 2002 09:29:35 -0000 1.2
@@ -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
More information about the MPlayer-cvslog
mailing list