1062
1062
err = target->bst->bs_cmd_done(cmd);
1064
dprintf("%d %p %p %u %u %d\n", cmd_mmapio(cmd), scsi_get_out_buffer(cmd),
1064
dprintf("%p %p %u %u %d\n", scsi_get_out_buffer(cmd),
1065
1065
scsi_get_in_buffer(cmd), scsi_get_out_length(cmd),
1066
1066
scsi_get_in_length(cmd), err);
1087
1087
err = target->bst->bs_cmd_done(cmd);
1089
dprintf("%d %p %p %u %u %d\n", cmd_mmapio(cmd), scsi_get_out_buffer(cmd),
1089
dprintf("%p %p %u %u %d\n", scsi_get_out_buffer(cmd),
1090
1090
scsi_get_in_buffer(cmd), scsi_get_out_length(cmd),
1091
1091
scsi_get_in_length(cmd), err);
1795
1795
lu->path ? : "None",
1796
1796
open_flags_to_str(strflags, lu->bsoflags));
1798
if (!strcmp(tgt_drivers[target->lid]->name, "iscsi")) {
1798
if (!strcmp(tgt_drivers[target->lid]->name, "iscsi") ||
1799
!strcmp(tgt_drivers[target->lid]->name, "iser")) {
1801
1802
shprintf(total, buf, rest, _TAB1
1967
int tgt_portal_create(int lld, char *args)
1969
char *portals = NULL;
1971
portals = strstr(args, "portal=");
1973
eprintf("invalid option when creating portals: %s\n", args);
1974
return TGTADM_INVALID_REQUEST;
1977
if (tgt_drivers[lld]->portal_create) {
1978
if (tgt_drivers[lld]->portal_create(portals)) {
1979
eprintf("failed to create portal %s\n", portals);
1980
return TGTADM_INVALID_REQUEST;
1983
eprintf("can not create portals for for this lld type\n");
1984
return TGTADM_INVALID_REQUEST;
1987
dprintf("succeed to create new portals %s\n", portals);
1992
int tgt_portal_destroy(int lld, char *args)
1994
char *portals = NULL;
1996
portals = strstr(args, "portal=");
1998
eprintf("invalid option when destroying portals: %s\n", args);
1999
return TGTADM_INVALID_REQUEST;
2002
if (tgt_drivers[lld]->portal_destroy) {
2003
if (tgt_drivers[lld]->portal_destroy(portals)) {
2004
eprintf("failed to destroy portal %s\n", portals);
2005
return TGTADM_INVALID_REQUEST;
2008
eprintf("can not destroy portals for for this lld type\n");
2009
return TGTADM_INVALID_REQUEST;
2012
dprintf("succeed to destroy portals %s\n", portals);
1966
2017
int account_show(char *buf, int rest)
1968
2019
int total = 0, max = rest;