# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by scripts/Create-CopyPatch. # # T2 SDE: package/.../kmod/target.patch.cross0 # Copyright (C) 2020 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- Handle $target-kmod symlinks, too. - René Rebe --- kmod-27/tools/kmod.c.vanilla 2020-03-07 20:08:24.279150576 +0100 +++ kmod-27/tools/kmod.c 2020-03-07 20:11:17.915150660 +0100 @@ -157,7 +157,12 @@ size_t i; cmd = basename(argv[0]); - + for (i = 0; cmd[i]; ++i) { + if (cmd[i] == '-') { + cmd += i + 1; + i = 0; + } + } for (i = 0; i < ARRAY_SIZE(kmod_compat_cmds); i++) { if (streq(kmod_compat_cmds[i]->name, cmd)) return kmod_compat_cmds[i]->cmd(argc, argv);