[Accel-config] [PATCH v1 7/8] accel-config: Return error if no args

ramesh.thomas at intel.com
Newsgroups dev.linux.lists.accel-config
Message-ID <[email protected]>
From: Ramesh Thomas <ramesh.thomas(a)intel.com>

Return an error after displaying an help message if accel-config was
run without any argument.

Signed-off-by: Ramesh Thomas <ramesh.thomas(a)intel.com>
---
 accfg/accel-config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/accfg/accel-config.c b/accfg/accel-config.c
index de6fdb9..d373f88 100644
--- a/accfg/accel-config.c
+++ b/accfg/accel-config.c
@@ -118,7 +118,7 @@ int main(int argc, const char **argv)
 		/* The user didn't specify a command; give them help */
 		printf("\n usage: %s\n\n", accfg_usage_string);
 		printf("\n %s\n\n", accfg_more_info_string);
-		return 0;
+		return -EINVAL;
 	}
 
 	rc = idxd_kmod_init(&kmod_ctx, &mod);
-- 
2.26.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.