media: usb/dvb-usb: Replace strlcpy() with strscpy()

This commit is contained in:
CrazyCat
2024-03-10 21:00:07 +02:00
parent 804a1febcc
commit 508dae75e4
24 changed files with 1592 additions and 1592 deletions

View File

@@ -259,7 +259,7 @@ static int tbsqboxs1_frontend_attach(struct dvb_usb_adapter *d)
tbsqboxs1_op_rw(u->udev, 0x8a, 0, 0,
buf, 2, TBSQBOX_WRITE_MSG);
strlcpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
strscpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
return 0;
}
}

View File

@@ -278,7 +278,7 @@ static int tbsqbox2_frontend_attach(struct dvb_usb_adapter *d)
tbsqbox2_op_rw(u->udev, 0x8a, 0, 0,
buf, 2, TBSQBOX_WRITE_MSG);
strlcpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
strscpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
return 0;
}
}

View File

@@ -224,7 +224,7 @@ static int tbsqbox22_frontend_attach(struct dvb_usb_adapter *d)
buf[1] = 1;
tbsqbox22_op_rw(u->udev, 0x8a, 0, 0, buf, 2, TBSQBOX_WRITE_MSG);
strlcpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
strscpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
return 0;
err:

View File

@@ -601,7 +601,7 @@ static int tbsqbox2ci_frontend_attach(struct dvb_usb_adapter *d)
tbsqbox2ci_init(d);
strlcpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
strscpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
return 0;
}
}

View File

@@ -272,7 +272,7 @@ static int tbsqboxs2_frontend_attach(struct dvb_usb_adapter *d)
tbsqboxs2_op_rw(u->udev, 0x8a, 0, 0,
buf, 2, TBSQBOX_WRITE_MSG);
strlcpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
strscpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
return 0;
}

View File

@@ -188,7 +188,7 @@ static int tbs5220_frontend_attach(struct dvb_usb_adapter *adap)
si2168_config.ts_mode = SI2168_TS_PARALLEL;
si2168_config.ts_clock_gapped = true;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
strscpy(info.type, "si2168", I2C_NAME_SIZE);
info.addr = 0x64;
info.platform_data = &si2168_config;
request_module(info.type);
@@ -206,7 +206,7 @@ static int tbs5220_frontend_attach(struct dvb_usb_adapter *adap)
si2157_config.fe = adap->fe_adap[0].fe;
si2157_config.if_port = 1;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
strscpy(info.type, "si2157", I2C_NAME_SIZE);
info.addr = 0x60;
info.platform_data = &si2157_config;
request_module(info.type);
@@ -245,7 +245,7 @@ static int tbs5220_frontend_attach(struct dvb_usb_adapter *adap)
tbs5220_op_rw(d->udev, 0x8a, 0, 0,
buf, 2, TBS5220_WRITE_MSG);
strlcpy(adap->fe_adap->fe->ops.info.name,d->props.devices[0].name,52);
strscpy(adap->fe_adap->fe->ops.info.name,d->props.devices[0].name,52);
return 0;
}

View File

@@ -165,7 +165,7 @@ static int tbs5230_frontend_attach(struct dvb_usb_adapter*adap)
adap->fe_adap[0].fe = dvb_attach(cxd2878_attach, &tbs5230_cfg, &d->i2c_adap);
if(adap->fe_adap[0].fe!=NULL){
strlcpy(adap->fe_adap[0].fe->ops.info.name,d->props.devices[0].name,52);
strscpy(adap->fe_adap[0].fe->ops.info.name,d->props.devices[0].name,52);
return 0;
}
return -EIO;

View File

@@ -283,7 +283,7 @@ static int tbs5301_frontend_attach(struct dvb_usb_adapter *d)
ret = tbs5301_op_rw(u->udev, 0x80, 0, 0,
buf, 4, TBS5301_WRITE_MSG);
strlcpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
strscpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
return 0;
err:

View File

