mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-25 14:04:25 +00:00
bflsc only need one xlinkstr
This commit is contained in:
parent
66154e9f2b
commit
de009dab01
@ -304,19 +304,24 @@ static const char *blank = "";
|
|||||||
|
|
||||||
struct device_drv bflsc_drv;
|
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)
|
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);
|
struct bflsc_info *sc_info = (struct bflsc_info *)(bflsc->device_file);
|
||||||
char xlink[17];
|
char xlink[17];
|
||||||
|
|
||||||
if (dev > 0)
|
xlinkstr(xlink, dev, sc_info);
|
||||||
sprintf(xlink, "x-%d", dev);
|
|
||||||
else {
|
|
||||||
if (sc_info->sc_count > 0)
|
|
||||||
strcpy(xlink, " master");
|
|
||||||
else
|
|
||||||
xlink[0] = '\0';
|
|
||||||
}
|
|
||||||
|
|
||||||
usb_applog(bflsc, cmd, xlink, amount, err);
|
usb_applog(bflsc, cmd, xlink, amount, err);
|
||||||
}
|
}
|
||||||
@ -450,18 +455,6 @@ static void freebreakdown(int *count, char **firstname, char ***fields)
|
|||||||
*fields = NULL;
|
*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)
|
static int write_to_dev(struct cgpu_info *bflsc, int dev, char *buf, int buflen, int *amount, enum usb_cmds cmd)
|
||||||
{
|
{
|
||||||
struct DataForwardToChain data;
|
struct DataForwardToChain data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user