Hello community,

here is the log from the commit of package mmc-utils for openSUSE:Factory 
checked in at 2016-09-12 13:26:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mmc-utils (Old)
 and      /work/SRC/openSUSE:Factory/.mmc-utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mmc-utils"

Changes:
--------
--- /work/SRC/openSUSE:Factory/mmc-utils/mmc-utils.changes      2016-07-01 
10:00:42.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mmc-utils.new/mmc-utils.changes 2016-09-12 
13:26:51.000000000 +0200
@@ -1,0 +2,11 @@
+Fri Sep 09 18:44:54 UTC 2016 - mplus...@suse.com
+
+- Update to version 0.1+git.20160901:
+  * Fix reported offset for enhanced user area start address
+  * Register being set is other than mentioned in printed message.
+  * Add -c option for partitioning commands
+  * Add help texts for -c option
+  * Fix return value check from set_partitioning_setting_completed()
+  * Add missing -c for write_reliability
+
+-------------------------------------------------------------------

Old:
----
  mmc-utils-0.1+git.20160623.tar.xz

New:
----
  mmc-utils-0.1+git.20160901.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mmc-utils.spec ++++++
--- /var/tmp/diff_new_pack.jR2xJb/_old  2016-09-12 13:26:52.000000000 +0200
+++ /var/tmp/diff_new_pack.jR2xJb/_new  2016-09-12 13:26:52.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           mmc-utils
-Version:        0.1+git.20160623
+Version:        0.1+git.20160901
 Release:        0
 Summary:        Tools for MMC/SD devices
 License:        GPL-2.0

++++++ mmc-utils-0.1+git.20160623.tar.xz -> mmc-utils-0.1+git.20160901.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mmc-utils-0.1+git.20160623/mmc.c 
new/mmc-utils-0.1+git.20160901/mmc.c
--- old/mmc-utils-0.1+git.20160623/mmc.c        2016-06-29 17:19:02.000000000 
+0200
+++ new/mmc-utils-0.1+git.20160901/mmc.c        2016-09-01 17:49:01.000000000 
+0200
@@ -88,18 +88,18 @@
          NULL
        },
        { do_create_gp_partition, -6,
-         "gp create", "<-y|-n> " "<length KiB> " "<partition> " "<enh_attr> " 
"<ext_attr> " "<device>\n"
-               "create general purpose partition for the <device>.\nDry-run 
only unless -y is passed.\nNOTE!  This is a one-time programmable 
(unreversible) change.\nTo set enhanced attribute to general partition being 
created set\n <enh_attr> to 1 else set it to 0.\nTo set extended attribute to 
general partition\n set <ext_attr> to 1,2 else set it to 0",
+         "gp create", "<-y|-n|-c> " "<length KiB> " "<partition> " "<enh_attr> 
" "<ext_attr> " "<device>\n"
+               "Create general purpose partition for the <device>.\nDry-run 
only unless -y or -c is passed.\nUse -c if more partitioning settings are still 
to come.\nNOTE!  This is a one-time programmable (unreversible) change.\nTo set 
enhanced attribute to general partition being created set\n <enh_attr> to 1 
else set it to 0.\nTo set extended attribute to general partition\n set 
<ext_attr> to 1,2 else set it to 0",
          NULL
        },
        { do_enh_area_set, -4,
-         "enh_area set", "<-y|-n> " "<start KiB> " "<length KiB> " "<device>\n"
-               "Enable the enhanced user area for the <device>.\nDry-run only 
unless -y is passed.\nNOTE!  This is a one-time programmable (unreversible) 
change.",
+         "enh_area set", "<-y|-n|-c> " "<start KiB> " "<length KiB> " 
"<device>\n"
+               "Enable the enhanced user area for the <device>.\nDry-run only 
unless -y or -c is passed.\nUse -c if more partitioning settings are still to 
come.\nNOTE!  This is a one-time programmable (unreversible) change.",
          NULL
        },
        { do_write_reliability_set, -2,
-         "write_reliability set", "<-y|-n> " "<partition> " "<device>\n"
-               "Enable write reliability per partition for the 
<device>.\nDry-run only unless -y is passed.\nNOTE!  This is a one-time 
programmable (unreversible) change.",
+         "write_reliability set", "<-y|-n|-c> " "<partition> " "<device>\n"
+               "Enable write reliability per partition for the 
<device>.\nDry-run only unless -y or -c is passed.\nUse -c if more partitioning 
settings are still to come.\nNOTE!  This is a one-time programmable 
(unreversible) change.",
          NULL
        },
        { do_status_get, -1,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mmc-utils-0.1+git.20160623/mmc_cmds.c 
new/mmc-utils-0.1+git.20160901/mmc_cmds.c
--- old/mmc-utils-0.1+git.20160623/mmc_cmds.c   2016-06-29 17:19:02.000000000 
+0200
+++ new/mmc-utils-0.1+git.20160901/mmc_cmds.c   2016-09-01 17:49:01.000000000 
+0200
@@ -507,7 +507,7 @@
 
                if (ret) {
                        fprintf(stderr, "Could not write 0x%02x to EXT_CSD[%d] 
in %s\n",
-                                       1, EXT_CSD_BOOT_WP, device);
+                                       1, EXT_CSD_NATIVE_SECTOR_SIZE, device);
                        exit(1);
                }
                printf("MMC disable 512B emulation successful.  Now reset the 
device to switch to 4KB native sector mode.\n");
@@ -795,6 +795,7 @@
 {
        unsigned int sectors = get_sector_count(ext_csd);
 
+       /* over 2GiB devices are block-addressed */
        return (sectors > (2u * 1024 * 1024 * 1024) / 512);
 }
 
@@ -813,11 +814,15 @@
 {
        int ret;
 
-       if (dry_run) {
+       if (dry_run == 1) {
                fprintf(stderr, "NOT setting PARTITION_SETTING_COMPLETED\n");
                fprintf(stderr, "These changes will not take effect neither "
                        "now nor after a power cycle\n");
                return 1;
+       } else if (dry_run == 2) {
+               printf("-c given, expecting more partition settings before "
+                       "writing PARTITION_SETTING_COMPLETED\n");
+               return 0;
        }
 
        fprintf(stderr, "setting OTP PARTITION_SETTING_COMPLETED!\n");
@@ -958,11 +963,14 @@
        unsigned int length_kib, gp_size_mult;
        unsigned long align;
 
-       CHECK(nargs != 7, "Usage: mmc gp create <-y|-n> <length KiB> "
+       CHECK(nargs != 7, "Usage: mmc gp create <-y|-n|-c> <length KiB> "
                "<partition> <enh_attr> <ext_attr> </path/to/mmcblkX>\n", 
exit(1));
 
-       if (!strcmp("-y", argv[1]))
+       if (!strcmp("-y", argv[1])) {
                dry_run = 0;
+        } else if (!strcmp("-c", argv[1])) {
+               dry_run = 2;
+       }
 
        length_kib = strtol(argv[2], NULL, 10);
        partition = strtol(argv[3], NULL, 10);
@@ -1065,7 +1073,7 @@
        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;
@@ -1081,11 +1089,14 @@
        unsigned int start_kib, length_kib, enh_start_addr, enh_size_mult;
        unsigned long align;
 
-       CHECK(nargs != 5, "Usage: mmc enh_area set <-y|-n> <start KiB> <length 
KiB> "
+       CHECK(nargs != 5, "Usage: mmc enh_area set <-y|-n|-c> <start KiB> 
<length KiB> "
                          "</path/to/mmcblkX>\n", exit(1));
 
-       if (!strcmp("-y", argv[1]))
+       if (!strcmp("-y", argv[1])) {
                dry_run = 0;
+       } else if (!strcmp("-c", argv[1])) {
+               dry_run = 2;
+       }
 
        start_kib = strtol(argv[2], NULL, 10);
        length_kib = strtol(argv[3], NULL, 10);
@@ -1207,7 +1218,7 @@
 
        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;
@@ -1223,11 +1234,14 @@
        int partition;
        char *device;
 
-       CHECK(nargs != 4, "Usage: mmc write_reliability set <-y|-n> "
+       CHECK(nargs != 4, "Usage: mmc write_reliability set <-y|-n|-c> "
                        "<partition> </path/to/mmcblkX>\n", exit(1));
 
-       if (!strcmp("-y", argv[1]))
+       if (!strcmp("-y", argv[1])) {
                dry_run = 0;
+       } else if (!strcmp("-c", argv[1])) {
+               dry_run = 2;
+       }
 
        partition = strtol(argv[2], NULL, 10);
        device = argv[3];
@@ -1269,7 +1283,7 @@
        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))
+       if (set_partitioning_setting_completed(dry_run, device, fd))
                exit(1);
 
        return 0;
@@ -1659,7 +1673,7 @@
                printf("Enhanced User Data Start Address"
                        " [ENH_START_ADDR]: 0x%06x\n", regl);
                printf(" i.e. %lu bytes offset\n", (is_blockaddresed(ext_csd) ?
-                               1l : 512l) * regl);
+                               512l : 1l) * regl);
 
                /* A441]: reserved [135] */
                printf("Bad Block Management mode"


Reply via email to