@@ -284,7 +284,7 @@ static int tbs5520_frontend_attach(struct dvb_usb_adapter *d)
tbs5520_op_rw(d->dev->udev, 0x8a, 0, 0,
buf, 2, TBS5520_WRITE_MSG);
strlcpy(d->fe_adap->fe->ops.info.name,d->dev->props.devices[0].name,52);
strscpy(d->fe_adap->fe->ops.info.name,d->dev->props.devices[0].name,52);
return 0;
err:
printk("TBS5520: frontend attach failed\n");

View File

@@ -230,7 +230,7 @@ static int tbs5520se_frontend_attach(struct dvb_usb_adapter *adap)
si2183_config.RF_switch = NULL;
si2183_config.agc_mode = 0x5 ;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "si2183", I2C_NAME_SIZE);
strscpy(info.type, "si2183", I2C_NAME_SIZE);
info.addr = 0x67;
info.platform_data = &si2183_config;
request_module(info.type);
@@ -264,7 +264,7 @@ static int tbs5520se_frontend_attach(struct dvb_usb_adapter *adap)
si2157_config.fe = adap->fe_adap[0].fe;
si2157_config.if_port = 1;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
strscpy(info.type, "si2157", I2C_NAME_SIZE);
info.addr = 0x61;
info.platform_data = &si2157_config;
request_module(info.type);
@@ -312,9 +312,9 @@ static int tbs5520se_frontend_attach(struct dvb_usb_adapter *adap)
tbs5520se_op_rw(d->udev, 0x8a, 0, 0,
buf, 2, TBS5520SE_WRITE_MSG);
strlcpy(adap->fe_adap[0].fe->ops.info.name,d->props.devices[0].name,52);
strscpy(adap->fe_adap[0].fe->ops.info.name,d->props.devices[0].name,52);
strcat(adap->fe_adap[0].fe->ops.info.name," DVB-T/T2/C/C2/ISDB-T");
strlcpy(adap->fe_adap[0].fe2->ops.info.name,d->props.devices[0].name,52);
strscpy(adap->fe_adap[0].fe2->ops.info.name,d->props.devices[0].name,52);
strcat(adap->fe_adap[0].fe2->ops.info.name," DVB-S/S2/S2X");
return 0;

View File

@@ -198,14 +198,14 @@ static int tbs5530_frontend_cxd2878_attach(struct dvb_usb_adapter *adap)
adap->fe_adap[0].fe = dvb_attach(cxd2878_attach, &tbs5530_cfg, &d->i2c_adap);
if(adap->fe_adap[0].fe!=NULL){
strlcpy(adap->fe_adap[0].fe->ops.info.name,d->props.devices[0].name,60);
strscpy(adap->fe_adap[0].fe->ops.info.name,d->props.devices[0].name,60);
strcat(adap->fe_adap[0].fe->ops.info.name," DVB-T/T2/C/C2,ISDB-T/C,ATSC1.0");
return 0;
}
// strlcpy(adap->fe_adap[0].fe->ops.info.name,d->props.devices[0].name,52);
// strscpy(adap->fe_adap[0].fe->ops.info.name,d->props.devices[0].name,52);
// strlcpy(adap->fe_adap[0].fe2->ops.info.name,d->props.devices[0].name,52);
// strscpy(adap->fe_adap[0].fe2->ops.info.name,d->props.devices[0].name,52);
// strcat(adap->fe_adap[0].fe2->ops.info.name," DVB-S/S2/S2X");
return -EIO;
@@ -232,7 +232,7 @@ static int tbs5930_frontend_m88rs6060_attach(struct dvb_usb_adapter *adap)
m88rs6060_config.write_properties = NULL;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "m88rs6060", I2C_NAME_SIZE);
strscpy(info.type, "m88rs6060", I2C_NAME_SIZE);
info.addr = 0x69;
info.platform_data = &m88rs6060_config;
request_module(info.type);
@@ -256,7 +256,7 @@ static int tbs5930_frontend_m88rs6060_attach(struct dvb_usb_adapter *adap)
buf, 2, tbs5530_WRITE_MSG);
msleep(10);
strlcpy(adap->fe_adap[1].fe->ops.info.name,d->props.devices[0].name,52);
strscpy(adap->fe_adap[1].fe->ops.info.name,d->props.devices[0].name,52);
strcat(adap->fe_adap[1].fe->ops.info.name," DVB-S/S2/S2X");
return 0;
}

