aboutsummaryrefslogtreecommitdiff
path: root/seatd-launch/seatd-launch.c
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2022-02-21 11:46:48 +0100
committerKenny Levinsen <kl@kl.wtf>2022-02-21 12:02:31 +0100
commit10658dc5439db429af0088295a051c53925a4416 (patch)
tree0f6ebdd28fc7e609e24baeb6167e80805f4897bb /seatd-launch/seatd-launch.c
parent32d06482d3aeaac166d76912fcba53fa8dfb2fcf (diff)
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.
Diffstat (limited to 'seatd-launch/seatd-launch.c')
-rw-r--r--seatd-launch/seatd-launch.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/seatd-launch/seatd-launch.c b/seatd-launch/seatd-launch.c
index 0075efb..4f15616 100644
--- a/seatd-launch/seatd-launch.c
+++ b/seatd-launch/seatd-launch.c
@@ -15,18 +15,13 @@ int main(int argc, char *argv[]) {
const char *usage = "Usage: seatd-launch [options] [--] command\n"
"\n"
- " -h Show this help message\n"
- " -s <path> Where to create the seatd socket\n"
- " -v Show the version number\n"
+ " -h Show this help message\n"
+ " -v Show the version number\n"
"\n";
int c;
- char *sockpath = NULL;
- while ((c = getopt(argc, argv, "vhs:")) != -1) {
+ while ((c = getopt(argc, argv, "vh")) != -1) {
switch (c) {
- case 's':
- sockpath = optarg;
- break;
case 'v':
printf("seatd-launch version %s\n", SEATD_VERSION);
return 0;
@@ -47,11 +42,8 @@ int main(int argc, char *argv[]) {
}
char **command = &argv[optind];
- char sockbuf[256];
- if (sockpath == NULL) {
- sprintf(sockbuf, "/tmp/seatd.%d.sock", getpid());
- sockpath = sockbuf;
- }
+ char sockpath[256];
+ sprintf(sockpath, "/tmp/seatd.%d.sock", getpid());
int fds[2];
if (pipe(fds) == -1) {