seatd-launch: Remove socket path command line arg
This should not need to be configured, so remove the argument. If downstream prefers a different folder, the location can be made compile-time configurable like for seatd itself.
This commit is contained in:
parent
32d06482d3
commit
10658dc543
1 changed files with 5 additions and 13 deletions
|
@ -15,18 +15,13 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
const char *usage = "Usage: seatd-launch [options] [--] command\n"
|
const char *usage = "Usage: seatd-launch [options] [--] command\n"
|
||||||
"\n"
|
"\n"
|
||||||
" -h Show this help message\n"
|
" -h Show this help message\n"
|
||||||
" -s <path> Where to create the seatd socket\n"
|
" -v Show the version number\n"
|
||||||
" -v Show the version number\n"
|
|
||||||
"\n";
|
"\n";
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
char *sockpath = NULL;
|
while ((c = getopt(argc, argv, "vh")) != -1) {
|
||||||
while ((c = getopt(argc, argv, "vhs:")) != -1) {
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 's':
|
|
||||||
sockpath = optarg;
|
|
||||||
break;
|
|
||||||
case 'v':
|
case 'v':
|
||||||
printf("seatd-launch version %s\n", SEATD_VERSION);
|
printf("seatd-launch version %s\n", SEATD_VERSION);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -47,11 +42,8 @@ int main(int argc, char *argv[]) {
|
||||||
}
|
}
|
||||||
char **command = &argv[optind];
|
char **command = &argv[optind];
|
||||||
|
|
||||||
char sockbuf[256];
|
char sockpath[256];
|
||||||
if (sockpath == NULL) {
|
sprintf(sockpath, "/tmp/seatd.%d.sock", getpid());
|
||||||
sprintf(sockbuf, "/tmp/seatd.%d.sock", getpid());
|
|
||||||
sockpath = sockbuf;
|
|
||||||
}
|
|
||||||
|
|
||||||
int fds[2];
|
int fds[2];
|
||||||
if (pipe(fds) == -1) {
|
if (pipe(fds) == -1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue