1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-10 14:58:01 +00:00

bflsc only need one xlinkstr

This commit is contained in:
Kano 2013-04-27 15:55:39 +10:00
parent 66154e9f2b
commit de009dab01

View File

@ -304,19 +304,24 @@ static const char *blank = "";
struct device_drv bflsc_drv;
static void xlinkstr(char *xlink, int dev, struct bflsc_info *sc_info)
{
if (dev > 0)
sprintf(xlink, " x-%d", dev);
else {
if (sc_info->sc_count > 1)
strcpy(xlink, " master");
else
*xlink = '\0';
}
}
static void bflsc_applog(struct cgpu_info *bflsc, int dev, enum usb_cmds cmd, int amount, int err)
{
struct bflsc_info *sc_info = (struct bflsc_info *)(bflsc->device_file);
char xlink[17];
if (dev > 0)
sprintf(xlink, "x-%d", dev);
else {
if (sc_info->sc_count > 0)
strcpy(xlink, " master");
else
xlink[0] = '\0';
}
xlinkstr(xlink, dev, sc_info);
usb_applog(bflsc, cmd, xlink, amount, err);
}
@ -450,18 +455,6 @@ static void freebreakdown(int *count, char **firstname, char ***fields)
*fields = NULL;
}
static void xlinkstr(char *xlink, int dev, struct bflsc_info *sc_info)
{
if (dev > 0)
sprintf(xlink, " x-%d", dev);
else {
if (sc_info->sc_count > 0)
strcpy(xlink, " mast");
else
*xlink = '\0';
}
}
static int write_to_dev(struct cgpu_info *bflsc, int dev, char *buf, int buflen, int *amount, enum usb_cmds cmd)
{
struct DataForwardToChain data;