X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fiscsi%2Flogin.c;h=1fdf35ca4601a3912b37d83f87efb0a6dde19766;hb=c8c9a4693b9fbe2a6b2b6dfced49958db5c7fdd4;hp=ff0d4cce77216895732e53bc841ad6c06c021b8a;hpb=cb522f25cada0d3429c69d0fbaa5bd337a422cdd;p=ccan diff --git a/ccan/iscsi/login.c b/ccan/iscsi/login.c index ff0d4cce..1fdf35ca 100644 --- a/ccan/iscsi/login.c +++ b/ccan/iscsi/login.c @@ -1,4 +1,4 @@ -/* +/* Copyright (C) 2010 by Ronnie Sahlberg This program is free software; you can redistribute it and/or modify @@ -15,11 +15,12 @@ along with this program; if not, see . */ -#define _GNU_SOURCE +#include "config.h" #include #include #include #include +#include #include "iscsi.h" #include "iscsi-private.h" @@ -204,7 +205,7 @@ int iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu int status; if (size < ISCSI_HEADER_SIZE) { - printf("dont have enough data to read status from login reply\n"); + printf("don't have enough data to read status from login reply\n"); return -1; } @@ -212,7 +213,7 @@ int iscsi_process_login_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu * some parameters. * we should also do proper handshaking if the target is not yet prepared to transition * to the next stage - */ + */ status = ntohs(*(uint16_t *)&hdr[36]); if (status != 0) { pdu->callback(iscsi, ISCSI_STATUS_ERROR, NULL, pdu->private_data); @@ -267,7 +268,7 @@ int iscsi_logout_async(struct iscsi_context *iscsi, iscsi_command_cb cb, void *p return 0; } -int iscsi_process_logout_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, const unsigned char *hdr, int size _U_) +int iscsi_process_logout_reply(struct iscsi_context *iscsi, struct iscsi_pdu *pdu, const unsigned char *hdr, int size UNUSED) { iscsi->is_loggedin = 0; pdu->callback(iscsi, ISCSI_STATUS_GOOD, NULL, pdu->private_data);