Lucas De Marchi | 8900b91 | 2011-12-22 02:33:36 -0200 | [diff] [blame] | 1 | /* |
| 2 | * kmod - one tool to rule them all |
| 3 | * |
Lucas De Marchi | e6b0e49 | 2013-01-16 11:27:21 -0200 | [diff] [blame] | 4 | * Copyright (C) 2011-2013 ProFUSION embedded systems |
Lucas De Marchi | 8900b91 | 2011-12-22 02:33:36 -0200 | [diff] [blame] | 5 | * |
| 6 | * This program is free software: you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation, either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 | */ |
| 19 | |
Lucas De Marchi | e8fd8fe | 2012-07-18 10:19:48 -0300 | [diff] [blame] | 20 | #pragma once |
Lucas De Marchi | 8900b91 | 2011-12-22 02:33:36 -0200 | [diff] [blame] | 21 | |
Lucas De Marchi | 576dd43 | 2014-10-02 22:03:19 -0300 | [diff] [blame] | 22 | #include <shared/macro.h> |
Lucas De Marchi | 8900b91 | 2011-12-22 02:33:36 -0200 | [diff] [blame] | 23 | |
| 24 | struct kmod_cmd { |
| 25 | const char *name; |
| 26 | int (*cmd)(int argc, char *argv[]); |
| 27 | const char *help; |
| 28 | }; |
| 29 | |
Lucas De Marchi | 6fcf69e | 2011-12-22 03:01:45 -0200 | [diff] [blame] | 30 | extern const struct kmod_cmd kmod_cmd_compat_lsmod; |
Lucas De Marchi | f712ebc | 2011-12-22 03:39:11 -0200 | [diff] [blame] | 31 | extern const struct kmod_cmd kmod_cmd_compat_rmmod; |
Lucas De Marchi | ad60269 | 2011-12-22 03:45:07 -0200 | [diff] [blame] | 32 | extern const struct kmod_cmd kmod_cmd_compat_insmod; |
Lucas De Marchi | 769becb | 2011-12-22 03:50:54 -0200 | [diff] [blame] | 33 | extern const struct kmod_cmd kmod_cmd_compat_modinfo; |
Lucas De Marchi | fa29c0e | 2011-12-22 03:54:46 -0200 | [diff] [blame] | 34 | extern const struct kmod_cmd kmod_cmd_compat_modprobe; |
Lucas De Marchi | f6cf14c | 2011-12-27 19:56:33 -0200 | [diff] [blame] | 35 | extern const struct kmod_cmd kmod_cmd_compat_depmod; |
Lucas De Marchi | 6fcf69e | 2011-12-22 03:01:45 -0200 | [diff] [blame] | 36 | |
Caio Marcelo de Oliveira Filho | 0376188 | 2015-03-07 10:32:53 -0300 | [diff] [blame] | 37 | extern const struct kmod_cmd kmod_cmd_insert; |
Lucas De Marchi | 252c51a | 2011-12-23 11:33:02 -0200 | [diff] [blame] | 38 | extern const struct kmod_cmd kmod_cmd_list; |
Tom Gundersen | db6f2fc | 2013-04-16 22:39:55 +0200 | [diff] [blame] | 39 | extern const struct kmod_cmd kmod_cmd_static_nodes; |
Caio Marcelo de Oliveira Filho | 0376188 | 2015-03-07 10:32:53 -0300 | [diff] [blame] | 40 | extern const struct kmod_cmd kmod_cmd_remove; |
Lucas De Marchi | 4a2e20d | 2012-11-06 16:54:17 -0200 | [diff] [blame] | 41 | |
Lucas De Marchi | 84341fb | 2012-11-06 17:08:43 -0200 | [diff] [blame] | 42 | #include "log.h" |