diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2018-09-13 13:00:55 -0700 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2018-09-19 22:46:45 -0700 |
commit | 6229895cc5c99070db17c7e5413e6bf33fc7f618 (patch) | |
tree | 9abf071b4e579aedda35af7487348551d927dc22 | |
parent | 36bb0ea47b71d220b31e55717228032fb69b4dee (diff) | |
download | libdrm-6229895cc5c99070db17c7e5413e6bf33fc7f618.tar.gz libdrm-6229895cc5c99070db17c7e5413e6bf33fc7f618.tar.bz2 libdrm-6229895cc5c99070db17c7e5413e6bf33fc7f618.zip |
libkms: annotate public functions
This was done with:
nm --dynamic --defined-only build/libkms/libkms.so | \
grep kms_ | \
cut -d' ' -f3 > /tmp/a.txt
while read sym; do
read f func line _ <<<$(cscope -d -L -1 $sym)
if [ ! -z "$f" ]; then
sed -i "${line}s/^/drm_public /" $f
fi
done < /tmp/a.txt
The idea here will be to switch the default visibility to hidden so we
don't export symbols we shouldn't.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Acked-by: Eric Engestrom <eric.engestrom@intel.com>
-rw-r--r-- | libkms/api.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libkms/api.c b/libkms/api.c index 22dd32d7..caca1a87 100644 --- a/libkms/api.c +++ b/libkms/api.c @@ -33,12 +33,12 @@ #include "libdrm_macros.h" #include "internal.h" -int kms_create(int fd, struct kms_driver **out) +drm_public int kms_create(int fd, struct kms_driver **out) { return linux_create(fd, out); } -int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) +drm_public int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) { switch (key) { case KMS_BO_TYPE: @@ -49,7 +49,7 @@ int kms_get_prop(struct kms_driver *kms, unsigned key, unsigned *out) return kms->get_prop(kms, key, out); } -int kms_destroy(struct kms_driver **kms) +drm_public int kms_destroy(struct kms_driver **kms) { if (!(*kms)) return 0; @@ -59,7 +59,7 @@ int kms_destroy(struct kms_driver **kms) return 0; } -int kms_bo_create(struct kms_driver *kms, const unsigned *attr, struct kms_bo **out) +drm_public int kms_bo_create(struct kms_driver *kms, const unsigned *attr, struct kms_bo **out) { unsigned width = 0; unsigned height = 0; @@ -97,7 +97,7 @@ int kms_bo_create(struct kms_driver *kms, const unsigned *attr, struct kms_bo ** return kms->bo_create(kms, width, height, type, attr, out); } -int kms_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) +drm_public int kms_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) { switch (key) { case KMS_PITCH: @@ -113,17 +113,17 @@ int kms_bo_get_prop(struct kms_bo *bo, unsigned key, unsigned *out) return 0; } -int kms_bo_map(struct kms_bo *bo, void **out) +drm_public int kms_bo_map(struct kms_bo *bo, void **out) { return bo->kms->bo_map(bo, out); } -int kms_bo_unmap(struct kms_bo *bo) +drm_public int kms_bo_unmap(struct kms_bo *bo) { return bo->kms->bo_unmap(bo); } -int kms_bo_destroy(struct kms_bo **bo) +drm_public int kms_bo_destroy(struct kms_bo **bo) { int ret; |