Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:11.4:Update
nut.794
nut-powercom.c.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nut-powercom.c.patch of Package nut.794
--- drivers/powercom.c 2009-02-17 12:20:48.000000000 +0300 +++ drivers/powercom.c 2010-03-02 15:48:25.354735038 +0300 @@ -852,21 +852,30 @@ /* setup flow control */ types[type].flowControl.setup_flow_control(); - if (!strncmp(types[type].name, "BNT",3) || !strcmp(types[type].name, "KIN") || !strcmp(types[type].name, "IMP")){ + if (getval("type") == NULL){ if (!ups_getinfo()) return; if (raw_data[UPSVERSION]==0xFF){ types[type].name="IMP"; - model=IMPmodels[raw_data[MODELNUMBER]/16]; } if (raw_data[MODELNAME]==0x42){ if (!strcmp(types[type].name, "BNT-other")) types[type].name="BNT-other"; else types[type].name="BNT"; - model=BNTmodels[raw_data[MODELNUMBER]/16]; } if (raw_data[MODELNAME]==0x4B){ types[type].name="KIN"; + } + } + if (!strncmp(types[type].name, "BNT",3) || !strcmp(types[type].name, "KIN") || !strcmp(types[type].name, "IMP")){ + if (!ups_getinfo()) return; + if (!strcmp(types[type].name, "IMP")){ + model=IMPmodels[raw_data[MODELNUMBER]/16]; + } + if (!strncmp(types[type].name, "BNT",3)){ + model=BNTmodels[raw_data[MODELNUMBER]/16]; + } + if (!strcmp(types[type].name, "KIN")){ model=KINmodels[raw_data[MODELNUMBER]/16]; } linevoltage=voltages[raw_data[MODELNUMBER]%16];
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor