[Stgt-devel] [PATCH] stgt: compile fixes
Pete Wyckoff
pw
Sun Jan 21 17:26:28 CET 2007
These show up on x86_64 gcc 4.1.1. Trivial fixes.
Signed-off-by: Pete Wyckoff <pw at osc.edu>
---
Index: scsi.c
===================================================================
--- scsi.c (revision 767)
+++ scsi.c (working copy)
@@ -224,7 +224,8 @@ static int __inquiry(struct tgt_device *
result = SAM_STAT_GOOD;
if (dev && strlen(dev->scsi_sn)) {
- char *p, *q;
+ uint8_t *p;
+ char *q;
p = data + 4 + tmp - 1;
q = dev->scsi_sn + SCSI_SN_LEN - 1;
@@ -241,7 +242,8 @@ static int __inquiry(struct tgt_device *
data[5] = 0x1;
data[7] = tmp;
if (dev)
- strncpy(data + 8, dev->scsi_id, SCSI_ID_LEN);
+ strncpy((char *) data + 8, dev->scsi_id,
+ SCSI_ID_LEN);
*len = tmp + 8;
result = SAM_STAT_GOOD;
}
Index: target.c
===================================================================
--- target.c (revision 767)
+++ target.c (working copy)
@@ -352,7 +352,7 @@ static int cmd_enabled(struct tgt_cmd_qu
if (cmd->attribute != MSG_SIMPLE_TAG)
dprintf("non simple attribute %" PRIx64 " %x %" PRIu64 " %d\n",
- cmd->tag, cmd->attribute, cmd->dev ? cmd->dev->lun : ~0ULL,
+ cmd->tag, cmd->attribute, cmd->dev ? cmd->dev->lun : (uint64_t) -1,
q->active_cmd);
switch (cmd->attribute) {
@@ -477,7 +477,7 @@ int target_cmd_queue(uint64_t nid, uint8
} else {
set_cmd_queued(cmd);
dprintf("blocked %" PRIx64 " %x %" PRIu64 " %d\n",
- tag, scb[0], cmd->dev ? cmd->dev->lun : ~0ULL,
+ tag, scb[0], cmd->dev ? cmd->dev->lun : (uint64_t) -1,
q->active_cmd);
memcpy(cmd->scb, scb, sizeof(cmd->scb));
More information about the stgt
mailing list