Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 May 2001 22:13:45 -0700 (PDT)
From:      Nick Sayer <nsayer@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/usr.sbin/apmd apmd.c apmd.h apmdlex.l apmdparse.y
Message-ID:  <200105150513.f4F5Djr76928@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
nsayer      2001/05/14 22:13:45 PDT

  Modified files:
    usr.sbin/apmd        apmd.c apmd.h apmdlex.l apmdparse.y 
  Log:
  Add battery state monitoring to apmd.
  
  The new syntax available in the config file is:
  
  apm_battery [0-9]+(%|[Mm) (dis|)charging { ... }
  
  The stuff in the braces is the same as the existing case. nn% checks for
  a certain percentage of life remaining and nnM checks for a cerain
  number of minutes remaining. Specifying "discharge" means that you're
  interested in knowing when the battery reaches a certain level while AC
  power is off, "charging" the opposite.
  
  The man page needs to be updated.
  
  The code can be fooled. If you SIGHUP the daemon and the battery level
  matches a rule it will be performed once per SIGHUP. If the battery
  level matches a rule and you repeatedly apply and take away AC power,
  the rule will be run once per occurance. This, however, is a feature.
  :-) The code also only runs when select() times out, so getting APM
  events more often than the timeout interval will result in the rules not
  being run. These are things that remain to be overcome.
  
  Revision  Changes    Path
  1.5       +166 -9    src/usr.sbin/apmd/apmd.c
  1.3       +22 -1     src/usr.sbin/apmd/apmd.h
  1.3       +14 -1     src/usr.sbin/apmd/apmdlex.l
  1.3       +40 -1     src/usr.sbin/apmd/apmdparse.y


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105150513.f4F5Djr76928>