Commit 4f08674f authored by Kinga Wujek's avatar Kinga Wujek Committed by Adam Wujek

userspace/tools: make rtu_stat to read shmem from another location

Signed-off-by: 's avatarKinga Wujek <dev_public@wujek.eu>
parent bbfe02a5
Pipeline #729 failed with stage
in 102 minutes and 48 seconds
......@@ -133,8 +133,9 @@ char *decode_ports(int dpm, int nports)
void show_help(char *prgname)
{
fprintf(stderr, "usage: %s <command> <values>\n", prgname);
fprintf(stderr, " help: Show this message\n");
fprintf(stderr, " list: List the routing table (same as empty command)\n");
fprintf(stderr, " help: Show this message\n");
fprintf(stderr, " list: List the routing table (same as empty command)\n");
fprintf(stderr, " list shmem <path>: List the routing table read from shmem at a given directory\n");
fprintf(stderr, " remove all <port> [<type>]: Remove all RTU entries for the given port\n"
" with an optional type (default %d-dynamic)\n",
RTU_ENTRY_TYPE_DYNAMIC);
......@@ -537,6 +538,17 @@ int main(int argc, char **argv)
int enable;
uint32_t mask;
/* change of a path to shmem has to be done before openning shmem */
if (argc >= 4
&& !strcmp(argv[1], "list")
&& !strcmp(argv[2], "shmem")) {
printf("set shmem path to: %s\n", argv[3]);
wrs_shm_set_path(argv[3]);
/* ignore WRS_SHM_LOCKED flag (don't check if process
* is alive) */
wrs_shm_ignore_flag_locked(1);
}
nports = get_nports_from_hal();
while (!(rtud_ch = minipc_client_create("rtud", 0)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment