Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions hexagonrpcd/hexagonrpcd.1
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
hexagonrpcd - Server for FastRPC remote procedure calls from Qualcomm DSPs
.SH SYNOPSIS
\fBhexagonrpcd\fP [\fIoptions\&.\&.\&.\fP] -f \fIDEVICE
.PP
\fBhexagonrpcd\fP -h
.SH DESCRIPTION
Server for FastRPC remote procedure calls from Qualcomm DSPs\&.
.PP
Expand All @@ -25,6 +27,9 @@ Root directory of served files (default: /usr/share/qcom/)
.TP
\fB\-s\fP
Attach to sensorspd
.TP
\fB\-h\fP
Print help and exit
.PP
.SH NOTES

Expand Down
10 changes: 8 additions & 2 deletions hexagonrpcd/rpcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ static void print_usage(const char *argv0)
"\t-f DEVICE\tFastRPC device node to attach to\n"
"\t-p PROGRAM\tRun client program with shared file descriptor\n"
"\t-R DIR\t\tRoot directory of served files (default: /usr/share/qcom/)\n"
"\t-s\t\tAttach to sensorspd\n");
"\t-s\t\tAttach to sensorspd\n"
"\t-h\t\tPrint help and exit\n");
}

static int create_shell_pd(int fd, const char *create_shell)
Expand Down Expand Up @@ -372,7 +373,7 @@ int main(int argc, char* argv[])
if (guessed_device_dir != NULL)
device_dir = guessed_device_dir;

while ((opt = getopt(argc, argv, "c:d:f:p:R:s")) != -1) {
while ((opt = getopt(argc, argv, "c:d:f:p:R:sh")) != -1) {
switch (opt) {
case 'c':
create_shell = optarg;
Expand All @@ -393,6 +394,10 @@ int main(int argc, char* argv[])
case 's':
attach_sns = true;
break;
case 'h':
print_usage(argv[0]);
goto free_pids;
break;
default:
print_usage(argv[0]);
goto err_free_pids;
Expand Down Expand Up @@ -438,6 +443,7 @@ int main(int argc, char* argv[])
terminate_clients(n_progs, pids);

close(fd);
free_pids:
free(pids);
free(progs);

Expand Down
Loading