Skip to content

Commit b3fd736

Browse files
paliJonathan Corbet
authored and
Jonathan Corbet
committed
Move freefall program from Documentation/ to tools/
Signed-off-by: Pali Rohár <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
1 parent a28ab16 commit b3fd736

File tree

6 files changed

+30
-6
lines changed

6 files changed

+30
-6
lines changed

Documentation/laptops/.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
dslm
2-
freefall

Documentation/laptops/00-INDEX

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ disk-shock-protection.txt
88
- information on hard disk shock protection.
99
dslm.c
1010
- Simple Disk Sleep Monitor program
11-
freefall.c
12-
- (HP/DELL) laptop accelerometer program for disk protection.
1311
laptop-mode.txt
1412
- how to conserve battery power using laptop-mode.
1513
sony-laptop.txt

Documentation/laptops/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# List of programs to build
2-
hostprogs-y := dslm freefall
2+
hostprogs-y := dslm
33

44
# Tell kbuild to always build the programs
55
always := $(hostprogs-y)

tools/Makefile

+12-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ help:
1818
@echo ' vm - misc vm tools'
1919
@echo ' x86_energy_perf_policy - Intel energy policy tool'
2020
@echo ' tmon - thermal monitoring and tuning tool'
21+
@echo ' freefall - laptop accelerometer program for disk protection'
2122
@echo ''
2223
@echo 'You can do:'
2324
@echo ' $$ make -C tools/ <tool>_install'
@@ -62,6 +63,9 @@ turbostat x86_energy_perf_policy: FORCE
6263
tmon: FORCE
6364
$(call descend,thermal/$@)
6465

66+
freefall: FORCE
67+
$(call descend,laptop/$@)
68+
6569
acpi_install:
6670
$(call descend,power/$(@:_install=),install)
6771

@@ -80,10 +84,13 @@ turbostat_install x86_energy_perf_policy_install:
8084
tmon_install:
8185
$(call descend,thermal/$(@:_install=),install)
8286

87+
freefall_install:
88+
$(call descend,laptop/$(@:_install=),install)
89+
8390
install: acpi_install cgroup_install cpupower_install hv_install firewire_install lguest_install \
8491
perf_install selftests_install turbostat_install usb_install \
8592
virtio_install vm_install net_install x86_energy_perf_policy_install \
86-
tmon
93+
tmon freefall_install
8794

8895
acpi_clean:
8996
$(call descend,power/acpi,clean)
@@ -112,8 +119,11 @@ turbostat_clean x86_energy_perf_policy_clean:
112119
tmon_clean:
113120
$(call descend,thermal/tmon,clean)
114121

122+
freefall_clean:
123+
$(call descend,laptop/freefall,clean)
124+
115125
clean: acpi_clean cgroup_clean cpupower_clean hv_clean firewire_clean lguest_clean \
116126
perf_clean selftests_clean turbostat_clean usb_clean virtio_clean \
117-
vm_clean net_clean x86_energy_perf_policy_clean tmon_clean
127+
vm_clean net_clean x86_energy_perf_policy_clean tmon_clean freefall_clean
118128

119129
.PHONY: FORCE

tools/laptop/freefall/Makefile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
PREFIX ?= /usr
2+
SBINDIR ?= sbin
3+
INSTALL ?= install
4+
CC = $(CROSS_COMPILE)gcc
5+
6+
TARGET = freefall
7+
8+
all: $(TARGET)
9+
10+
%: %.c
11+
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $<
12+
13+
clean:
14+
$(RM) $(TARGET)
15+
16+
install: freefall
17+
$(INSTALL) -D -m 755 $(TARGET) $(DESTDIR)$(PREFIX)/$(SBINDIR)/$(TARGET)
File renamed without changes.

0 commit comments

Comments
 (0)