am 0c3d19ff
: Merge "libcutils: 64-bit compile issues"
* commit '0c3d19ff3db7b04081a7a729a81642c5903f741a': libcutils: 64-bit compile issues
This commit is contained in:
commit
c1790a0b99
1 changed files with 11 additions and 9 deletions
|
@ -19,14 +19,16 @@
|
|||
|
||||
#define LOG_TAG "qtaguid"
|
||||
|
||||
#include <cutils/qtaguid.h>
|
||||
#include <cutils/log.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#include <cutils/qtaguid.h>
|
||||
#include <log/log.h>
|
||||
|
||||
static const char* CTRL_PROCPATH = "/proc/net/xt_qtaguid/ctrl";
|
||||
static const int CTRL_MAX_INPUT_LEN = 128;
|
||||
|
@ -103,13 +105,13 @@ int qtaguid_tagSocket(int sockfd, int tag, uid_t uid) {
|
|||
|
||||
pthread_once(&resTrackInitDone, qtaguid_resTrack);
|
||||
|
||||
snprintf(lineBuf, sizeof(lineBuf), "t %d %llu %d", sockfd, kTag, uid);
|
||||
snprintf(lineBuf, sizeof(lineBuf), "t %d %" PRIu64 " %d", sockfd, kTag, uid);
|
||||
|
||||
ALOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid);
|
||||
ALOGV("Tagging socket %d with tag %" PRIx64 "{%u,0} for uid %d", sockfd, kTag, tag, uid);
|
||||
|
||||
res = write_ctrl(lineBuf);
|
||||
if (res < 0) {
|
||||
ALOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d",
|
||||
ALOGI("Tagging socket %d with tag %" PRIx64 "(%d) for uid %d failed errno=%d",
|
||||
sockfd, kTag, tag, uid, res);
|
||||
}
|
||||
|
||||
|
@ -147,14 +149,14 @@ int qtaguid_deleteTagData(int tag, uid_t uid) {
|
|||
int fd, cnt = 0, res = 0;
|
||||
uint64_t kTag = (uint64_t)tag << 32;
|
||||
|
||||
ALOGV("Deleting tag data with tag %llx{%d,0} for uid %d", kTag, tag, uid);
|
||||
ALOGV("Deleting tag data with tag %" PRIx64 "{%d,0} for uid %d", kTag, tag, uid);
|
||||
|
||||
pthread_once(&resTrackInitDone, qtaguid_resTrack);
|
||||
|
||||
snprintf(lineBuf, sizeof(lineBuf), "d %llu %d", kTag, uid);
|
||||
snprintf(lineBuf, sizeof(lineBuf), "d %" PRIu64 " %d", kTag, uid);
|
||||
res = write_ctrl(lineBuf);
|
||||
if (res < 0) {
|
||||
ALOGI("Deleteing tag data with tag %llx/%d for uid %d failed with cnt=%d errno=%d",
|
||||
ALOGI("Deleting tag data with tag %" PRIx64 "/%d for uid %d failed with cnt=%d errno=%d",
|
||||
kTag, tag, uid, cnt, errno);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue