summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurimas Liutikas <aurimas@google.com>2016-04-06 00:46:24 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-04-06 00:46:24 +0000
commitf105db5bd1934f0c3e5f74bbc9a5aaeac7a6bf2b (patch)
tree6cb48f96ccdf787f09d2c218a54c0be791089d60
parentc98bb9fb3feb860b5ad7f0ffee25e7cdd7a26c87 (diff)
parent6de31b2b8a09108f9b91bc12bee2b792f783dc62 (diff)
downloadmmc-utils-f105db5bd1934f0c3e5f74bbc9a5aaeac7a6bf2b.tar.gz
Fix Wmissing-field-initializers in external/mmc-utils. am: 358f4f5 am: 5dc7adeandroid-wear-p-preview-2android-wear-o-preview-4android-wear-o-preview-3android-wear-9.0.0_r9android-wear-9.0.0_r8android-wear-9.0.0_r7android-wear-9.0.0_r6android-wear-9.0.0_r5android-wear-9.0.0_r4android-wear-9.0.0_r34android-wear-9.0.0_r33android-wear-9.0.0_r32android-wear-9.0.0_r31android-wear-9.0.0_r30android-wear-9.0.0_r3android-wear-9.0.0_r29android-wear-9.0.0_r28android-wear-9.0.0_r27android-wear-9.0.0_r26android-wear-9.0.0_r25android-wear-9.0.0_r24android-wear-9.0.0_r23android-wear-9.0.0_r22android-wear-9.0.0_r21android-wear-9.0.0_r20android-wear-9.0.0_r2android-wear-9.0.0_r19android-wear-9.0.0_r18android-wear-9.0.0_r17android-wear-9.0.0_r16android-wear-9.0.0_r15android-wear-9.0.0_r14android-wear-9.0.0_r13android-wear-9.0.0_r12android-wear-9.0.0_r11android-wear-9.0.0_r10android-wear-9.0.0_r1android-wear-8.1.0_r1android-wear-8.0.0_r2android-wear-8.0.0_r1android-vts-9.0_r9android-vts-9.0_r8android-vts-9.0_r7android-vts-9.0_r6android-vts-9.0_r5android-vts-9.0_r4android-vts-9.0_r19android-vts-9.0_r18android-vts-9.0_r17android-vts-9.0_r16android-vts-9.0_r15android-vts-9.0_r14android-vts-9.0_r13android-vts-9.0_r12android-vts-9.0_r11android-vts-9.0_r10android-vts-8.1_r9android-vts-8.1_r8android-vts-8.1_r7android-vts-8.1_r6android-vts-8.1_r5android-vts-8.1_r4android-vts-8.1_r3android-vts-8.1_r14android-vts-8.1_r13android-vts-8.1_r12android-vts-8.1_r11android-vts-8.1_r10android-vts-8.0_r9android-vts-8.0_r8android-vts-8.0_r7android-vts-8.0_r6android-vts-8.0_r2android-vts-8.0_r13android-vts-8.0_r12android-vts-8.0_r11android-vts-8.0_r10android-vts-8.0_r1android-security-9.0.0_r76android-security-9.0.0_r75android-security-9.0.0_r74android-security-9.0.0_r73android-security-9.0.0_r72android-security-9.0.0_r71android-security-9.0.0_r70android-security-9.0.0_r69android-security-9.0.0_r68android-security-9.0.0_r67android-security-9.0.0_r66android-security-9.0.0_r65android-security-9.0.0_r64android-security-9.0.0_r63android-security-9.0.0_r62android-security-8.1.0_r93android-security-8.1.0_r92android-security-8.1.0_r91android-security-8.1.0_r90android-security-8.1.0_r89android-security-8.1.0_r88android-security-8.1.0_r87android-security-8.1.0_r86android-security-8.1.0_r85android-security-8.1.0_r84android-security-8.1.0_r83android-security-8.1.0_r82android-security-8.0.0_r54android-security-8.0.0_r53android-security-8.0.0_r52android-p-preview-5android-p-preview-4android-p-preview-3android-p-preview-2android-p-preview-1android-o-preview-4android-o-preview-3android-o-preview-2android-o-preview-1android-o-mr1-preview-2android-o-mr1-preview-1android-o-mr1-iot-release-smart-display-r9android-o-mr1-iot-release-smart-display-r8android-o-mr1-iot-release-smart-display-r5android-o-mr1-iot-release-smart-display-r40.1Jandroid-o-mr1-iot-release-smart-display-r4android-o-mr1-iot-release-smart-display-r39android-o-mr1-iot-release-smart-display-r30android-o-mr1-iot-release-smart-display-r3android-o-mr1-iot-release-smart-display-r22android-o-mr1-iot-release-smart-display-r14android-o-mr1-iot-release-smart-clock-r6android-o-mr1-iot-release-smart-clock-r2android-o-mr1-iot-release-smart-clock-fsiandroid-o-mr1-iot-release-smart-clock-fcsandroid-o-mr1-iot-release-cube_r2android-o-mr1-iot-release-cube-fsiandroid-o-mr1-iot-release-cube-fcsandroid-o-mr1-iot-release-1.0.8android-o-mr1-iot-release-1.0.7android-o-mr1-iot-release-1.0.5android-o-mr1-iot-release-1.0.4android-o-mr1-iot-release-1.0.3android-o-mr1-iot-release-1.0.2android-o-mr1-iot-release-1.0.14android-o-mr1-iot-release-1.0.13android-o-mr1-iot-release-1.0.12android-o-mr1-iot-release-1.0.10android-o-mr1-iot-release-1.0.1android-o-mr1-iot-release-1.0.0android-o-mr1-iot-preview-8android-o-mr1-iot-preview-7android-o-mr1-iot-preview-6android-o-iot-preview-5android-cts-9.0_r9android-cts-9.0_r8android-cts-9.0_r7android-cts-9.0_r6android-cts-9.0_r5android-cts-9.0_r4android-cts-9.0_r3android-cts-9.0_r20android-cts-9.0_r2android-cts-9.0_r19android-cts-9.0_r18android-cts-9.0_r17android-cts-9.0_r16android-cts-9.0_r15android-cts-9.0_r14android-cts-9.0_r13android-cts-9.0_r12android-cts-9.0_r11android-cts-9.0_r10android-cts-9.0_r1android-cts-8.1_r9android-cts-8.1_r8android-cts-8.1_r7android-cts-8.1_r6android-cts-8.1_r5android-cts-8.1_r4android-cts-8.1_r3android-cts-8.1_r25android-cts-8.1_r24android-cts-8.1_r23android-cts-8.1_r22android-cts-8.1_r21android-cts-8.1_r20android-cts-8.1_r2android-cts-8.1_r19android-cts-8.1_r18android-cts-8.1_r17android-cts-8.1_r16android-cts-8.1_r15android-cts-8.1_r14android-cts-8.1_r13android-cts-8.1_r12android-cts-8.1_r11android-cts-8.1_r10android-cts-8.1_r1android-cts-8.0_r9android-cts-8.0_r8android-cts-8.0_r7android-cts-8.0_r6android-cts-8.0_r5android-cts-8.0_r4android-cts-8.0_r3android-cts-8.0_r26android-cts-8.0_r25android-cts-8.0_r24android-cts-8.0_r23android-cts-8.0_r22android-cts-8.0_r21android-cts-8.0_r20android-cts-8.0_r2android-cts-8.0_r19android-cts-8.0_r18android-cts-8.0_r17android-cts-8.0_r16android-cts-8.0_r15android-cts-8.0_r14android-cts-8.0_r13android-cts-8.0_r12android-cts-8.0_r11android-cts-8.0_r10android-cts-8.0_r1android-9.0.0_r9android-9.0.0_r8android-9.0.0_r7android-9.0.0_r61android-9.0.0_r60android-9.0.0_r6android-9.0.0_r59android-9.0.0_r58android-9.0.0_r57android-9.0.0_r56android-9.0.0_r55android-9.0.0_r54android-9.0.0_r53android-9.0.0_r52android-9.0.0_r51android-9.0.0_r50android-9.0.0_r5android-9.0.0_r49android-9.0.0_r48android-9.0.0_r47android-9.0.0_r46android-9.0.0_r45android-9.0.0_r44android-9.0.0_r43android-9.0.0_r42android-9.0.0_r41android-9.0.0_r40android-9.0.0_r39android-9.0.0_r38android-9.0.0_r37android-9.0.0_r36android-9.0.0_r35android-9.0.0_r34android-9.0.0_r33android-9.0.0_r32android-9.0.0_r31android-9.0.0_r30android-9.0.0_r3android-9.0.0_r22android-9.0.0_r21android-9.0.0_r20android-9.0.0_r2android-9.0.0_r19android-9.0.0_r18android-9.0.0_r17android-9.0.0_r16android-9.0.0_r12android-9.0.0_r11android-9.0.0_r10android-9.0.0_r1android-8.1.0_r9android-8.1.0_r81android-8.1.0_r80android-8.1.0_r8android-8.1.0_r79android-8.1.0_r78android-8.1.0_r77android-8.1.0_r76android-8.1.0_r75android-8.1.0_r74android-8.1.0_r73android-8.1.0_r72android-8.1.0_r71android-8.1.0_r70android-8.1.0_r7android-8.1.0_r69android-8.1.0_r68android-8.1.0_r67android-8.1.0_r66android-8.1.0_r65android-8.1.0_r64android-8.1.0_r63android-8.1.0_r62android-8.1.0_r61android-8.1.0_r60android-8.1.0_r6android-8.1.0_r53android-8.1.0_r52android-8.1.0_r51android-8.1.0_r50android-8.1.0_r5android-8.1.0_r48android-8.1.0_r47android-8.1.0_r46android-8.1.0_r45android-8.1.0_r43android-8.1.0_r42android-8.1.0_r41android-8.1.0_r40android-8.1.0_r4android-8.1.0_r39android-8.1.0_r38android-8.1.0_r37android-8.1.0_r36android-8.1.0_r35android-8.1.0_r33android-8.1.0_r32android-8.1.0_r31android-8.1.0_r30android-8.1.0_r3android-8.1.0_r29android-8.1.0_r28android-8.1.0_r27android-8.1.0_r26android-8.1.0_r25android-8.1.0_r23android-8.1.0_r22android-8.1.0_r21android-8.1.0_r20android-8.1.0_r2android-8.1.0_r19android-8.1.0_r18android-8.1.0_r17android-8.1.0_r16android-8.1.0_r15android-8.1.0_r14android-8.1.0_r13android-8.1.0_r12android-8.1.0_r11android-8.1.0_r10android-8.1.0_r1android-8.0.0_r9android-8.0.0_r7android-8.0.0_r51android-8.0.0_r50android-8.0.0_r49android-8.0.0_r48android-8.0.0_r47android-8.0.0_r46android-8.0.0_r45android-8.0.0_r44android-8.0.0_r43android-8.0.0_r42android-8.0.0_r41android-8.0.0_r40android-8.0.0_r4android-8.0.0_r39android-8.0.0_r38android-8.0.0_r37android-8.0.0_r36android-8.0.0_r35android-8.0.0_r34android-8.0.0_r33android-8.0.0_r32android-8.0.0_r31android-8.0.0_r30android-8.0.0_r3android-8.0.0_r29android-8.0.0_r28android-8.0.0_r27android-8.0.0_r26android-8.0.0_r25android-8.0.0_r24android-8.0.0_r23android-8.0.0_r22android-8.0.0_r21android-8.0.0_r2android-8.0.0_r17android-8.0.0_r16android-8.0.0_r15android-8.0.0_r13android-8.0.0_r12android-8.0.0_r11android-8.0.0_r10android-8.0.0_r1security-pi-releasesecurity-oc-releasesecurity-oc-mr1-releasepie-vts-releasepie-security-releasepie-s2-releasepie-release-2pie-releasepie-r2-s2-releasepie-r2-s1-releasepie-r2-releasepie-qpr3-s1-releasepie-qpr3-releasepie-qpr3-b-releasepie-qpr2-releasepie-qpr1-s3-releasepie-qpr1-s2-releasepie-qpr1-s1-releasepie-qpr1-releasepie-platform-releasepie-gsipie-dr1-releasepie-dr1-devpie-devpie-cuttlefish-testingpie-cts-releasepie-b4s4-releasepie-b4s4-devpie-arcp-preview-1oreo-vts-releaseoreo-security-releaseoreo-releaseoreo-r6-releaseoreo-r5-releaseoreo-r4-releaseoreo-r3-releaseoreo-r2-releaseoreo-mr1-wear-releaseoreo-mr1-vts-releaseoreo-mr1-security-releaseoreo-mr1-s1-releaseoreo-mr1-releaseoreo-mr1-iot-releaseoreo-mr1-devoreo-mr1-cuttlefish-testingoreo-mr1-cts-releaseoreo-mr1-1.2-iot-releaseoreo-m8-releaseoreo-m7-releaseoreo-m6-s4-releaseoreo-m6-s3-releaseoreo-m6-s2-releaseoreo-m5-releaseoreo-m4-s9-releaseoreo-m4-s8-releaseoreo-m4-s7-releaseoreo-m4-s6-releaseoreo-m4-s5-releaseoreo-m4-s4-releaseoreo-m4-s3-releaseoreo-m4-s2-releaseoreo-m4-s12-releaseoreo-m4-s11-releaseoreo-m4-s10-releaseoreo-m4-s1-releaseoreo-m3-releaseoreo-m2-s5-releaseoreo-m2-s4-releaseoreo-m2-s3-releaseoreo-m2-s2-releaseoreo-m2-s1-releaseoreo-m2-releaseoreo-dr3-releaseoreo-dr2-releaseoreo-dr1-releaseoreo-dr1-devoreo-devoreo-cts-releaseo-preview-4o-preview-3o-preview-2o-previewo-mr1-iot-preview-8o-mr1-iot-preview-7o-mr1-iot-preview-6o-iot-preview-5
am: 6de31b2 * commit '6de31b2b8a09108f9b91bc12bee2b792f783dc62': Fix Wmissing-field-initializers in external/mmc-utils. Change-Id: I37ba8d842925af8793284deb2be4f8b733858b18
-rw-r--r--Android.mk1
-rw-r--r--mmc.c42
2 files changed, 22 insertions, 21 deletions
diff --git a/Android.mk b/Android.mk
index 2baac37..d66019b 100644
--- a/Android.mk
+++ b/Android.mk
@@ -5,6 +5,7 @@ LOCAL_MODULE_TAGS := debug
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
LOCAL_SRC_FILES:= mmc.c mmc_cmds.c
LOCAL_SRC_FILES += 3rdparty/hmac_sha/sha2.c 3rdparty/hmac_sha/hmac_sha2.c
+LOCAL_CFLAGS += -Werror
LOCAL_MODULE := mmc_utils
LOCAL_SHARED_LIBRARIES := libcutils libc
include $(BUILD_EXECUTABLE)
diff --git a/mmc.c b/mmc.c
index a13d9ae..ecfa54e 100644
--- a/mmc.c
+++ b/mmc.c
@@ -53,47 +53,47 @@ static struct Command commands[] = {
{ do_read_extcsd, -1,
"extcsd read", "<device>\n"
"Print extcsd data from <device>.",
- NULL
+ NULL, NULL, 0
},
{ do_writeprotect_get, -1,
"writeprotect get", "<device>\n"
"Determine the eMMC writeprotect status of <device>.",
- NULL
+ NULL, NULL, 0
},
{ do_writeprotect_set, -1,
"writeprotect set", "<device>\n"
"Set the eMMC writeprotect status of <device>.\nThis sets the eMMC to be write-protected until next boot.",
- NULL
+ NULL, NULL, 0
},
{ do_disable_512B_emulation, -1,
"disable 512B emulation", "<device>\n"
"Set the eMMC data sector size to 4KB by disabling emulation on\n<device>.",
- NULL
+ NULL, NULL, 0
},
{ 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",
- NULL
+ NULL, NULL, 0
},
{ 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.",
- NULL
+ NULL, NULL, 0
},
{ 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.",
- NULL
+ NULL, NULL, 0
},
{ do_status_get, -1,
"status get", "<device>\n"
"Print the response to STATUS_SEND (CMD13).",
- NULL
+ NULL, NULL, 0
},
{ do_write_boot_en, -3,
"bootpart enable", "<boot_partition> " "<send_ack> " "<device>\n"
"Enable the boot partition for the <device>.\nTo receive acknowledgment of boot from the card set <send_ack>\nto 1, else set it to 0.",
- NULL
+ NULL, NULL, 0
},
{ do_boot_bus_conditions_set, -4,
"bootbus set", "<boot_mode> " "<reset_boot_bus_conditions> " "<boot_bus_width> " "<device>\n"
@@ -101,27 +101,27 @@ static struct Command commands[] = {
"<boot_mode> must be \"single_backward|single_hs|dual\"\n"
"<reset_boot_bus_conditions> must be \"x1|retain\"\n"
"<boot_bus_width> must be \"x1|x4|x8\"",
- NULL
+ NULL, NULL, 0
},
{ do_write_bkops_en, -1,
"bkops enable", "<device>\n"
"Enable the eMMC BKOPS feature on <device>.\nNOTE! This is a one-time programmable (unreversible) change.",
- NULL
+ NULL, NULL, 0
},
{ do_hwreset_en, -1,
"hwreset enable", "<device>\n"
"Permanently enable the eMMC H/W Reset feature on <device>.\nNOTE! This is a one-time programmable (unreversible) change.",
- NULL
+ NULL, NULL, 0
},
{ do_hwreset_dis, -1,
"hwreset disable", "<device>\n"
"Permanently disable the eMMC H/W Reset feature on <device>.\nNOTE! This is a one-time programmable (unreversible) change.",
- NULL
+ NULL, NULL, 0
},
{ do_sanitize, -1,
"sanitize", "<device>\n"
"Send Sanitize command to the <device>.\nThis will delete the unmapped memory region of the device.",
- NULL
+ NULL, NULL, 0
},
{ do_rpmb_write_key, -1,
"rpmb write-key", "<rpmb device> <key file>\n"
@@ -132,12 +132,12 @@ static struct Command commands[] = {
"Example:\n"
" $ echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH | \\\n"
" mmc rpmb write-key /dev/mmcblk0rpmb -",
- NULL
+ NULL, NULL, 0
},
{ do_rpmb_read_counter, -1,
"rpmb read-counter", "<rpmb device>\n"
"Counter value for the <rpmb device> will be read to stdout.",
- NULL
+ NULL, NULL, 0
},
{ do_rpmb_read_block, -1,
"rpmb read-block", "<rpmb device> <address> <blocks count> <output file> [key file]\n"
@@ -150,7 +150,7 @@ static struct Command commands[] = {
" mmc rpmb read-block /dev/mmcblk0rpmb 0x02 2 /tmp/block -\n"
"or read two blocks without verification\n"
" $ mmc rpmb read-block /dev/mmcblk0rpmb 0x02 2 /tmp/block",
- NULL
+ NULL, NULL, 0
},
{ do_rpmb_write_block, -1,
"rpmb write-block", "<rpmb device> <address> <256 byte data file> <key file>\n"
@@ -161,21 +161,21 @@ static struct Command commands[] = {
" $ (awk 'BEGIN {while (c++<256) printf \"a\"}' | \\\n"
" echo -n AAAABBBBCCCCDDDDEEEEFFFFGGGGHHHH) | \\\n"
" mmc rpmb write-block /dev/mmcblk0rpmb 0x02 - -",
- NULL
+ NULL, NULL, 0
},
{ do_cache_en, -1,
"cache enable", "<device>\n"
"Enable the eMMC cache feature on <device>.\n"
"NOTE! The cache is an optional feature on devices >= eMMC4.5.",
- NULL
+ NULL, NULL, 0
},
{ do_cache_dis, -1,
"cache disable", "<device>\n"
"Disable the eMMC cache feature on <device>.\n"
"NOTE! The cache is an optional feature on devices >= eMMC4.5.",
- NULL
+ NULL, NULL, 0
},
- { 0, 0, 0, 0 }
+ { 0, 0, 0, 0, 0, 0, 0 }
};
static char *get_prgname(char *programname)