tb input from ps2kb
This commit is contained in:
@ -41,7 +41,7 @@ void set_config(void) {
|
||||
} else if (string_strcmp(CONFIG.modestr, "runfile") == 0) {
|
||||
CONFIG.mode = MODE_RUNFILE;
|
||||
} else {
|
||||
LOG(LOG_ERR, "Unknown mode {s}\n", CONFIG.modestr);
|
||||
LOG(LOG_ERR, "Unknown mode %s\n", CONFIG.modestr);
|
||||
}
|
||||
} else {
|
||||
CONFIG.mode = MODE_RUNFILE;
|
||||
@ -53,7 +53,7 @@ void do_file(char *filepath) {
|
||||
|
||||
int32_t ioh = ioctl(IOCTL_NOHANDLE, IOCTL_OPENF, (uint64_t)filepath, IOCTL_F_READ, 0);
|
||||
if (ioh < 0) {
|
||||
LOG(LOG_ERR, "Could not open {s}: {s}\n", filepath, ERRSTRING(ioh));
|
||||
LOG(LOG_ERR, "Could not open %s: %s\n", filepath, ERRSTRING(ioh));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -61,14 +61,14 @@ void do_file(char *filepath) {
|
||||
|
||||
ioctl(ioh, IOCTL_STAT, (uint64_t)&statbuf, 0, 0);
|
||||
if (statbuf.type != IOCTLSTAT_FILE) {
|
||||
LOG(LOG_ERR, "{s} is not a file ({d})\n", filepath, statbuf.type);
|
||||
LOG(LOG_ERR, "%s is not a file (%d)\n", filepath, statbuf.type);
|
||||
return;
|
||||
}
|
||||
uint8_t *buf = umalloc(statbuf.size+1);
|
||||
string_memset(buf, 0, statbuf.size+1);
|
||||
|
||||
if ((ret = ioctl(ioh, IOCTL_READ, (uint64_t)buf, statbuf.size, 0)) < 0) {
|
||||
LOG(LOG_ERR, "Could not read {s} ({d}): {s}\n", filepath, ioh, ERRSTRING(ioh));
|
||||
LOG(LOG_ERR, "Could not read %s (%d): %s\n", filepath, ioh, ERRSTRING(ioh));
|
||||
goto done;
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ void do_mode_interactive(void) {
|
||||
uprintf("\n");
|
||||
InterpResult *res;
|
||||
if (!interp_runstring(linebuf, &res, CONFIG.logcmds, CONFIG.mode == MODE_INTERACTIVE)) {
|
||||
LOG(LOG_ERR, "{s}\n", res->errmsg);
|
||||
LOG(LOG_ERR, "%s\n", res->errmsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user