mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 11:55:44 +03:00
readahead: bring export definition of sd-readahead in line with sd-daemon
This commit is contained in:
parent
4cfc6dbe52
commit
4f3656e1ce
@ -37,6 +37,18 @@
|
|||||||
|
|
||||||
#include "sd-readahead.h"
|
#include "sd-readahead.h"
|
||||||
|
|
||||||
|
#if (__GNUC__ >= 4)
|
||||||
|
#ifdef SD_EXPORT_SYMBOLS
|
||||||
|
/* Export symbols */
|
||||||
|
#define _sd_export_ __attribute__ ((visibility("default")))
|
||||||
|
#else
|
||||||
|
/* Don't export the symbols */
|
||||||
|
#define _sd_export_ __attribute__ ((visibility("hidden")))
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#define _sd_export_
|
||||||
|
#endif
|
||||||
|
|
||||||
static int touch(const char *path) {
|
static int touch(const char *path) {
|
||||||
|
|
||||||
#if !defined(DISABLE_SYSTEMD) && defined(__linux__)
|
#if !defined(DISABLE_SYSTEMD) && defined(__linux__)
|
||||||
@ -60,7 +72,7 @@ static int touch(const char *path) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sd_readahead(const char *action) {
|
_sd_export_ int sd_readahead(const char *action) {
|
||||||
|
|
||||||
if (!action)
|
if (!action)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -56,14 +56,6 @@ extern "C" {
|
|||||||
See sd-readahead(7) for more information.
|
See sd-readahead(7) for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _sd_hidden_
|
|
||||||
#if (__GNUC__ >= 4) && !defined(SD_EXPORT_SYMBOLS)
|
|
||||||
#define _sd_hidden_ __attribute__ ((visibility("hidden")))
|
|
||||||
#else
|
|
||||||
#define _sd_hidden_
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Controls ongoing disk read-ahead operations during boot-up. The argument
|
Controls ongoing disk read-ahead operations during boot-up. The argument
|
||||||
must be a string, and either "cancel", "done" or "noreplay".
|
must be a string, and either "cancel", "done" or "noreplay".
|
||||||
@ -72,7 +64,7 @@ extern "C" {
|
|||||||
done = terminate read-ahead data collection, keep collected information
|
done = terminate read-ahead data collection, keep collected information
|
||||||
noreplay = terminate read-ahead replay
|
noreplay = terminate read-ahead replay
|
||||||
*/
|
*/
|
||||||
int sd_readahead(const char *action) _sd_hidden_;
|
int sd_readahead(const char *action);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user