Date: Mon, 28 Nov 2016 03:14:18 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 214874] ctld daemon wrong lun_size value on i386 Message-ID: <bug-214874-8-9Kth7t4PmC@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-214874-8@https.bugs.freebsd.org/bugzilla/> References: <bug-214874-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214874 --- Comment #2 from pprocacci@gmail.com --- sizeof(size_t) =3D=3D 4 sizeof(uint64_t) =3D=3D 8 The cast from uint64_t to size_t is killing the value. This small patch fixes the problem, though I'm not sure what ill effects th= is may have. diff -ur ctld.orig ctld diff -ur ctld.orig/ctld.c ctld/ctld.c --- ctld.orig/ctld.c 2016-11-27 22:12:27.525990000 -0500 +++ ctld/ctld.c 2016-11-27 22:09:25.798040000 -0500 @@ -1496,7 +1496,7 @@ } void -lun_set_size(struct lun *lun, size_t value) +lun_set_size(struct lun *lun, uint64_t value) { lun->l_size =3D value; } Only in ctld.orig: ctld.c.orig diff -ur ctld.orig/ctld.h ctld/ctld.h --- ctld.orig/ctld.h 2016-11-27 22:12:16.851553000 -0500 +++ ctld/ctld.h 2016-11-27 22:10:31.732258000 -0500 @@ -388,7 +388,7 @@ 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, uint64_t value); void lun_set_ctl_lun(struct lun *lun, uint32_t value); struct option *option_new(struct options *os, --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214874-8-9Kth7t4PmC>