summaryrefslogtreecommitdiffstats
path: root/libdha
diff options
context:
space:
mode:
authornick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-03 09:29:35 +0000
committernick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-03 09:29:35 +0000
commit77f4d19adf137912fb0cbccaec6d3d663adbeb0e (patch)
tree9fe2fc6e4c76c872eb9fefa1342c488eaf315a63 /libdha
parent104c125e6d512736abb1e07a60071da06b984548 (diff)
downloadmpv-77f4d19adf137912fb0cbccaec6d3d663adbeb0e.tar.bz2
mpv-77f4d19adf137912fb0cbccaec6d3d663adbeb0e.tar.xz
Be more precise
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4496 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libdha')
-rw-r--r--libdha/mtrr.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libdha/mtrr.c b/libdha/mtrr.c
index 4373b0f808..8a8e9b2e51 100644
--- a/libdha/mtrr.c
+++ b/libdha/mtrr.c
@@ -31,18 +31,23 @@ int mtrr_set_type(unsigned base,unsigned size,int type)
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