This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
2019-07-27 15:48:56 +02:00
|
|
|
#include "../src/ipc.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
#define SERVICE_NAME "example"
|
|
|
|
|
|
|
|
int main(int argc, char * argv[])
|
|
|
|
{
|
|
|
|
char path[PATH_MAX];
|
|
|
|
char * sname = SERVICE_NAME;
|
|
|
|
|
2020-07-13 14:12:08 +02:00
|
|
|
if (argc == 2) {
|
2019-07-27 15:48:56 +02:00
|
|
|
sname = argv[1];
|
|
|
|
}
|
|
|
|
else if (argc != 1) {
|
|
|
|
fprintf (stderr, "usage: %s [service-name index version]\n", argv[0]);
|
|
|
|
return EXIT_FAILURE;
|
|
|
|
}
|
|
|
|
|
2020-07-13 14:12:08 +02:00
|
|
|
service_path (path, sname);
|
2019-07-27 15:48:56 +02:00
|
|
|
|
|
|
|
// printf ("servicename: %s, index: %d, version: %d\n", sname, index, version);
|
|
|
|
printf ("%s\n", path);
|
|
|
|
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|