From bfc66d49806a4305014b12bbe078484b2da6f93f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 6 Aug 2017 21:53:39 +0200 Subject: nbd-client: make it NOEXEC, stop using argc function old new delta nbdclient_main 484 492 +8 Signed-off-by: Denys Vlasenko --- networking/nbd-client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'networking') diff --git a/networking/nbd-client.c b/networking/nbd-client.c index a5e25e6aa..cf1857231 100644 --- a/networking/nbd-client.c +++ b/networking/nbd-client.c @@ -7,7 +7,7 @@ #include #include -//applet:IF_NBDCLIENT(APPLET_ODDNAME(nbd-client, nbdclient, BB_DIR_USR_SBIN, BB_SUID_DROP, nbdclient)) +//applet:IF_NBDCLIENT(APPLET_NOEXEC(nbd-client, nbdclient, BB_DIR_USR_SBIN, BB_SUID_DROP, nbdclient)) //kbuild:lib-$(CONFIG_NBDCLIENT) += nbd-client.o @@ -43,7 +43,7 @@ //blocksizes other than 1024 without patches int nbdclient_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; -int nbdclient_main(int argc, char **argv) +int nbdclient_main(int argc UNUSED_PARAM, char **argv) { unsigned long timeout = 0; #if BB_MMU @@ -61,7 +61,7 @@ int nbdclient_main(int argc, char **argv) BUILD_BUG_ON(offsetof(struct nbd_header_t, data) != 8+8+8+4); // Parse command line stuff (just a stub now) - if (argc != 4) + if (!argv[1] || !argv[2] || !argv[3] || argv[4]) bb_show_usage(); #if !BB_MMU -- cgit v1.2.3