Compare commits
4 Commits
OpenHarmon
...
OpenHarmon
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d7641af53 | ||
|
|
143309945a | ||
|
|
9c1e902b55 | ||
|
|
84011c89a5 |
@@ -46,7 +46,7 @@ INT32 LOS_StrncpyFromUser(CHAR *dst, const CHAR *src, INT32 count)
|
||||
}
|
||||
|
||||
maxCount = (LOS_IsUserAddressRange((VADDR_T)(UINTPTR)src, (size_t)count)) ? \
|
||||
count : (USER_ASPACE_TOP_MAX - (UINTPTR)src);
|
||||
count : (INT32)(USER_ASPACE_TOP_MAX - (UINTPTR)src);
|
||||
|
||||
for (i = 0; i < maxCount; ++i) {
|
||||
if (LOS_GetUser(&character, src + offset) != LOS_OK) {
|
||||
|
||||
@@ -134,7 +134,7 @@ int fallocate64(int fd, int mode, off64_t offset, off64_t len)
|
||||
return VFS_ERROR;
|
||||
}
|
||||
|
||||
if (filep->f_oflags & O_DIRECTORY)
|
||||
if ((unsigned int)filep->f_oflags & O_DIRECTORY)
|
||||
{
|
||||
set_errno(EBADF);
|
||||
return VFS_ERROR;
|
||||
|
||||
@@ -1197,15 +1197,15 @@ LITE_OS_SEC_TEXT int LiteIpcIoctl(struct file *filep, int cmd, unsigned long arg
|
||||
}
|
||||
switch (cmd) {
|
||||
case IPC_SET_CMS:
|
||||
return SetCms(arg);
|
||||
return (INT32)SetCms(arg);
|
||||
case IPC_CMS_CMD:
|
||||
return HandleCmsCmd((CmsCmdContent *)(UINTPTR)arg);
|
||||
return (INT32)HandleCmsCmd((CmsCmdContent *)(UINTPTR)arg);
|
||||
case IPC_SET_IPC_THREAD:
|
||||
if (IsCmsSet() == FALSE) {
|
||||
PRINT_ERR("ServiceManager not set!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
return SetIpcTask();
|
||||
return (INT32)SetIpcTask();
|
||||
case IPC_SEND_RECV_MSG:
|
||||
if (arg == 0) {
|
||||
return -EINVAL;
|
||||
@@ -1216,12 +1216,12 @@ LITE_OS_SEC_TEXT int LiteIpcIoctl(struct file *filep, int cmd, unsigned long arg
|
||||
}
|
||||
ret = LiteIpcMsgHandle((IpcContent *)(UINTPTR)arg);
|
||||
if (ret != LOS_OK) {
|
||||
return ret;
|
||||
return (INT32)ret;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
PRINT_ERR("Unknow liteipc ioctl cmd:%d\n", cmd);
|
||||
return -EINVAL;
|
||||
}
|
||||
return ret;
|
||||
return (INT32)ret;
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ static int HiLogBufferCopy(unsigned char *dst, unsigned dstLen, unsigned char *s
|
||||
|
||||
static int HiLogReadRingBuffer(unsigned char *buffer, size_t bufLen)
|
||||
{
|
||||
size_t retval;
|
||||
int retval;
|
||||
size_t bufLeft = HILOG_BUFFER - g_hiLogDev.headOffset;
|
||||
if (bufLeft > bufLen) {
|
||||
retval = HiLogBufferCopy(buffer, bufLen, HiLogBufferHead(), bufLen);
|
||||
|
||||
Reference in New Issue
Block a user