/
githubmirror
/
ndctl
Обзор
Документация
Войти
/
githubmirror
/
ndctl
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
util/main.h
35 строк
958 B
Vishal Verma
cxl: add a cxl utility and libcxl library
10 дек 2021, 00:06
10 дек 2021, 00:06
6cd8155
Код
Авторство
О чём код?
/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2015-2020 Intel Corporation. All rights reserved. */ /* Copyright (C) 2006 Linus Torvalds. All rights reserved. */ /* originally copied from perf and git */ #ifndef __MAIN_H__ #define __MAIN_H__ enum program { PROG_NDCTL, PROG_DAXCTL, PROG_CXL, }; struct ndctl_ctx; struct daxctl_ctx; struct cxl_ctx; struct cmd_struct { const char *cmd; union { int (*n_fn)(int, const char **, struct ndctl_ctx *ctx); int (*d_fn)(int, const char **, struct daxctl_ctx *ctx); int (*c_fn)(int, const char **, struct cxl_ctx *ctx); }; }; int main_handle_options(const char ***argv, int *argc, const char *usage_msg, struct cmd_struct *cmds, int num_cmds); void main_handle_internal_command(int argc, const char **argv, void *ctx, struct cmd_struct *cmds, int num_cmds, enum program prog); int help_show_man_page(const char *cmd, const char *util_name, const char *viewer); #endif /* __MAIN_H__ */