Re: [PATCH] git gc --auto: defer on battery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 31, 2008 at 01:41:18AM +0200, Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote:
> And what about system dependency?  I mean, if at all, this stuff belongs 
> to compat/.  Definitely not into builtin-gc.c.  And yes, that means that 
> you should not call the function is_on_battery() blindly, but _only_ if 
> defer_on_battery is set.

Hm, should I just move it to there or should there be some kind of
check? Currently it just tries to open that file under /sys and if
fails, it just assumes we are not on battery. I think that's the
expected behaviour on systems not having a /sys filesystem.

As far as I see, compat/ is for functions which are available on some
systems but not an all ones. Obviously is_on_battery() won't be available
on any system. :)

The other issues (I hope) are fixed in the second patch.

Attachment: pgp96bIdKYblF.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux