#include <stdlib.h>
#include <string.h>
+#include <shared/util.h>
+
#include <libkmod/libkmod.h>
#include "kmod.h"
cmd = argv[optind];
for (i = 0, err = -EINVAL; i < ARRAY_SIZE(kmod_cmds); i++) {
- if (strcmp(kmod_cmds[i]->name, cmd) == 0) {
+ if (streq(kmod_cmds[i]->name, cmd)) {
err = kmod_cmds[i]->cmd(--argc, ++argv);
break;
}
cmd = basename(argv[0]);
for (i = 0; i < ARRAY_SIZE(kmod_compat_cmds); i++) {
- if (strcmp(kmod_compat_cmds[i]->name, cmd) == 0)
+ if (streq(kmod_compat_cmds[i]->name, cmd))
return kmod_compat_cmds[i]->cmd(argc, argv);
}
{
int err;
- if (strcmp(program_invocation_short_name, "kmod") == 0)
+ if (streq(program_invocation_short_name, "kmod"))
err = handle_kmod_commands(argc, argv);
else
err = handle_kmod_compat_commands(argc, argv);