Hi Maxim, Maxim Cournoyer skribis: >> +(define kexec-load-file >> + (let* ((proc (syscall->procedure int "syscall" >> + (list long ;sysno >> + int ;kernel fd >> + int ;initrd fd >> + unsigned-long ;cmdline length >> + '* ;cmdline >> + unsigned-long))) ;flags >> + ;; TODO: Don't do this. > > Why this TODO? "Don't do this" is not explicit enough; what would be > preferable to do here, but can't be done now for some reason? The TODO is actually copy/pasted for a few lines above, but I agree it’s not very clear nor helpful. Presumably it’s here to mean that using the ‘syscall’ function and having to record syscall numbers of each architecture is not great. There’s no alternative though, at this time. > Could we instead detect the error as returned by the syscall when it's > not implemented, and throw/report the error accordingly? I see that's > kind of done below (a misc-error is raised) -- I think we can remove > this special handling already and let the error be throw if it's not > implemented -- this removes the need to remember to come back here to > edit the list of supported systems the day they gain support. Yes. Plus I got the magic numbers wrong it seems (protip: it’s easier to grep glibc than Linux to get them), so this gives us this change: