From d6a85ec2ee6720bf9a6e2ee54e50ec0cc434ac94 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Fri, 20 Jan 2017 16:01:01 +0000 Subject: [PATCH] Remove some unused code. MFC after: 2 weeks --- usr.bin/iscsictl/iscsictl.c | 11 ----------- usr.bin/iscsictl/iscsictl.h | 19 ------------------- 2 files changed, 30 deletions(-) diff --git a/usr.bin/iscsictl/iscsictl.c b/usr.bin/iscsictl/iscsictl.c index c283550f511..22ac0283ea1 100644 --- a/usr.bin/iscsictl/iscsictl.c +++ b/usr.bin/iscsictl/iscsictl.c @@ -704,17 +704,6 @@ usage(void) exit(1); } -char * -checked_strdup(const char *s) -{ - char *c; - - c = strdup(s); - if (c == NULL) - xo_err(1, "strdup"); - return (c); -} - int main(int argc, char **argv) { diff --git a/usr.bin/iscsictl/iscsictl.h b/usr.bin/iscsictl/iscsictl.h index 18300a18793..79d89b8ac5c 100644 --- a/usr.bin/iscsictl/iscsictl.h +++ b/usr.bin/iscsictl/iscsictl.h @@ -40,7 +40,6 @@ #define DEFAULT_IQN "iqn.1994-09.org.freebsd:" #define MAX_NAME_LEN 223 -#define MAX_DATA_SEGMENT_LENGTH 65536 #define AUTH_METHOD_UNSPECIFIED 0 #define AUTH_METHOD_NONE 1 @@ -88,23 +87,6 @@ struct conf { TAILQ_HEAD(, target) conf_targets; }; -#define CONN_SESSION_TYPE_NONE 0 -#define CONN_SESSION_TYPE_DISCOVERY 1 -#define CONN_SESSION_TYPE_NORMAL 2 - -struct connection { - struct target *conn_target; - int conn_socket; - int conn_session_type; - uint32_t conn_cmdsn; - uint32_t conn_statsn; - size_t conn_max_data_segment_length; - size_t conn_max_burst_length; - size_t conn_max_outstanding_r2t; - int conn_header_digest; - int conn_data_digest; -}; - struct conf *conf_new(void); struct conf *conf_new_from_file(const char *path); void conf_delete(struct conf *conf); @@ -116,7 +98,6 @@ void target_delete(struct target *ic); void print_periphs(int session_id); -char *checked_strdup(const char *); bool valid_iscsi_name(const char *name); int parse_enable(const char *enable);