Lines Matching refs:res
355 base::Result<void> res = currentMap.iterate(countUidStatsEntries); in tagSocket() local
356 if (!res.ok()) { in tagSocket()
358 strerror(res.error().code())); in tagSocket()
359 return -res.error().code(); in tagSocket()
374 res = mCookieTagMap.writeValue(sock_cookie, newKey, BPF_ANY); in tagSocket()
375 if (!res.ok()) { in tagSocket()
376 ALOGE("Failed to tag the socket: %s, fd: %d", strerror(res.error().code()), in tagSocket()
378 return -res.error().code(); in tagSocket()
392 base::Result<void> res = mCookieTagMap.deleteValue(sock_cookie); in untagSocket() local
393 if (!res.ok()) { in untagSocket()
394 ALOGE("Failed to untag socket: %s\n", strerror(res.error().code())); in untagSocket()
395 return -res.error().code(); in untagSocket()
414 Status res = mUidCounterSetMap.deleteValue(uid); in setCounterSet() local
415 if (isOk(res) || (!isOk(res) && res.code() == ENOENT)) { in setCounterSet()
418 ALOGE("Failed to delete the counterSet: %s\n", strerror(res.code())); in setCounterSet()
419 return -res.code(); in setCounterSet()
423 Status res = mUidCounterSetMap.writeValue(uid, tmpCounterSetNum, BPF_ANY); in setCounterSet() local
424 if (!isOk(res)) { in setCounterSet()
425 ALOGE("Failed to set the counterSet: %s, fd: %d", strerror(res.code()), in setCounterSet()
427 return -res.code(); in setCounterSet()
450 auto res = map.deleteValue(key); in deleteTagData() local
451 if (res.ok() || (res.error().code() == ENOENT)) { in deleteTagData()
455 strerror(res.error().code())); in deleteTagData()
466 auto res = map.deleteValue(key); in deleteTagData() local
467 if (res.ok() || (res.error().code() == ENOENT)) { in deleteTagData()
472 strerror(res.error().code())); in deleteTagData()
482 auto res = mUidCounterSetMap.deleteValue(uid); in deleteTagData() local
483 if (!res.ok() && res.error().code() != ENOENT) { in deleteTagData()
485 strerror(res.error().code())); in deleteTagData()
491 auto res = map.deleteValue(key); in deleteTagData() local
492 if (res.ok() || (res.error().code() == ENOENT)) { in deleteTagData()
495 ALOGE("Failed to delete data(uid=%u): %s", key, strerror(res.error().code())); in deleteTagData()
513 Status res = mIfaceIndexNameMap.writeValue(ifaceIndex, iface, BPF_ANY); in addInterface() local
514 if (!isOk(res)) { in addInterface()
515 ALOGE("Failed to add iface %s(%d): %s", name, ifaceIndex, strerror(res.code())); in addInterface()
516 return -res.code(); in addInterface()
623 Status res; in changeUidOwnerRule() local
626 res = updateOwnerMapEntry(DOZABLE_MATCH, uid, rule, type); in changeUidOwnerRule()
629 res = updateOwnerMapEntry(STANDBY_MATCH, uid, rule, type); in changeUidOwnerRule()
632 res = updateOwnerMapEntry(POWERSAVE_MATCH, uid, rule, type); in changeUidOwnerRule()
638 if (!isOk(res)) { in changeUidOwnerRule()
640 res.msg().c_str(), rule, type); in changeUidOwnerRule()
641 return -res.code(); in changeUidOwnerRule()
710 Status res; in replaceUidOwnerMap() local
712 res = replaceRulesInMap(DOZABLE_MATCH, uids); in replaceUidOwnerMap()
714 res = replaceRulesInMap(STANDBY_MATCH, uids); in replaceUidOwnerMap()
716 res = replaceRulesInMap(POWERSAVE_MATCH, uids); in replaceUidOwnerMap()
721 if (!isOk(res)) { in replaceUidOwnerMap()
722 ALOGE("Failed to clean up chain: %s: %s", name.c_str(), res.msg().c_str()); in replaceUidOwnerMap()
723 return -res.code(); in replaceUidOwnerMap()
737 Status res; in toggleUidOwnerMap() local
755 res = mConfigurationMap.writeValue(key, newConfiguration, BPF_EXIST); in toggleUidOwnerMap()
756 if (!isOk(res)) { in toggleUidOwnerMap()
757 ALOGE("Failed to toggleUidOwnerMap(%d): %s", chain, res.msg().c_str()); in toggleUidOwnerMap()
759 return -res.code(); in toggleUidOwnerMap()
785 auto res = mConfigurationMap.writeValue(CURRENT_STATS_MAP_CONFIGURATION_KEY, newConfigure, in swapActiveStatsMap() local
787 if (!res.ok()) { in swapActiveStatsMap()
788 ALOGE("Failed to toggle the stats map: %s", strerror(res.error().code())); in swapActiveStatsMap()
789 return res; in swapActiveStatsMap()
950 base::Result<void> res = mCookieTagMap.iterateWithValue(printCookieTagInfo); in dump() local
951 if (!res.ok()) { in dump()
952 dw.println("mCookieTagMap print end with error: %s", res.error().message().c_str()); in dump()
962 res = mUidCounterSetMap.iterateWithValue(printUidInfo); in dump()
963 if (!res.ok()) { in dump()
964 dw.println("mUidCounterSetMap print end with error: %s", res.error().message().c_str()); in dump()
976 res = mAppUidStatsMap.iterateWithValue(printAppUidStatsInfo); in dump()
977 if (!res.ok()) { in dump()
978 dw.println("mAppUidStatsMap print end with error: %s", res.error().message().c_str()); in dump()
997 res = mStatsMapA.iterateWithValue(printStatsInfo); in dump()
998 if (!res.ok()) { in dump()
999 dw.println("mStatsMapA print end with error: %s", res.error().message().c_str()); in dump()
1004 res = mStatsMapB.iterateWithValue(printStatsInfo); in dump()
1005 if (!res.ok()) { in dump()
1006 dw.println("mStatsMapB print end with error: %s", res.error().message().c_str()); in dump()
1017 res = mIfaceIndexNameMap.iterateWithValue(printIfaceNameInfo); in dump()
1018 if (!res.ok()) { in dump()
1019 dw.println("mIfaceIndexNameMap print end with error: %s", res.error().message().c_str()); in dump()
1036 res = mIfaceStatsMap.iterateWithValue(printIfaceStatsInfo); in dump()
1037 if (!res.ok()) { in dump()
1038 dw.println("mIfaceStatsMap print end with error: %s", res.error().message().c_str()); in dump()
1088 res = mUidOwnerMap.iterateWithValue(printUidMatchInfo); in dump()
1089 if (!res.ok()) { in dump()
1090 dw.println("mUidOwnerMap print end with error: %s", res.error().message().c_str()); in dump()
1098 res = mUidPermissionMap.iterateWithValue(printUidPermissionInfo); in dump()
1099 if (!res.ok()) { in dump()
1100 dw.println("mUidPermissionMap print end with error: %s", res.error().message().c_str()); in dump()