Date: Fri, 17 Jan 2025 21:43:35 GMT From: Alan Somers <asomers@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: f26fe2c6669d - main - ctld: correctly parse LUN size on 32-bit arches Message-ID: <202501172143.50HLhZNx061307@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=f26fe2c6669d56621ac85f5279aa85503cbf59bc commit f26fe2c6669d56621ac85f5279aa85503cbf59bc Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2025-01-17 17:36:08 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2025-01-17 21:43:09 +0000 ctld: correctly parse LUN size on 32-bit arches Disk offset values must always be 64-bit, not size_t. PR: 214874 Submitted by: pprocacci@gmail.com MFC after: 2 weeks Event: January 2025 Bug-busting session --- usr.sbin/ctld/ctld.c | 2 +- usr.sbin/ctld/ctld.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ctld/ctld.c b/usr.sbin/ctld/ctld.c index 346d1908aa6f..497e0f6e7600 100644 --- a/usr.sbin/ctld/ctld.c +++ b/usr.sbin/ctld/ctld.c @@ -1568,7 +1568,7 @@ lun_set_serial(struct lun *lun, const char *value) } void -lun_set_size(struct lun *lun, size_t value) +lun_set_size(struct lun *lun, int64_t value) { lun->l_size = value; diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h index e1bab1a8e3b8..3f4b653d6896 100644 --- a/usr.sbin/ctld/ctld.h +++ b/usr.sbin/ctld/ctld.h @@ -349,7 +349,7 @@ void lun_set_device_id(struct lun *lun, const char *value); void lun_set_path(struct lun *lun, const char *value); void lun_set_scsiname(struct lun *lun, const char *value); void lun_set_serial(struct lun *lun, const char *value); -void lun_set_size(struct lun *lun, size_t value); +void lun_set_size(struct lun *lun, int64_t value); void lun_set_ctl_lun(struct lun *lun, uint32_t value); struct option *option_new(struct options *os,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501172143.50HLhZNx061307>