Skip to content

Commit

Permalink
examples: print a message in case no pmem provided or able to be used
Browse files Browse the repository at this point in the history
  • Loading branch information
Pzbierski committed Aug 8, 2021
1 parent 5514daf commit 6bd7786
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/03-read-to-persistent/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ main(int argc, char *argv[])
#endif

/* if no pmem support or it is not provided */
if (mr_ptr == NULL) {
{

printer(); /*add printf */
print_no_pmem_detected(); /*print_no_pmem_detected */

mr_ptr = malloc_aligned(sizeof(struct hello_t));
if (mr_ptr == NULL)
Expand Down
4 changes: 2 additions & 2 deletions examples/common/common-conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ common_disconnect_and_wait_for_conn_close(struct rpma_conn **conn_ptr)
}

void
printer()
print_no_pmem_detected()
{
printf("No pmem supportt or pow to pmem no provity \n"); /*add printf */
printf("PMEM not detected or a path to PMEM not provided. Example usage of functions using PMEM skipped. \n"); /*add printf */
}
4 changes: 2 additions & 2 deletions examples/common/common-conn.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/* Copyright 2020, Intel Corporation */
/* Copyright 2020-2021 , Intel Corporation */

/*
* common-conn.h -- a common connection functions declarations for examples
Expand Down Expand Up @@ -61,5 +61,5 @@ int server_accept_connection(struct rpma_ep *ep, struct rpma_conn_cfg *cfg,

int common_wait_for_conn_close_and_disconnect(struct rpma_conn **conn_ptr);
int common_disconnect_and_wait_for_conn_close(struct rpma_conn **conn_ptr);
void printer();
void print_no_pmem_detected();
#endif /* EXAMPLES_COMMON */

0 comments on commit 6bd7786

Please sign in to comment.