ddk: update

git-svn-id: svn://kolibrios.org@6587 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2016-10-11 22:54:59 +00:00
parent 0de6e52a90
commit c6a90cef0f
3 changed files with 22 additions and 27 deletions

View File

@ -33,6 +33,7 @@ NAME_SRCS:= \
io/write.c \
linux/bitmap.c \
linux/ctype.c \
linux/div64.c \
linux/dmapool.c \
linux/dmi.c \
linux/fbsysfs.c \

View File

@ -150,31 +150,4 @@ int dbgprintf(const char* format, ...)
return len;
}
int xf86DrvMsg(int skip, int code, const char* format, ...)
{
char txtbuf[1024];
unsigned writes;
va_list ap;
int len = 0;
va_start(ap, format);
if (format)
len = vsnprintf(txtbuf, 1024, format, ap);
va_end(ap);
if( len )
{
SysMsgBoardStr(txtbuf);
if(dbgfile.path)
{
write_file(dbgfile.path,txtbuf,dbgfile.offset,len,&writes);
dbgfile.offset+=writes;
};
};
return len;
}

21
drivers/ddk/linux/div64.c Normal file
View File

@ -0,0 +1,21 @@
#include <linux/export.h>
#include <linux/kernel.h>
#include <linux/math64.h>
s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
{
u64 quotient;
if (dividend < 0) {
quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder);
*remainder = -*remainder;
if (divisor > 0)
quotient = -quotient;
} else {
quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder);
if (divisor < 0)
quotient = -quotient;
}
return quotient;
}