Page MenuHomeFreeBSD

D6558.id16856.diff
No OneTemporary

D6558.id16856.diff

Index: sbin/camcontrol/epc.c
===================================================================
--- sbin/camcontrol/epc.c
+++ sbin/camcontrol/epc.c
@@ -633,8 +633,7 @@
goto bailout;
}
- bzero(&(&ccb->ccb_h)[1],
- sizeof(union ccb) - sizeof(struct ccb_hdr));
+ CCB_CLEAR_ALL_EXCEPT_HDR(ccb);
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch (c) {
Index: sbin/camcontrol/zone.c
===================================================================
--- sbin/camcontrol/zone.c
+++ sbin/camcontrol/zone.c
@@ -347,8 +347,7 @@
goto bailout;
}
- bzero(&(&ccb->ccb_h)[1],
- sizeof(union ccb) - sizeof(struct ccb_hdr));
+ CCB_CLEAR_ALL_EXCEPT_HDR(ccb);
while ((c = getopt(argc, argv, combinedopt)) != -1) {
switch (c) {
@@ -484,7 +483,8 @@
sector_count = ZAC_ATA_SECTOR_COUNT(alloc_len);
protocol = AP_PROTO_DMA;
} else {
- cdb_storage = calloc(cdb_storage_len, 1);
+ if (cdb_storage == NULL)
+ cdb_storage = calloc(cdb_storage_len, 1);
if (cdb_storage == NULL)
err(1, "couldn't allocate memory");
@@ -662,6 +662,8 @@
if (zp_status == ZONE_PRINT_MORE_DATA) {
bzero(ccb, sizeof(*ccb));
first_pass = 0;
+ if (cdb_storage != NULL)
+ bzero(cdb_storage, cdb_storage_len);
goto restart_report;
} else if (zp_status == ZONE_PRINT_ERROR)
error = 1;

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 23, 2:29 AM (1 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35353314
Default Alt Text
D6558.id16856.diff (1 KB)

Event Timeline