use strncpy
[hdapsd.git] / README.md
blob841f77210f11eab13431f0dfc9a340dc7e9d20bc
1 hdapsd - Hard Drive Active Protection System Daemon
2 ===================================================
4 This is a disk protection user-space daemon. It monitors the acceleration
5 values through the various motion interfaces and automatically initiates
6 disk head parking if a fall or sliding of the laptop is detected.
8 Currently, the following motion interfaces are supported:
9  * HDAPS on IBM/Lenovo ThinkPads
10  * AMS on Apple iBooks and PowerBooks (G4)
11  * FREEFALL on Hewlett-Packard and DELL laptops
12  * HP3D on Hewlett-Packard laptops
13  * APPLESMC on Apple MacBooks and MacBooks Pro (Intel) (UNTESTED!)
15 Compilation
16 -----------
18     ./configure
19     make
20     make install
22 Usage
23 -----
24 hdapsd (it will try to autodetect everything itself)
25 for more options, please read `man hdapsd`
27 Compatibility
28 -------------
29 Since kernel 2.6.28 you don't need to patch your kernel, as support for
30 IDLE_IMMEDIATE is present in mainline.
32 **NOTE**: The new interface only allows IDLE_IMMEDIATE for drives that
33 announce to be ATA-7 conform. But threre are also drives that support ATA-6
34 only but do IDLE_IMMEDIATE fine. For those you need to force the interface
35 with: `echo -1 > /sys/block/$DISK/device/unload_heads`.
36 Or you can call hdapsd like this: `hdapsd -f -d $DISK`, to achieve the same
37 result.
39 For kernels <2.6.28, please have a look at
40 http://www.thinkwiki.org/wiki/HDAPS#Kernel_patch
41 and patch your kernel with the appropriate patch before using hdapsd.
43 mainline hdaps module vs tp_smapi (ThinkPad only)
44 -------------------------------------------------
45 The mainline hdaps module present in Linux kernels does not support all
46 hdaps-enabled ThinkPads, thus it is recommended to use the one provided
47 by tp_smapi.
48 Additionally the tp_smapi version provides a input interface to the data,
49 which stops hdapsd from polling the data itself all the time, saving your
50 battery.
52 Travis CI build status
53 ----------------------
54 [![Build Status](https://travis-ci.org/evgeni/hdapsd.png?branch=master)](https://travis-ci.org/evgeni/hdapsd)