View File

@@ -528,7 +528,7 @@ static int tbs5580_frontend_attach(struct dvb_usb_adapter *adap)
si2183_config.RF_switch = NULL;
si2183_config.agc_mode = 0x5 ;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "si2183", I2C_NAME_SIZE);
strscpy(info.type, "si2183", I2C_NAME_SIZE);
info.addr = 0x67;
info.platform_data = &si2183_config;
request_module(info.type);
@@ -561,7 +561,7 @@ static int tbs5580_frontend_attach(struct dvb_usb_adapter *adap)
si2157_config.fe = adap->fe_adap[0].fe;
si2157_config.if_port = 1;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
strscpy(info.type, "si2157", I2C_NAME_SIZE);
info.addr = 0x61;
info.platform_data = &si2157_config;
request_module(info.type);
@@ -612,9 +612,9 @@ static int tbs5580_frontend_attach(struct dvb_usb_adapter *adap)
tbs5580_init(adap);
strlcpy(adap->fe_adap[0].fe->ops.info.name,d->props.devices[0].name,52);
strscpy(adap->fe_adap[0].fe->ops.info.name,d->props.devices[0].name,52);
strcat(adap->fe_adap[0].fe->ops.info.name," DVB-T/T2/C/C2/ISDB-T");
strlcpy(adap->fe_adap[0].fe2->ops.info.name,d->props.devices[0].name,52);
strscpy(adap->fe_adap[0].fe2->ops.info.name,d->props.devices[0].name,52);
strcat(adap->fe_adap[0].fe2->ops.info.name," DVB-S/S2/S2X");
return 0;

View File

@@ -422,7 +422,7 @@ static int tbs5590_frontend_attach(struct dvb_usb_adapter *adap)
si2183_config.LED_switch = tbs5590_LED_ctrl;
si2183_config.agc_mode = 0x5 ;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "si2183", I2C_NAME_SIZE);
strscpy(info.type, "si2183", I2C_NAME_SIZE);
info.addr = 0x67;
info.platform_data = &si2183_config;
request_module(info.type);
@@ -456,7 +456,7 @@ static int tbs5590_frontend_attach(struct dvb_usb_adapter *adap)
si2157_config.fe = adap->fe_adap[0].fe;
si2157_config.if_port = 1;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
strscpy(info.type, "si2157", I2C_NAME_SIZE);
info.addr = 0x61;
info.platform_data = &si2157_config;
request_module(info.type);
@@ -522,7 +522,7 @@ static int tbs5590_frontend_attach(struct dvb_usb_adapter *adap)
m88rs6060_config.LED_switch = tbs5590_LED_ctrl;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "m88rs6060", I2C_NAME_SIZE);
strscpy(info.type, "m88rs6060", I2C_NAME_SIZE);
info.addr = 0x69;
info.platform_data = &m88rs6060_config;
request_module(info.type);
@@ -552,9 +552,9 @@ static int tbs5590_frontend_attach(struct dvb_usb_adapter *adap)
strlcpy(adap->fe_adap[0].fe->ops.info.name,d->props.devices[0].name,52);
strscpy(adap->fe_adap[0].fe->ops.info.name,d->props.devices[0].name,52);
strcat(adap->fe_adap[0].fe->ops.info.name," DVB-T/T2/C/C2/ISDB-T");
strlcpy(adap->fe_adap[0].fe2->ops.info.name,d->props.devices[0].name,52);
strscpy(adap->fe_adap[0].fe2->ops.info.name,d->props.devices[0].name,52);
strcat(adap->fe_adap[0].fe2->ops.info.name," DVB-S/S2/S2X");
return 0;
@@ -570,7 +570,7 @@ static int tbs5590_ASI_attach(struct dvb_usb_adapter *adap)
return -ENODEV;
}
strlcpy(adap->fe_adap[0].fe->ops.info.name,u->props.devices[0].name,52);
strscpy(adap->fe_adap[0].fe->ops.info.name,u->props.devices[0].name,52);
strcat(adap->fe_adap[0].fe->ops.info.name," ASI-IN");
return 0;

