diff options
author | ed <ed@FreeBSD.org> | 2012-10-19 14:49:42 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2012-10-19 14:49:42 +0000 |
commit | af31e8843c2cc0ba388a33f341de8da1b50de433 (patch) | |
tree | ddffe542a2e921ec48c73d322a2046f559a9d74f /sbin/camcontrol/fwdownload.c | |
parent | b1462253851ab8c1f6dde48bb7796b15d3f38253 (diff) | |
download | FreeBSD-src-af31e8843c2cc0ba388a33f341de8da1b50de433.zip FreeBSD-src-af31e8843c2cc0ba388a33f341de8da1b50de433.tar.gz |
More -Wmissing-variable-declarations fixes.
In addition to adding `static' where possible:
- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
Diffstat (limited to 'sbin/camcontrol/fwdownload.c')
-rw-r--r-- | sbin/camcontrol/fwdownload.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sbin/camcontrol/fwdownload.c b/sbin/camcontrol/fwdownload.c index 3ffa530..daa1520 100644 --- a/sbin/camcontrol/fwdownload.c +++ b/sbin/camcontrol/fwdownload.c @@ -131,7 +131,7 @@ static char *fw_read_img(const char *fw_img_path, const struct fw_vendor *vp, int *num_bytes); static int fw_download_img(struct cam_device *cam_dev, const struct fw_vendor *vp, char *buf, int img_size, - int sim_mode, int verbose, int retry_count, int timeout, + int sim_mode, int printerrors, int retry_count, int timeout, const char */*name*/, const char */*type*/); /* @@ -238,7 +238,7 @@ bailout1: */ static int fw_download_img(struct cam_device *cam_dev, const struct fw_vendor *vp, - char *buf, int img_size, int sim_mode, int verbose, int retry_count, + char *buf, int img_size, int sim_mode, int printerrors, int retry_count, int timeout, const char *imgname, const char *type) { struct scsi_write_buffer cdb; @@ -290,7 +290,7 @@ fw_download_img(struct cam_device *cam_dev, const struct fw_vendor *vp, ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; if (cam_send_ccb(cam_dev, ccb) < 0) { warnx("Error sending identify/test unit ready"); - if (verbose) + if (printerrors) cam_error_print(cam_dev, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); cam_freeccb(ccb); @@ -298,7 +298,7 @@ fw_download_img(struct cam_device *cam_dev, const struct fw_vendor *vp, } if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { warnx("Device is not ready"); - if (verbose) + if (printerrors) cam_error_print(cam_dev, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); cam_freeccb(ccb); @@ -372,7 +372,7 @@ fw_download_img(struct cam_device *cam_dev, const struct fw_vendor *vp, /* Execute the command. */ if (cam_send_ccb(cam_dev, ccb) < 0) { warnx("Error writing image to device"); - if (verbose) + if (printerrors) cam_error_print(cam_dev, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); goto bailout; @@ -398,7 +398,7 @@ bailout: int fwdownload(struct cam_device *device, int argc, char **argv, - char *combinedopt, int verbose, int retry_count, int timeout, + char *combinedopt, int printerrors, int retry_count, int timeout, const char *type) { const struct fw_vendor *vp; @@ -450,7 +450,7 @@ fwdownload(struct cam_device *device, int argc, char **argv, if (sim_mode) fprintf(stdout, "Running in simulation mode\n"); - if (fw_download_img(device, vp, buf, img_size, sim_mode, verbose, + if (fw_download_img(device, vp, buf, img_size, sim_mode, printerrors, retry_count, timeout, fw_img_path, type) != 0) { fprintf(stderr, "Firmware download failed\n"); goto fail; |