diff options
| author | Chuck Tuffli <chuck@FreeBSD.org> | 2026-05-12 13:35:31 +0000 |
|---|---|---|
| committer | Chuck Tuffli <chuck@FreeBSD.org> | 2026-05-12 13:35:31 +0000 |
| commit | d2d20bb5099dc1c443a4b783d43b8a45338c85d2 (patch) | |
| tree | 6c26cb768591fa2ec14011c1ab849e017131cefa | |
| parent | eb3b1302382b1d0cbe37eeebabfcdd546aa2fc4e (diff) | |
| -rw-r--r-- | Changelog | 4 | ||||
| -rw-r--r-- | freebsd_dev.c | 17 | ||||
| -rw-r--r-- | libsmart.c | 2 | ||||
| -rw-r--r-- | smart.c | 2 |
4 files changed, 11 insertions, 14 deletions
diff --git a/Changelog b/Changelog index 42b79bc34070..ad0e79bade32 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,9 @@ This file documents changes for smart releases +version 1.0.3 + - Fix build errors detected by GCC14 + - Fix printf build error on 32-bit systems + version 1.0.2 - Bring man page up to snuff - Fix various complier warnings diff --git a/freebsd_dev.c b/freebsd_dev.c index d1dda2289742..ee861fdec577 100644 --- a/freebsd_dev.c +++ b/freebsd_dev.c @@ -121,7 +121,7 @@ __device_read_ata(smart_h h, uint32_t page, void *buf, size_t bsize, union ccb * struct fbsd_smart *fsmart = h; const uint8_t *smart_fis; uint32_t smart_fis_size = 0; - uint32_t cam_flags = 0; + uint32_t flags = 0; uint16_t sector_count = 0; uint8_t protocol = 0; @@ -129,7 +129,7 @@ __device_read_ata(smart_h h, uint32_t page, void *buf, size_t bsize, union ccb * case PAGE_ID_ATA_SMART_READ_DATA: /* Support SMART READ DATA */ smart_fis = smart_read_data; smart_fis_size = sizeof(smart_read_data); - cam_flags = CAM_DIR_IN; + flags = CAM_DIR_IN; sector_count = 1; protocol = AP_PROTO_PIO_IN; break; @@ -137,7 +137,7 @@ __device_read_ata(smart_h h, uint32_t page, void *buf, size_t bsize, union ccb * smart_fis = smart_return_status; smart_fis_size = sizeof(smart_return_status); /* Command has no data but uses the return status */ - cam_flags = CAM_DIR_NONE; + flags = CAM_DIR_NONE; protocol = AP_PROTO_NON_DATA; bsize = 0; break; @@ -165,7 +165,7 @@ __device_read_ata(smart_h h, uint32_t page, void *buf, size_t bsize, union ccb * scsi_ata_pass_16(&ccb->csio, /*retries*/ 1, /*cbfcnp*/ NULL, - /*flags*/ cam_flags, + /*flags*/ flags, /*tag_action*/ MSG_SIMPLE_Q_TAG, /*protocol*/ protocol, /*ata_flags*/ cdb_flags, @@ -188,7 +188,7 @@ __device_read_ata(smart_h h, uint32_t page, void *buf, size_t bsize, union ccb * cam_fill_ataio(&ccb->ataio, /* retries */1, /* cbfcnp */NULL, - /* flags */cam_flags, + /* flags */flags, /* tag_action */0, /* data_ptr */buf, /* dxfer_len */bsize, @@ -709,8 +709,6 @@ __device_info_tunneled_ata(struct fbsd_smart *fsmart) { struct ata_params ident_data; union ccb *ccb = NULL; - struct ata_pass_16 *ata_pass_16; - struct ata_cmd ata_cmd; int32_t rc = -1; ccb = cam_getccb(fsmart->camdev); @@ -742,11 +740,6 @@ __device_info_tunneled_ata(struct fbsd_smart *fsmart) /*timeout*/ 5000 ); - ata_pass_16 = (struct ata_pass_16 *)ccb->csio.cdb_io.cdb_bytes; - ata_cmd.command = ata_pass_16->command; - ata_cmd.control = ata_pass_16->control; - ata_cmd.features = ata_pass_16->features; - rc = cam_send_ccb(fsmart->camdev, ccb); if (rc != 0) { warnx("%s: scsi_ata_pass_16() failed (programmer error?)", diff --git a/libsmart.c b/libsmart.c index a1732de09ed9..012615bacdbd 100644 --- a/libsmart.c +++ b/libsmart.c @@ -1347,7 +1347,7 @@ __smart_read_pages(smart_h h, smart_buf_t *sb) memset(buf, 0, plist->pages[p].bytes); rc = device_read_log(h, plist->pages[p].id, buf, plist->pages[p].bytes); if (rc) { - dprintf("bad read (%d) from page %#x (bytes=%lu)\n", rc, + dprintf("bad read (%d) from page %#x (bytes=%zu)\n", rc, plist->pages[p].id, plist->pages[p].bytes); break; } @@ -26,7 +26,7 @@ #include "libsmart.h" #define SMART_NAME "smart" -#define SMART_VERSION "1.0.2" +#define SMART_VERSION "1.0.3" extern bool do_debug; |