View File

@@ -590,7 +590,7 @@ static int tbs5880_frontend_attach(struct dvb_usb_adapter *d)
buf, 2, TBS5880_WRITE_MSG);
tbs5880_init(d);
strlcpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
strscpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
return 0;
}
}

View File

@@ -507,7 +507,7 @@ static int tbs5881_frontend_attach(struct dvb_usb_adapter *adap)
si2168_config.ts_clock_gapped = true;
si2168_config.ts_clock_inv = true;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "si2168", I2C_NAME_SIZE);
strscpy(info.type, "si2168", I2C_NAME_SIZE);
info.addr = 0x64;
info.platform_data = &si2168_config;
request_module(info.type);
@@ -525,7 +525,7 @@ static int tbs5881_frontend_attach(struct dvb_usb_adapter *adap)
si2157_config.fe = adap->fe_adap[0].fe;
si2157_config.if_port = 1;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "si2157", I2C_NAME_SIZE);
strscpy(info.type, "si2157", I2C_NAME_SIZE);
info.addr = 0x60;
info.platform_data = &si2157_config;
request_module(info.type);
@@ -566,7 +566,7 @@ static int tbs5881_frontend_attach(struct dvb_usb_adapter *adap)
buf, 2, TBS5881_WRITE_MSG);
tbs5881_init(adap);
strlcpy(adap->fe_adap->fe->ops.info.name,d->props.devices[0].name,52);
strscpy(adap->fe_adap->fe->ops.info.name,d->props.devices[0].name,52);
return 0;
}

View File

@@ -223,7 +223,7 @@ static int tbs5922se_frontend_attach(struct dvb_usb_adapter *d)
buf[1] = 1;
tbs5922se_op_rw(u->udev, 0x8a, 0, 0, buf, 2, TBS5922SE_WRITE_MSG);
strlcpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
strscpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
return 0;
err:

View File

@@ -289,7 +289,7 @@ static int tbs5925_frontend_attach(struct dvb_usb_adapter *d)
tbs5925_op_rw(u->udev, 0x8a, 0, 0,
buf, 2, TBS5925_WRITE_MSG);
strlcpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
strscpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
return 0;
}

View File

@@ -295,7 +295,7 @@ static int tbs5927_frontend_attach(struct dvb_usb_adapter *d)
tbs5927_op_rw(d->dev->udev, 0x8a, 0, 0,
buf, 2, TBS5927_WRITE_MSG);
strlcpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
strscpy(d->fe_adap->fe->ops.info.name,u->props.devices[0].name,52);
return 0;
}

View File

@@ -166,7 +166,7 @@ static int tbs5930_frontend_attach(struct dvb_usb_adapter *adap)
m88rs6060_config.write_properties = NULL;
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "m88rs6060", I2C_NAME_SIZE);
strscpy(info.type, "m88rs6060", I2C_NAME_SIZE);
info.addr = 0x69;
info.platform_data = &m88rs6060_config;
request_module(info.type);
@@ -190,7 +190,7 @@ static int tbs5930_frontend_attach(struct dvb_usb_adapter *adap)
buf, 2, TBS5930_WRITE_MSG);
msleep(10);
strlcpy(adap->fe_adap->fe->ops.info.name,d->props.devices[0].name,52);
strscpy(adap->fe_adap->fe->ops.info.name,d->props.devices[0].name,52);
return 0;
}

View File

@@ -278,7 +278,7 @@ static int tbs5931_frontend_attach(struct dvb_usb_adapter *adap)
buf, 2, TBS5931_WRITE_MSG);
msleep(10);
strlcpy(adap->fe_adap->fe->ops.info.name,d->props.devices[0].name,52);
strscpy(adap->fe_adap->fe->ops.info.name,d->props.devices[0].name,52);
return 0;