ref: ec19c5697f3caf52e6be57049169e2eb048299e6
parent: 75337cba3a21530c7da1efaa1ab3b6ed145c5172
author: Jacob Moody <[email protected]>
date: Tue Mar 21 16:55:49 EDT 2023
v8e: clean unused argument and tidy usage (thanks mkf)
--- a/sys/src/games/v8e/v8e.c
+++ b/sys/src/games/v8e/v8e.c
@@ -85,7 +85,7 @@
}
static int
-shload(int fd, char *file, char **argv, char **envp)
+shload(int fd, char **argv, char **envp)
{
char buf[256];
char *s, *a;
@@ -139,7 +139,7 @@
if(fd < 0) return -1;
if(readn(fd, hdr, 2) < 2) return -1;
if(hdr[0] == '#' && hdr[1] == '!')
- return shload(fd, file, argv, envp);
+ return shload(fd, argv, envp);
if(readn(fd, hdr + 2, 30) < 30) return -1;
hmagic = U32(&hdr[0]);
htext = U32(&hdr[4]);
@@ -180,7 +180,8 @@
static void
usage(void)
{
- sysfatal("usage");
+ fprint(2, "usage: %s file\n", argv0);
+ exits("usage");
}
void