[Bug 214874] ctld daemon wrong lun_size value on i386
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Nov 28 03:14:18 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214874
--- Comment #2 from pprocacci at gmail.com ---
sizeof(size_t) == 4
sizeof(uint64_t) == 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 this
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 = 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,
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list