[Nut-upsdev] variable writability

Peter Selinger selinger at mathstat.dal.ca
Tue Oct 4 04:05:19 UTC 2005


in today's commits, I removed three lines that you apparently added on
August 10:  (aquette  04-May-05):    if (mode == HU_WALKMODE_INIT)  (aquette  04-May-05):      {  (aquette  04-May-05):            dstate_setflags(item->info_type, item->info_flags); (aquette  10-Aug-05):         /* Verify variable setability/RW */ (aquette  10-Aug-05):         if (get_current_data_attribute() != ATTR_DATA_CST) (aquette  10-Aug-05):                 dstate_setflags(item->info_type, ST_FLAG_RW);  (aquette  04-May-05):      }

I think that these three lines are a bug, because they cause the
ST_FLAG_RW flag to be set on all variables, whether or not they are
declared writable. (Moreover, these lines *erase* the ST_FLAG_STRING
flag from all items).

I am just alerting you to this in case you had some particular
functionality in mind on August 10 when you added this code.  If yes,
then this functionality should probably be achieved by some other

-- Peter

More information about the Nut-upsdev mailing list