Search
j0ke.net Open Build Service
>
Projects
>
ha
:
rebuilds
>
iscsi-initiator-utils
> iscsi-initiator-utils-add-info-compat.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File iscsi-initiator-utils-add-info-compat.patch of Package iscsi-initiator-utils
diff -aurp open-iscsi-2.0-868-test1/usr/iscsiadm.c open-iscsi-2.0-868-test1.tmp/usr/iscsiadm.c --- open-iscsi-2.0-868-test1/usr/iscsiadm.c 2008-01-03 13:23:36.000000000 -0600 +++ open-iscsi-2.0-868-test1.tmp/usr/iscsiadm.c 2008-01-03 14:11:15.000000000 -0600 @@ -73,6 +73,7 @@ static struct option const long_options[ {"value", required_argument, NULL, 'v'}, {"sid", required_argument, NULL, 'r'}, {"rescan", no_argument, NULL, 'R'}, + {"info", no_argument, NULL, 'i'}, {"print", required_argument, NULL, 'P'}, {"login", no_argument, NULL, 'l'}, {"loginall", required_argument, NULL, 'L'}, @@ -86,7 +87,7 @@ static struct option const long_options[ {"help", no_argument, NULL, 'h'}, {NULL, 0, NULL, 0}, }; -static char *short_options = "RlVhm:p:P:T:H:I:U:k:L:d:r:n:v:o:sSt:u"; +static char *short_options = "iRlVhm:p:P:T:H:I:U:k:L:d:r:n:v:o:sSt:u"; static void usage(int status) { @@ -1960,6 +1961,7 @@ main(int argc, char **argv) int ch, longindex, mode=-1, port=-1, do_login=0, do_rescan=0; int rc=0, sid=-1, op=-1, type=-1, do_logout=0, do_stats=0, do_show=0; int do_login_all=0, do_logout_all=0, info_level=-1, num_ifaces = 0; + int do_info=0; int tpgt = PORTAL_GROUP_TAG_UNKNOWN, killiscsid=-1; idbm_t *db = NULL; struct sigaction sa_old; @@ -2026,6 +2028,9 @@ main(int argc, char **argv) case 'R': do_rescan = 1; break; + case 'i': + do_info = 1; + break; case 'P': info_level = atoi(optarg); break; @@ -2318,6 +2323,13 @@ main(int argc, char **argv) if (!t) goto free_info; + if (do_info) { + rc = print_session(db, 3, info); + if (rc) + rc = -1; + goto free_info; + } + if (!do_logout && !do_rescan && !do_stats && op < 0 && info_level > 0) { rc = print_session(db, info_level, info); @@ -2351,6 +2363,11 @@ free_info: goto out; } + if (do_info) { + rc = print_sessions(db, 3); + goto out; + } + rc = print_sessions(db, info_level); } break;