ISCSI_URL change strings from dynamic to static

This commit is contained in:
Peter Lieven
2012-10-30 11:41:51 +01:00
parent e10a5a97be
commit 774ede1f46
4 changed files with 21 additions and 93 deletions

View File

@@ -61,8 +61,6 @@ enum iscsi_immediate_data {
ISCSI_IMMEDIATE_DATA_YES = 1
};
#define MAX_STRING_SIZE (255)
struct iscsi_context {
char initiator_name[MAX_STRING_SIZE+1];
char target_name[MAX_STRING_SIZE+1];

View File

@@ -32,6 +32,8 @@ extern "C" {
struct iscsi_context;
struct sockaddr;
#define MAX_STRING_SIZE (255)
/*
* Syntax for normal and portal/discovery URLs.
*/
@@ -69,13 +71,11 @@ EXTERN int iscsi_queue_length(struct iscsi_context *iscsi);
*/
int iscsi_set_tcp_keepalive(struct iscsi_context *iscsi, int idle, int count, int interval);
struct iscsi_url {
const char *portal;
const char *target;
const char *user;
const char *passwd;
char portal[MAX_STRING_SIZE+1];
char target[MAX_STRING_SIZE+1];
char user[MAX_STRING_SIZE+1];
char passwd[MAX_STRING_SIZE+1];
int lun;
};