-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This fixes our sparse warning: tst_tmpdir.c:347:6: warning: Symbol 'tst_purge_dir' has no prototype or library ('tst_') prefix. Should it be static? Header needs to be added also to include/tst_test.h (for tests which use tst_purge_dir, e.g. creat08.c). Link: https://lore.kernel.org/ltp/[email protected]/ Suggested-by: Cyril Hrubis <[email protected]> Reviewed-by: Cyril Hrubis <[email protected]> Reviewed-by: Li Wang <[email protected]> Reviewed-by: Avinesh Kumar <[email protected]> Signed-off-by: Petr Vorel <[email protected]>
- Loading branch information
Showing
4 changed files
with
22 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
/* | ||
* Copyright (c) 2016-2019 Cyril Hrubis <[email protected]> | ||
* Copyright (c) Linux Test Project, 2019-2024 | ||
*/ | ||
|
||
#ifndef TST_DEVICE_H__ | ||
|
@@ -101,11 +102,6 @@ int tst_dev_sync(int fd); | |
*/ | ||
unsigned long tst_dev_bytes_written(const char *dev); | ||
|
||
/* | ||
* Wipe the contents of given directory but keep the directory itself | ||
*/ | ||
void tst_purge_dir(const char *path); | ||
|
||
/* | ||
* Find the file or path belongs to which block dev | ||
* @path Path to find the backing dev | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
/* | ||
* Copyright (c) 2017 Cyril Hrubis <[email protected]> | ||
* Copyright (c) 2020 Martin Doucha <[email protected]> | ||
*/ | ||
|
||
#ifndef TST_TMPDIR_H__ | ||
#define TST_TMPDIR_H__ | ||
|
||
/** | ||
* tst_purge_dir - Wipe the content of given directory. | ||
* | ||
* Wipe the content of given directory but keep the directory itself. | ||
* | ||
* @path: Path of the directory to be wiped. | ||
*/ | ||
void tst_purge_dir(const char *path); | ||
|
||
#endif /* TST_TMPDIR_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters