[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: [PATCH] fix exit codes on ignore errors with -a
From: Tito <farmatito () tiscali ! it>
Date: 2014-03-31 20:07:24
Message-ID: 201403312207.24235.farmatito () tiscali ! it
[Download RAW message or body]
Hi,
this patch fixes a minor error on exit codes in swapon/swapoff
when the -a switch is set: real swapon/swapoff -a returns 0
on ignored errors.
Ciao,
Tito
--- util-linux/swaponoff.c.orig 2014-03-31 21:59:08.000000000 +0200
+++ util-linux/swaponoff.c 2014-03-31 21:59:50.490560746 +0200
@@ -116,9 +116,8 @@
}
}
- if (err) {
- if (!quiet)
- bb_simple_perror_msg(device);
+ if (err && !quiet) {
+ bb_simple_perror_msg(device);
return 1;
}
return 0;
["swaponoff_exitcode_fix.patch" (text/x-patch)]
Real swapon/swapoff -a returns 0 on ignored errors.
Signed-off by Tito Ragusa <farmatito@tiscali.it>
--- util-linux/swaponoff.c.orig 2014-03-31 21:59:08.000000000 +0200
+++ util-linux/swaponoff.c 2014-03-31 21:59:50.490560746 +0200
@@ -116,9 +116,8 @@
}
}
- if (err) {
- if (!quiet)
- bb_simple_perror_msg(device);
+ if (err && !quiet) {
+ bb_simple_perror_msg(device);
return 1;
}
return 0;
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic