From 155301b7434420db33b3fb27fd8183cd56b68227 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Mon, 24 Jan 2022 19:46:54 +0000 Subject: [PATCH] core-smart.h: more SMART helper definitions to core-smart.h from stress-ng.h Signed-off-by: Colin Ian King --- Makefile | 5 +++-- core-smart.h | 26 ++++++++++++++++++++++++++ stress-ng.c | 3 ++- stress-ng.h | 4 ---- 4 files changed, 31 insertions(+), 7 deletions(-) create mode 100644 core-smart.h diff --git a/Makefile b/Makefile index 206ebbdab..3217f1e32 100644 --- a/Makefile +++ b/Makefile @@ -407,7 +407,8 @@ OBJS += $(CONFIG_OBJS) .o: Makefile %.o: %.c stress-ng.h config.h git-commit-id.h core-capabilities.h core-put.h \ - core-target-clones.h core-pragma.h core-perf.h core-thermal-zone.h + core-target-clones.h core-pragma.h core-perf.h core-thermal-zone.h \ + core-smart.h $(Q)echo "CC $<" $(V)$(CC) $(CFLAGS) -c -o $@ $< @@ -493,7 +494,7 @@ dist: mkdir stress-ng-$(VERSION) cp -rp Makefile Makefile.config $(SRC) stress-ng.h stress-ng.1 \ core-capabilities.h core-put.h core-target-clones.h \ - core-pragma.h core-perf.h core-thermal-zone.h \ + core-pragma.h core-perf.h core-thermal-zone.h core-smart.h \ core-personality.c core-io-uring.c \ COPYING syscalls.txt mascot README.md \ stress-af-alg-defconfigs.h README.Android test snap \ diff --git a/core-smart.h b/core-smart.h new file mode 100644 index 000000000..69f745cb7 --- /dev/null +++ b/core-smart.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2022 Colin Ian King + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ +#ifndef CORE_SMART_H +#define CORE_SMART_H + +/* S.M.A.R.T. helpers */ +extern void stress_smart_start(void); +extern void stress_smart_stop(void); + +#endif diff --git a/stress-ng.c b/stress-ng.c index e257086f8..0c3d7a309 100644 --- a/stress-ng.c +++ b/stress-ng.c @@ -18,8 +18,9 @@ * */ #include "stress-ng.h" -#include "core-perf.h" #include "core-hash.h" +#include "core-perf.h" +#include "core-smart.h" #include "core-thermal-zone.h" typedef struct { diff --git a/stress-ng.h b/stress-ng.h index 2ea8f7f00..192d15db3 100644 --- a/stress-ng.h +++ b/stress-ng.h @@ -3649,10 +3649,6 @@ extern WARN_UNUSED bool stress_redo_fork(const int err); extern void stress_sighandler_nop(int sig); extern int stress_killpid(const pid_t pid); -/* S.M.A.R.T. helpers */ -extern void stress_smart_start(void); -extern void stress_smart_stop(void); - /* ftrace helpers */ extern int stress_ftrace_start(void); extern void stress_ftrace_stop(void);