diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/bench/mem-memcpy.c | 4 | ||||
-rw-r--r-- | tools/perf/config/Makefile.arch | 4 | ||||
-rw-r--r-- | tools/perf/config/feature-checks/Makefile | 2 | ||||
-rw-r--r-- | tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c | 3 | ||||
-rw-r--r-- | tools/perf/util/cloexec.c | 18 | ||||
-rw-r--r-- | tools/perf/util/evlist.h | 2 | ||||
-rw-r--r-- | tools/perf/util/symbol-elf.c | 5 | ||||
-rw-r--r-- | tools/thermal/tmon/.gitignore | 1 | ||||
-rw-r--r-- | tools/thermal/tmon/Makefile | 15 | ||||
-rw-r--r-- | tools/thermal/tmon/tmon.8 | 2 | ||||
-rw-r--r-- | tools/thermal/tmon/tmon.c | 14 | ||||
-rw-r--r-- | tools/thermal/tmon/tui.c | 45 |
12 files changed, 93 insertions, 22 deletions
diff --git a/tools/perf/bench/mem-memcpy.c b/tools/perf/bench/mem-memcpy.c index eca3d0e49582..d3dfb7936dcd 100644 --- a/tools/perf/bench/mem-memcpy.c +++ b/tools/perf/bench/mem-memcpy.c | |||
@@ -293,7 +293,7 @@ static u64 do_memcpy_cycle(const struct routine *r, size_t len, bool prefault) | |||
293 | memcpy_t fn = r->fn.memcpy; | 293 | memcpy_t fn = r->fn.memcpy; |
294 | int i; | 294 | int i; |
295 | 295 | ||
296 | memcpy_alloc_mem(&src, &dst, len); | 296 | memcpy_alloc_mem(&dst, &src, len); |
297 | 297 | ||
298 | if (prefault) | 298 | if (prefault) |
299 | fn(dst, src, len); | 299 | fn(dst, src, len); |
@@ -316,7 +316,7 @@ static double do_memcpy_gettimeofday(const struct routine *r, size_t len, | |||
316 | void *src = NULL, *dst = NULL; | 316 | void *src = NULL, *dst = NULL; |
317 | int i; | 317 | int i; |
318 | 318 | ||
319 | memcpy_alloc_mem(&src, &dst, len); | 319 | memcpy_alloc_mem(&dst, &src, len); |
320 | 320 | ||
321 | if (prefault) | 321 | if (prefault) |
322 | fn(dst, src, len); | 322 | fn(dst, src, len); |
diff --git a/tools/perf/config/Makefile.arch b/tools/perf/config/Makefile.arch index ff95a68741d1..ac8721ffa6c8 100644 --- a/tools/perf/config/Makefile.arch +++ b/tools/perf/config/Makefile.arch | |||
@@ -21,6 +21,10 @@ ifeq ($(RAW_ARCH),x86_64) | |||
21 | endif | 21 | endif |
22 | endif | 22 | endif |
23 | 23 | ||
24 | ifeq ($(RAW_ARCH),sparc64) | ||
25 | ARCH ?= sparc | ||
26 | endif | ||
27 | |||
24 | ARCH ?= $(RAW_ARCH) | 28 | ARCH ?= $(RAW_ARCH) |
25 | 29 | ||
26 | LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1) | 30 | LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1) |
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile index 42ac05aaf8ac..b32ff3372514 100644 --- a/tools/perf/config/feature-checks/Makefile +++ b/tools/perf/config/feature-checks/Makefile | |||
@@ -49,7 +49,7 @@ test-hello.bin: | |||
49 | $(BUILD) | 49 | $(BUILD) |
50 | 50 | ||
51 | test-pthread-attr-setaffinity-np.bin: | 51 | test-pthread-attr-setaffinity-np.bin: |
52 | $(BUILD) -Werror -lpthread | 52 | $(BUILD) -D_GNU_SOURCE -Werror -lpthread |
53 | 53 | ||
54 | test-stackprotector-all.bin: | 54 | test-stackprotector-all.bin: |
55 | $(BUILD) -Werror -fstack-protector-all | 55 | $(BUILD) -Werror -fstack-protector-all |
diff --git a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c index 0a0d3ecb4e8a..2b81b72eca23 100644 --- a/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c +++ b/tools/perf/config/feature-checks/test-pthread-attr-setaffinity-np.c | |||
@@ -5,10 +5,11 @@ int main(void) | |||
5 | { | 5 | { |
6 | int ret = 0; | 6 | int ret = 0; |
7 | pthread_attr_t thread_attr; | 7 | pthread_attr_t thread_attr; |
8 | cpu_set_t cs; | ||
8 | 9 | ||
9 | pthread_attr_init(&thread_attr); | 10 | pthread_attr_init(&thread_attr); |
10 | /* don't care abt exact args, just the API itself in libpthread */ | 11 | /* don't care abt exact args, just the API itself in libpthread */ |
11 | ret = pthread_attr_setaffinity_np(&thread_attr, 0, NULL); | 12 | ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cs), &cs); |
12 | 13 | ||
13 | return ret; | 14 | return ret; |
14 | } | 15 | } |
diff --git a/tools/perf/util/cloexec.c b/tools/perf/util/cloexec.c index 47b78b3f0325..6da965bdbc2c 100644 --- a/tools/perf/util/cloexec.c +++ b/tools/perf/util/cloexec.c | |||
@@ -25,6 +25,10 @@ static int perf_flag_probe(void) | |||
25 | if (cpu < 0) | 25 | if (cpu < 0) |
26 | cpu = 0; | 26 | cpu = 0; |
27 | 27 | ||
28 | /* | ||
29 | * Using -1 for the pid is a workaround to avoid gratuitous jump label | ||
30 | * changes. | ||
31 | */ | ||
28 | while (1) { | 32 | while (1) { |
29 | /* check cloexec flag */ | 33 | /* check cloexec flag */ |
30 | fd = sys_perf_event_open(&attr, pid, cpu, -1, | 34 | fd = sys_perf_event_open(&attr, pid, cpu, -1, |
@@ -47,16 +51,24 @@ static int perf_flag_probe(void) | |||
47 | err, strerror_r(err, sbuf, sizeof(sbuf))); | 51 | err, strerror_r(err, sbuf, sizeof(sbuf))); |
48 | 52 | ||
49 | /* not supported, confirm error related to PERF_FLAG_FD_CLOEXEC */ | 53 | /* not supported, confirm error related to PERF_FLAG_FD_CLOEXEC */ |
50 | fd = sys_perf_event_open(&attr, pid, cpu, -1, 0); | 54 | while (1) { |
55 | fd = sys_perf_event_open(&attr, pid, cpu, -1, 0); | ||
56 | if (fd < 0 && pid == -1 && errno == EACCES) { | ||
57 | pid = 0; | ||
58 | continue; | ||
59 | } | ||
60 | break; | ||
61 | } | ||
51 | err = errno; | 62 | err = errno; |
52 | 63 | ||
64 | if (fd >= 0) | ||
65 | close(fd); | ||
66 | |||
53 | if (WARN_ONCE(fd < 0 && err != EBUSY, | 67 | if (WARN_ONCE(fd < 0 && err != EBUSY, |
54 | "perf_event_open(..., 0) failed unexpectedly with error %d (%s)\n", | 68 | "perf_event_open(..., 0) failed unexpectedly with error %d (%s)\n", |
55 | err, strerror_r(err, sbuf, sizeof(sbuf)))) | 69 | err, strerror_r(err, sbuf, sizeof(sbuf)))) |
56 | return -1; | 70 | return -1; |
57 | 71 | ||
58 | close(fd); | ||
59 | |||
60 | return 0; | 72 | return 0; |
61 | } | 73 | } |
62 | 74 | ||
diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index c94a9e03ecf1..e99a67632831 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h | |||
@@ -28,7 +28,7 @@ struct perf_mmap { | |||
28 | int mask; | 28 | int mask; |
29 | int refcnt; | 29 | int refcnt; |
30 | unsigned int prev; | 30 | unsigned int prev; |
31 | char event_copy[PERF_SAMPLE_MAX_SIZE]; | 31 | char event_copy[PERF_SAMPLE_MAX_SIZE] __attribute__((aligned(8))); |
32 | }; | 32 | }; |
33 | 33 | ||
34 | struct perf_evlist { | 34 | struct perf_evlist { |
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c index b24f9d8727a8..33b7a2aef713 100644 --- a/tools/perf/util/symbol-elf.c +++ b/tools/perf/util/symbol-elf.c | |||
@@ -11,6 +11,11 @@ | |||
11 | #include <symbol/kallsyms.h> | 11 | #include <symbol/kallsyms.h> |
12 | #include "debug.h" | 12 | #include "debug.h" |
13 | 13 | ||
14 | #ifndef EM_AARCH64 | ||
15 | #define EM_AARCH64 183 /* ARM 64 bit */ | ||
16 | #endif | ||
17 | |||
18 | |||
14 | #ifdef HAVE_CPLUS_DEMANGLE_SUPPORT | 19 | #ifdef HAVE_CPLUS_DEMANGLE_SUPPORT |
15 | extern char *cplus_demangle(const char *, int); | 20 | extern char *cplus_demangle(const char *, int); |
16 | 21 | ||
diff --git a/tools/thermal/tmon/.gitignore b/tools/thermal/tmon/.gitignore new file mode 100644 index 000000000000..06e96be65276 --- /dev/null +++ b/tools/thermal/tmon/.gitignore | |||
@@ -0,0 +1 @@ | |||
/tmon | |||
diff --git a/tools/thermal/tmon/Makefile b/tools/thermal/tmon/Makefile index e775adcbd29f..0788621c8d76 100644 --- a/tools/thermal/tmon/Makefile +++ b/tools/thermal/tmon/Makefile | |||
@@ -2,8 +2,8 @@ VERSION = 1.0 | |||
2 | 2 | ||
3 | BINDIR=usr/bin | 3 | BINDIR=usr/bin |
4 | WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int | 4 | WARNFLAGS=-Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int |
5 | CFLAGS= -O1 ${WARNFLAGS} -fstack-protector | 5 | CFLAGS+= -O1 ${WARNFLAGS} -fstack-protector |
6 | CC=gcc | 6 | CC=$(CROSS_COMPILE)gcc |
7 | 7 | ||
8 | CFLAGS+=-D VERSION=\"$(VERSION)\" | 8 | CFLAGS+=-D VERSION=\"$(VERSION)\" |
9 | LDFLAGS+= | 9 | LDFLAGS+= |
@@ -16,12 +16,21 @@ INSTALL_CONFIGFILE=install -m 644 -p | |||
16 | CONFIG_FILE= | 16 | CONFIG_FILE= |
17 | CONFIG_PATH= | 17 | CONFIG_PATH= |
18 | 18 | ||
19 | # Static builds might require -ltinfo, for instance | ||
20 | ifneq ($(findstring -static, $(LDFLAGS)),) | ||
21 | STATIC := --static | ||
22 | endif | ||
23 | |||
24 | TMON_LIBS=-lm -lpthread | ||
25 | TMON_LIBS += $(shell pkg-config --libs $(STATIC) panelw ncursesw 2> /dev/null || \ | ||
26 | pkg-config --libs $(STATIC) panel ncurses 2> /dev/null || \ | ||
27 | echo -lpanel -lncurses) | ||
19 | 28 | ||
20 | OBJS = tmon.o tui.o sysfs.o pid.o | 29 | OBJS = tmon.o tui.o sysfs.o pid.o |
21 | OBJS += | 30 | OBJS += |
22 | 31 | ||
23 | tmon: $(OBJS) Makefile tmon.h | 32 | tmon: $(OBJS) Makefile tmon.h |
24 | $(CC) ${CFLAGS} $(LDFLAGS) $(OBJS) -o $(TARGET) -lm -lpanel -lncursesw -ltinfo -lpthread | 33 | $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) -o $(TARGET) $(TMON_LIBS) |
25 | 34 | ||
26 | valgrind: tmon | 35 | valgrind: tmon |
27 | sudo valgrind -v --track-origins=yes --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./$(TARGET) 1> /dev/null | 36 | sudo valgrind -v --track-origins=yes --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes ./$(TARGET) 1> /dev/null |
diff --git a/tools/thermal/tmon/tmon.8 b/tools/thermal/tmon/tmon.8 index 0be727cb9892..02d5179803aa 100644 --- a/tools/thermal/tmon/tmon.8 +++ b/tools/thermal/tmon/tmon.8 | |||
@@ -55,6 +55,8 @@ The \fB-l --log\fP option write data to /var/tmp/tmon.log | |||
55 | .PP | 55 | .PP |
56 | The \fB-t --time-interval\fP option sets the polling interval in seconds | 56 | The \fB-t --time-interval\fP option sets the polling interval in seconds |
57 | .PP | 57 | .PP |
58 | The \fB-T --target-temp\fP option sets the initial target temperature | ||
59 | .PP | ||
58 | The \fB-v --version\fP option shows the version of \fBtmon \fP | 60 | The \fB-v --version\fP option shows the version of \fBtmon \fP |
59 | .PP | 61 | .PP |
60 | The \fB-z --zone\fP option sets the target therma zone instance to be controlled | 62 | The \fB-z --zone\fP option sets the target therma zone instance to be controlled |
diff --git a/tools/thermal/tmon/tmon.c b/tools/thermal/tmon/tmon.c index 09b7c3218334..9aa19652e8e8 100644 --- a/tools/thermal/tmon/tmon.c +++ b/tools/thermal/tmon/tmon.c | |||
@@ -64,6 +64,7 @@ void usage() | |||
64 | printf(" -h, --help show this help message\n"); | 64 | printf(" -h, --help show this help message\n"); |
65 | printf(" -l, --log log data to /var/tmp/tmon.log\n"); | 65 | printf(" -l, --log log data to /var/tmp/tmon.log\n"); |
66 | printf(" -t, --time-interval sampling time interval, > 1 sec.\n"); | 66 | printf(" -t, --time-interval sampling time interval, > 1 sec.\n"); |
67 | printf(" -T, --target-temp initial target temperature\n"); | ||
67 | printf(" -v, --version show version\n"); | 68 | printf(" -v, --version show version\n"); |
68 | printf(" -z, --zone target thermal zone id\n"); | 69 | printf(" -z, --zone target thermal zone id\n"); |
69 | 70 | ||
@@ -219,6 +220,7 @@ static struct option opts[] = { | |||
219 | { "control", 1, NULL, 'c' }, | 220 | { "control", 1, NULL, 'c' }, |
220 | { "daemon", 0, NULL, 'd' }, | 221 | { "daemon", 0, NULL, 'd' }, |
221 | { "time-interval", 1, NULL, 't' }, | 222 | { "time-interval", 1, NULL, 't' }, |
223 | { "target-temp", 1, NULL, 'T' }, | ||
222 | { "log", 0, NULL, 'l' }, | 224 | { "log", 0, NULL, 'l' }, |
223 | { "help", 0, NULL, 'h' }, | 225 | { "help", 0, NULL, 'h' }, |
224 | { "version", 0, NULL, 'v' }, | 226 | { "version", 0, NULL, 'v' }, |
@@ -231,7 +233,7 @@ int main(int argc, char **argv) | |||
231 | { | 233 | { |
232 | int err = 0; | 234 | int err = 0; |
233 | int id2 = 0, c; | 235 | int id2 = 0, c; |
234 | double yk = 0.0; /* controller output */ | 236 | double yk = 0.0, temp; /* controller output */ |
235 | int target_tz_index; | 237 | int target_tz_index; |
236 | 238 | ||
237 | if (geteuid() != 0) { | 239 | if (geteuid() != 0) { |
@@ -239,7 +241,7 @@ int main(int argc, char **argv) | |||
239 | exit(EXIT_FAILURE); | 241 | exit(EXIT_FAILURE); |
240 | } | 242 | } |
241 | 243 | ||
242 | while ((c = getopt_long(argc, argv, "c:dlht:vgz:", opts, &id2)) != -1) { | 244 | while ((c = getopt_long(argc, argv, "c:dlht:T:vgz:", opts, &id2)) != -1) { |
243 | switch (c) { | 245 | switch (c) { |
244 | case 'c': | 246 | case 'c': |
245 | no_control = 0; | 247 | no_control = 0; |
@@ -254,6 +256,14 @@ int main(int argc, char **argv) | |||
254 | if (ticktime < 1) | 256 | if (ticktime < 1) |
255 | ticktime = 1; | 257 | ticktime = 1; |
256 | break; | 258 | break; |
259 | case 'T': | ||
260 | temp = strtod(optarg, NULL); | ||
261 | if (temp < 0) { | ||
262 | fprintf(stderr, "error: temperature must be positive\n"); | ||
263 | return 1; | ||
264 | } | ||
265 | target_temp_user = temp; | ||
266 | break; | ||
257 | case 'l': | 267 | case 'l': |
258 | printf("Logging data to /var/tmp/tmon.log\n"); | 268 | printf("Logging data to /var/tmp/tmon.log\n"); |
259 | logging = 1; | 269 | logging = 1; |
diff --git a/tools/thermal/tmon/tui.c b/tools/thermal/tmon/tui.c index 89f8ef0e15c8..b5d1c6b22dd3 100644 --- a/tools/thermal/tmon/tui.c +++ b/tools/thermal/tmon/tui.c | |||
@@ -30,6 +30,18 @@ | |||
30 | 30 | ||
31 | #include "tmon.h" | 31 | #include "tmon.h" |
32 | 32 | ||
33 | #define min(x, y) ({ \ | ||
34 | typeof(x) _min1 = (x); \ | ||
35 | typeof(y) _min2 = (y); \ | ||
36 | (void) (&_min1 == &_min2); \ | ||
37 | _min1 < _min2 ? _min1 : _min2; }) | ||
38 | |||
39 | #define max(x, y) ({ \ | ||
40 | typeof(x) _max1 = (x); \ | ||
41 | typeof(y) _max2 = (y); \ | ||
42 | (void) (&_max1 == &_max2); \ | ||
43 | _max1 > _max2 ? _max1 : _max2; }) | ||
44 | |||
33 | static PANEL *data_panel; | 45 | static PANEL *data_panel; |
34 | static PANEL *dialogue_panel; | 46 | static PANEL *dialogue_panel; |
35 | static PANEL *top; | 47 | static PANEL *top; |
@@ -98,6 +110,18 @@ void write_status_bar(int x, char *line) | |||
98 | wrefresh(status_bar_window); | 110 | wrefresh(status_bar_window); |
99 | } | 111 | } |
100 | 112 | ||
113 | /* wrap at 5 */ | ||
114 | #define DIAG_DEV_ROWS 5 | ||
115 | /* | ||
116 | * list cooling devices + "set temp" entry; wraps after 5 rows, if they fit | ||
117 | */ | ||
118 | static int diag_dev_rows(void) | ||
119 | { | ||
120 | int entries = ptdata.nr_cooling_dev + 1; | ||
121 | int rows = max(DIAG_DEV_ROWS, (entries + 1) / 2); | ||
122 | return min(rows, entries); | ||
123 | } | ||
124 | |||
101 | void setup_windows(void) | 125 | void setup_windows(void) |
102 | { | 126 | { |
103 | int y_begin = 1; | 127 | int y_begin = 1; |
@@ -122,7 +146,7 @@ void setup_windows(void) | |||
122 | * dialogue window is a pop-up, when needed it lays on top of cdev win | 146 | * dialogue window is a pop-up, when needed it lays on top of cdev win |
123 | */ | 147 | */ |
124 | 148 | ||
125 | dialogue_window = subwin(stdscr, ptdata.nr_cooling_dev+5, maxx-50, | 149 | dialogue_window = subwin(stdscr, diag_dev_rows() + 5, maxx-50, |
126 | DIAG_Y, DIAG_X); | 150 | DIAG_Y, DIAG_X); |
127 | 151 | ||
128 | thermal_data_window = subwin(stdscr, ptdata.nr_tz_sensor * | 152 | thermal_data_window = subwin(stdscr, ptdata.nr_tz_sensor * |
@@ -258,21 +282,26 @@ void show_cooling_device(void) | |||
258 | } | 282 | } |
259 | 283 | ||
260 | const char DIAG_TITLE[] = "[ TUNABLES ]"; | 284 | const char DIAG_TITLE[] = "[ TUNABLES ]"; |
261 | #define DIAG_DEV_ROWS 5 | ||
262 | void show_dialogue(void) | 285 | void show_dialogue(void) |
263 | { | 286 | { |
264 | int j, x = 0, y = 0; | 287 | int j, x = 0, y = 0; |
288 | int rows, cols; | ||
265 | WINDOW *w = dialogue_window; | 289 | WINDOW *w = dialogue_window; |
266 | 290 | ||
267 | if (tui_disabled || !w) | 291 | if (tui_disabled || !w) |
268 | return; | 292 | return; |
269 | 293 | ||
294 | getmaxyx(w, rows, cols); | ||
295 | |||
296 | /* Silence compiler 'unused' warnings */ | ||
297 | (void)cols; | ||
298 | |||
270 | werase(w); | 299 | werase(w); |
271 | box(w, 0, 0); | 300 | box(w, 0, 0); |
272 | mvwprintw(w, 0, maxx/4, DIAG_TITLE); | 301 | mvwprintw(w, 0, maxx/4, DIAG_TITLE); |
273 | /* list all the available tunables */ | 302 | /* list all the available tunables */ |
274 | for (j = 0; j <= ptdata.nr_cooling_dev; j++) { | 303 | for (j = 0; j <= ptdata.nr_cooling_dev; j++) { |
275 | y = j % DIAG_DEV_ROWS; | 304 | y = j % diag_dev_rows(); |
276 | if (y == 0 && j != 0) | 305 | if (y == 0 && j != 0) |
277 | x += 20; | 306 | x += 20; |
278 | if (j == ptdata.nr_cooling_dev) | 307 | if (j == ptdata.nr_cooling_dev) |
@@ -283,12 +312,10 @@ void show_dialogue(void) | |||
283 | ptdata.cdi[j].type, ptdata.cdi[j].instance); | 312 | ptdata.cdi[j].type, ptdata.cdi[j].instance); |
284 | } | 313 | } |
285 | wattron(w, A_BOLD); | 314 | wattron(w, A_BOLD); |
286 | mvwprintw(w, DIAG_DEV_ROWS+1, 1, "Enter Choice [A-Z]?"); | 315 | mvwprintw(w, diag_dev_rows()+1, 1, "Enter Choice [A-Z]?"); |
287 | wattroff(w, A_BOLD); | 316 | wattroff(w, A_BOLD); |
288 | /* y size of dialogue win is nr cdev + 5, so print legend | 317 | /* print legend at the bottom line */ |
289 | * at the bottom line | 318 | mvwprintw(w, rows - 2, 1, |
290 | */ | ||
291 | mvwprintw(w, ptdata.nr_cooling_dev+3, 1, | ||
292 | "Legend: A=Active, P=Passive, C=Critical"); | 319 | "Legend: A=Active, P=Passive, C=Critical"); |
293 | 320 | ||
294 | wrefresh(dialogue_window); | 321 | wrefresh(dialogue_window); |
@@ -437,7 +464,7 @@ static void handle_input_choice(int ch) | |||
437 | snprintf(buf, sizeof(buf), "New Value for %.10s-%2d: ", | 464 | snprintf(buf, sizeof(buf), "New Value for %.10s-%2d: ", |
438 | ptdata.cdi[cdev_id].type, | 465 | ptdata.cdi[cdev_id].type, |
439 | ptdata.cdi[cdev_id].instance); | 466 | ptdata.cdi[cdev_id].instance); |
440 | write_dialogue_win(buf, DIAG_DEV_ROWS+2, 2); | 467 | write_dialogue_win(buf, diag_dev_rows() + 2, 2); |
441 | handle_input_val(cdev_id); | 468 | handle_input_val(cdev_id); |
442 | } else { | 469 | } else { |
443 | snprintf(buf, sizeof(buf), "Invalid selection %d", ch); | 470 | snprintf(buf, sizeof(buf), "Invalid selection %d", ch); |