From nobody Tue Jul 25 04:26:35 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R93rX33ccz4p4HN; Tue, 25 Jul 2023 04:26:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R93rX1HGZz4PPJ; Tue, 25 Jul 2023 04:26:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690259196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L2u30V51Vt5IxJjOof7+n1ZNU8MssrH71g0cu9wT98g=; b=k35AzfkZDWSlOnZ1KOrtnsuJolwX5cQVPZzsXYyYb8/VAwk8H0PaY6es71XsXmT7yQtnC4 I8elpnB74e/KrCjRtPAhSJNjOLAuCc1GIM7bKTRAbENJzz3dmZz/uvIUiaoIddvO/4qb8G B+x+dkJzkbnHb+9kBf/UHsdeRirLud2cGeWtuymtfFQAaFbUcuc/9d0bPzpO/u3udpz5jC Dg9hYiQCY5jOmUMfp99lUmZ71ghZZHb276KnmLo65Apvg6UEiSMk7FTIWKAXKXP4BV3ALG w+6U7M+1RYZg6qv2/+gLR3N9sXbB58L4R95yq/Y53AnhcR8D6iGXL7UChCImSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1690259196; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L2u30V51Vt5IxJjOof7+n1ZNU8MssrH71g0cu9wT98g=; b=mLfEJmJ8Fyd8JCKIV7tBlo6Q0HSeitxH+n064HPFpCq/iY/460LVIzOzmw8uOegEoeYZVH bRg1mkuvj6jXZC0s4euXOOyfsoX1ronYNqfNB6tLMN4vtB/XMJyp6l+YbcmA96pYVcqtuO OyDPz8S6+wkOzIQPmDi3pF2j9GLI/FMRPeEkFem1YNATG4B7UpTL/n6A9vYGDRk4UWL+hS YFgGnkPl+FDPLrn9WZqRpqNdCuQx9BT0WLE2ILhoFmtJYH3WHNZTdVIn/klW9fcBUlm3oe Pcu4Jfp0ZJxupDRg38qhNePBmFLYOe8njrLPvKMfULyuxQ0W/WTACBsmtO9xOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1690259196; a=rsa-sha256; cv=none; b=v0bqdiIYa2XHvLSlPYVOdhC7M5LFmXc/L2VZ9BnkoaTS6vqVmWGIi264awtz07gYEqdbT3 OGtCIuJ5FCIDFayBpcYu8VdtqegajfHuPRy7hWVQrKR0mO4Ba03F1Qbnacr3hKduKJxUsQ XKwfoZOeCDbJijXaB7/eoxAN+A6SaaQh4khOLxZQL4nNmn/CUU3E7axX8ZM6AMWtrEIh0t 0OKOZ2jM1vqbuq5B2TbVOHrwNfwpY9uuuBXBcwAZHRKVwJDiweMfMOcJsmbhcgaeVdXrqE r/fY1icxhSCCZbrMSMQJOKODnID1e5qhwiTDlUT3CHOUIpTJsNjnfaFbUYhZ5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R93rX0L29zmGW; Tue, 25 Jul 2023 04:26:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36P4QZWZ039497; Tue, 25 Jul 2023 04:26:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36P4QZn7039495; Tue, 25 Jul 2023 04:26:35 GMT (envelope-from git) Date: Tue, 25 Jul 2023 04:26:35 GMT Message-Id: <202307250426.36P4QZn7039495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f9ffa1ef25cf - main - libcam: Migrate to modern uintXX_t from u_intXX_t List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9ffa1ef25cff69f3aa090752430b2b16d1dc7a6 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f9ffa1ef25cff69f3aa090752430b2b16d1dc7a6 commit f9ffa1ef25cff69f3aa090752430b2b16d1dc7a6 Author: Warner Losh AuthorDate: 2023-07-25 03:17:41 +0000 Commit: Warner Losh CommitDate: 2023-07-25 03:35:10 +0000 libcam: Migrate to modern uintXX_t from u_intXX_t As per https://lists.freebsd.org/archives/freebsd-scsi/2023-July/000257.html move to the modern uintXX_t. MFC After: 3 days Sponsored by: Netflix --- lib/libcam/camlib.h | 34 +++++++++++++++++----------------- lib/libcam/scsi_cmdparse.c | 16 ++++++++-------- lib/libcam/scsi_wrap.c | 2 +- 3 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lib/libcam/camlib.h b/lib/libcam/camlib.h index 3ae775cd87f5..48710db13909 100644 --- a/lib/libcam/camlib.h +++ b/lib/libcam/camlib.h @@ -96,7 +96,7 @@ struct cam_device { * Device name given by * the user. */ - u_int32_t given_unit_number; /* + uint32_t given_unit_number; /* * Unit number given by * the user. */ @@ -104,24 +104,24 @@ struct cam_device { * Name of the device, * e.g. 'pass' */ - u_int32_t dev_unit_num; /* Unit number of the passthrough + uint32_t dev_unit_num; /* Unit number of the passthrough * device associated with this * particular device. */ char sim_name[SIM_IDLEN+1]; /* Controller name, e.g. 'ahc' */ - u_int32_t sim_unit_number; /* Controller unit number */ - u_int32_t bus_id; /* Controller bus number */ + uint32_t sim_unit_number; /* Controller unit number */ + uint32_t bus_id; /* Controller bus number */ lun_id_t target_lun; /* Logical Unit Number */ target_id_t target_id; /* Target ID */ path_id_t path_id; /* System SCSI bus number */ - u_int16_t pd_type; /* type of peripheral device */ + uint16_t pd_type; /* type of peripheral device */ struct scsi_inquiry_data inq_data; /* SCSI Inquiry data */ - u_int8_t serial_num[252]; /* device serial number */ - u_int8_t serial_num_len; /* length of the serial number */ - u_int8_t sync_period; /* Negotiated sync period */ - u_int8_t sync_offset; /* Negotiated sync offset */ - u_int8_t bus_width; /* Negotiated bus width */ + uint8_t serial_num[252]; /* device serial number */ + uint8_t serial_num_len; /* length of the serial number */ + uint8_t sync_period; /* Negotiated sync period */ + uint8_t sync_offset; /* Negotiated sync offset */ + uint8_t bus_width; /* Negotiated bus width */ int fd; /* file descriptor for device */ }; @@ -157,22 +157,22 @@ int csio_decode(struct ccb_scsiio *csio, const char *fmt, ...) int csio_decode_visit(struct ccb_scsiio *csio, const char *fmt, void (*arg_put)(void *, int, void *, int, char *), void *puthook); -int buff_decode(u_int8_t *buff, size_t len, const char *fmt, ...) +int buff_decode(uint8_t *buff, size_t len, const char *fmt, ...) __printflike(3, 4); -int buff_decode_visit(u_int8_t *buff, size_t len, const char *fmt, +int buff_decode_visit(uint8_t *buff, size_t len, const char *fmt, void (*arg_put)(void *, int, void *, int, char *), void *puthook); -int csio_build(struct ccb_scsiio *csio, u_int8_t *data_ptr, - u_int32_t dxfer_len, u_int32_t flags, int retry_count, +int csio_build(struct ccb_scsiio *csio, uint8_t *data_ptr, + uint32_t dxfer_len, uint32_t flags, int retry_count, int timeout, const char *cmd_spec, ...); -int csio_build_visit(struct ccb_scsiio *csio, u_int8_t *data_ptr, - u_int32_t dxfer_len, u_int32_t flags, int retry_count, +int csio_build_visit(struct ccb_scsiio *csio, uint8_t *data_ptr, + uint32_t dxfer_len, uint32_t flags, int retry_count, int timeout, const char *cmd_spec, int (*arg_get)(void *hook, char *field_name), void *gethook); int csio_encode(struct ccb_scsiio *csio, const char *fmt, ...) __printflike(2, 3); -int buff_encode_visit(u_int8_t *buff, size_t len, const char *fmt, +int buff_encode_visit(uint8_t *buff, size_t len, const char *fmt, int (*arg_get)(void *hook, char *field_name), void *gethook); int csio_encode_visit(struct ccb_scsiio *csio, const char *fmt, diff --git a/lib/libcam/scsi_cmdparse.c b/lib/libcam/scsi_cmdparse.c index b123d2747ca9..7da553d14397 100644 --- a/lib/libcam/scsi_cmdparse.c +++ b/lib/libcam/scsi_cmdparse.c @@ -103,7 +103,7 @@ __FBSDID("$FreeBSD$"); */ static int -do_buff_decode(u_int8_t *buff, size_t len, +do_buff_decode(uint8_t *buff, size_t len, void (*arg_put)(void *, int , void *, int, char *), void *puthook, const char *fmt, va_list *ap) { @@ -701,7 +701,7 @@ csio_decode_visit(struct ccb_scsiio *csio, const char *fmt, } int -buff_decode(u_int8_t *buff, size_t len, const char *fmt, ...) +buff_decode(uint8_t *buff, size_t len, const char *fmt, ...) { va_list ap; int retval; @@ -716,7 +716,7 @@ buff_decode(u_int8_t *buff, size_t len, const char *fmt, ...) } int -buff_decode_visit(u_int8_t *buff, size_t len, const char *fmt, +buff_decode_visit(uint8_t *buff, size_t len, const char *fmt, void (*arg_put)(void *, int, void *, int, char *), void *puthook) { @@ -736,8 +736,8 @@ buff_decode_visit(u_int8_t *buff, size_t len, const char *fmt, * string describing the */ int -csio_build(struct ccb_scsiio *csio, u_int8_t *data_ptr, u_int32_t dxfer_len, - u_int32_t flags, int retry_count, int timeout, const char *cmd_spec, +csio_build(struct ccb_scsiio *csio, uint8_t *data_ptr, uint32_t dxfer_len, + uint32_t flags, int retry_count, int timeout, const char *cmd_spec, ...) { size_t cmdlen; @@ -773,8 +773,8 @@ done: } int -csio_build_visit(struct ccb_scsiio *csio, u_int8_t *data_ptr, - u_int32_t dxfer_len, u_int32_t flags, int retry_count, +csio_build_visit(struct ccb_scsiio *csio, uint8_t *data_ptr, + uint32_t dxfer_len, uint32_t flags, int retry_count, int timeout, const char *cmd_spec, int (*arg_get)(void *hook, char *field_name), void *gethook) { @@ -831,7 +831,7 @@ csio_encode(struct ccb_scsiio *csio, const char *fmt, ...) } int -buff_encode_visit(u_int8_t *buff, size_t len, const char *fmt, +buff_encode_visit(uint8_t *buff, size_t len, const char *fmt, int (*arg_get)(void *hook, char *field_name), void *gethook) { diff --git a/lib/libcam/scsi_wrap.c b/lib/libcam/scsi_wrap.c index 524d36955c17..069dfa7320b1 100644 --- a/lib/libcam/scsi_wrap.c +++ b/lib/libcam/scsi_wrap.c @@ -146,7 +146,7 @@ scsi_wrap_inquiry(struct cam_device *device, uint32_t page, uint32_t length) /*retries*/ 0, /*cbfcnp*/ NULL, /* tag_action */ MSG_SIMPLE_Q_TAG, - /* inq_buf */ (u_int8_t *)buf, + /* inq_buf */ (uint8_t *)buf, /* inq_len */ length, /* evpd */ 1, /* page_code */ page,