Re: [PATCH 1/5] dispol: extend usage() to take exit status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/8/19 2:44 AM, Masatake YAMATO wrote:
Signed-off-by: Masatake YAMATO <yamato@xxxxxxxxxx>

You appear to have sent two slightly different versions of this patch?

---
  checkpolicy/test/dispol.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/checkpolicy/test/dispol.c b/checkpolicy/test/dispol.c
index d72d9fb3..6c4829c4 100644
--- a/checkpolicy/test/dispol.c
+++ b/checkpolicy/test/dispol.c
@@ -36,10 +36,10 @@
static policydb_t policydb; -static __attribute__((__noreturn__)) void usage(const char *progname)
+static __attribute__((__noreturn__)) void usage(const char *progname, int status)
  {
  	printf("usage:  %s binary_pol_file\n\n", progname);
-	exit(1);
+	exit(status);
  }
int render_access_mask(uint32_t mask, avtab_key_t * key, policydb_t * p,
@@ -395,7 +395,7 @@ int main(int argc, char **argv)
  	struct policy_file pf;
if (argc != 2)
-		usage(argv[0]);
+		usage(argv[0], 1);
fd = open(argv[1], O_RDONLY);
  	if (fd < 0) {





[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux