Skip to content

Commit

Permalink
common: CORE_LOG_WARNING_W_ERRNO integration
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed Jan 30, 2024
1 parent 56944eb commit e45af55
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/common/uuid_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ util_uuid_generate(uuid_t uuid)
int fd = os_open(POOL_HDR_UUID_GEN_FILE, O_RDONLY);
if (fd < 0) {
/* Fatal error */
CORE_LOG_WARNING("!open(uuid)");
CORE_LOG_WARNING_W_ERRNO("open(uuid)");
return -1;
}
ssize_t num = read(fd, uu, POOL_HDR_UUID_STR_LEN);
if (num < POOL_HDR_UUID_STR_LEN) {
/* Fatal error */
CORE_LOG_WARNING("!read(uuid)");
CORE_LOG_WARNING_W_ERRNO("read(uuid)");
os_close(fd);
return -1;
}
Expand Down
6 changes: 3 additions & 3 deletions src/libpmemobj/obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ obj_ctl_init_and_load(PMEMobjpool *pop)
LOG(3, "pop %p", pop);

if (pop != NULL && (pop->ctl = ctl_new()) == NULL) {
CORE_LOG_WARNING("!ctl_new");
CORE_LOG_WARNING_W_ERRNO("ctl_new");
return -1;
}

Expand Down Expand Up @@ -1186,7 +1186,7 @@ obj_check_basic_local(PMEMobjpool *pop, size_t mapped_size)
}

if ((errno = lane_check(pop)) != 0) {
CORE_LOG_WARNING("!lane_check");
CORE_LOG_WARNING_W_ERRNO("lane_check");
consistent = 0;
}

Expand All @@ -1195,7 +1195,7 @@ obj_check_basic_local(PMEMobjpool *pop, size_t mapped_size)
errno = palloc_heap_check((char *)pop + pop->heap_offset,
heap_size);
if (errno != 0) {
CORE_LOG_WARNING("!heap_check");
CORE_LOG_WARNING_W_ERRNO("heap_check");
consistent = 0;
}

Expand Down
2 changes: 1 addition & 1 deletion src/libpmempool/rm.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#define ERR_F(f, ...) do {\
if (CHECK_FLAG((f), FORCE))\
CORE_LOG_WARNING("!(ignored) " __VA_ARGS__);\
CORE_LOG_WARNING_W_ERRNO("(ignored) " __VA_ARGS__);\
else\
ERR_WO_ERRNO(__VA_ARGS__);\
} while (0)
Expand Down

0 comments on commit e45af55

Please sign in to comment.