mirror of
https://github.com/Silicondust/libhdhomerun
synced 2025-08-20 13:33:29 -07:00
add hdhomerun_device_upgrade_filename helper
This commit is contained in:
parent
0d3b72c1cc
commit
e0c9e43df4
2 changed files with 12 additions and 0 deletions
|
@ -1322,6 +1322,17 @@ int hdhomerun_device_upgrade(struct hdhomerun_device_t *hd, FILE *upgrade_file)
|
||||||
return hdhomerun_control_upgrade(hd->cs, upgrade_file);
|
return hdhomerun_control_upgrade(hd->cs, upgrade_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int hdhomerun_device_upgrade_filename(struct hdhomerun_device_t *hd, char *filename)
|
||||||
|
{
|
||||||
|
int ret;
|
||||||
|
FILE *fp = fopen(filename, "rb");
|
||||||
|
if (!fp)
|
||||||
|
return -1;
|
||||||
|
ret = hdhomerun_device_upgrade(hd, fp);
|
||||||
|
fclose(fp);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
void hdhomerun_device_debug_print_video_stats(struct hdhomerun_device_t *hd)
|
void hdhomerun_device_debug_print_video_stats(struct hdhomerun_device_t *hd)
|
||||||
{
|
{
|
||||||
if (!hdhomerun_debug_enabled(hd->dbg)) {
|
if (!hdhomerun_debug_enabled(hd->dbg)) {
|
||||||
|
|
|
@ -239,6 +239,7 @@ extern LIBHDHOMERUN_API uint8_t hdhomerun_device_channelscan_get_progress(struct
|
||||||
* Returns -1 if an error occurs.
|
* Returns -1 if an error occurs.
|
||||||
*/
|
*/
|
||||||
extern LIBHDHOMERUN_API int hdhomerun_device_upgrade(struct hdhomerun_device_t *hd, FILE *upgrade_file);
|
extern LIBHDHOMERUN_API int hdhomerun_device_upgrade(struct hdhomerun_device_t *hd, FILE *upgrade_file);
|
||||||
|
extern LIBHDHOMERUN_API int hdhomerun_device_upgrade_filename(struct hdhomerun_device_t *hd, char *filename);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Low level accessor functions.
|
* Low level accessor functions.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue