[PATCH 3/3] mmc-utils: Fix return value check from set_partitioning_setting_completed()

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

 



Test was wrong way around. Function returns non-zero value on fail.

Signed-off-by: Tomas Melin <tomas.melin@xxxxxxxxxxx>
---
 mmc_cmds.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mmc_cmds.c b/mmc_cmds.c
index 5f2b2b5..09be825 100644
--- a/mmc_cmds.c
+++ b/mmc_cmds.c
@@ -1071,7 +1071,7 @@ int do_create_gp_partition(int nargs, char **argv)
     if (ret)
         exit(1);
 
-    if (!set_partitioning_setting_completed(dry_run, device, fd))
+    if (set_partitioning_setting_completed(dry_run, device, fd))
         exit(1);
 
     return 0;
@@ -1215,7 +1215,7 @@ int do_enh_area_set(int nargs, char **argv)
 
     printf("Done setting ENH_USR area on %s\n", device);
 
-    if (!set_partitioning_setting_completed(dry_run, device, fd))
+    if (set_partitioning_setting_completed(dry_run, device, fd))
         exit(1);
 
     return 0;
@@ -1279,8 +1279,8 @@ int do_write_reliability_set(int nargs, char **argv)
     printf("Done setting EXT_CSD_WR_REL_SET to 0x%02x on %s\n",
         value, device);
 
-    if (!set_partitioning_setting_completed(dry_run, device, fd))
-        exit(1);
+        if (set_partitioning_setting_completed(dry_run, device, fd))
+                exit(1);
 
     return 0;
 }
-- 
2.1.4
��.n��������+%������w��{.n�����{��i��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux