aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-11-10 18:27:04 -0500
committerAnthony G. Basile <blueness@gentoo.org>2012-11-10 18:27:04 -0500
commita82220ad09c3e92764f294d5e847f84b5f0103c8 (patch)
tree495562afd0ec39a5789e5994267a3e9f631c3cac /src
parentsrc/paxctl-ng.c: proper exit code handling (diff)
downloadelfix-a82220ad09c3e92764f294d5e847f84b5f0103c8.tar.gz
elfix-a82220ad09c3e92764f294d5e847f84b5f0103c8.tar.bz2
elfix-a82220ad09c3e92764f294d5e847f84b5f0103c8.zip
src/paxctl-ng.c: print success doesn't count to exit code
Diffstat (limited to 'src')
-rw-r--r--src/paxctl-ng.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/paxctl-ng.c b/src/paxctl-ng.c
index 875304e..e58cebb 100644
--- a/src/paxctl-ng.c
+++ b/src/paxctl-ng.c
@@ -392,7 +392,7 @@ bin2string(uint16_t flags, char *buf)
}
-int
+void
print_flags(int fd, int verbose)
{
uint16_t flags;
@@ -421,8 +421,6 @@ print_flags(int fd, int verbose)
printf("\tXT_PAX: %s\n", buf);
}
#endif
-
- return EXIT_SUCCESS;
}
@@ -735,21 +733,21 @@ main( int argc, char *argv[])
#ifdef XTPAX
if(cp_flags == CREATE_XT_FLAGS_SECURE || cp_flags == CREATE_XT_FLAGS_DEFAULT)
- ret = create_xt_flags(fd, cp_flags);
+ ret |= create_xt_flags(fd, cp_flags);
if(cp_flags == DELETE_XT_FLAGS)
- ret = delete_xt_flags(fd);
+ ret |= delete_xt_flags(fd);
#endif
#if defined(PTPAX) && defined(XTPAX)
if(cp_flags == COPY_PT_TO_XT_FLAGS || (cp_flags == COPY_XT_TO_PT_FLAGS && rdwr_pt_pax))
- ret = copy_xt_flags(fd, cp_flags, verbose);
+ ret |= copy_xt_flags(fd, cp_flags, verbose);
#endif
if(pax_flags != 0)
- ret = set_flags(fd, &pax_flags, rdwr_pt_pax, limit, verbose);
+ ret |= set_flags(fd, &pax_flags, rdwr_pt_pax, limit, verbose);
if(verbose == 1)
- ret = print_flags(fd, verbose);
+ print_flags(fd, verbose);
close(fd);