mirror of
https://github.com/systemd/systemd.git
synced 2024-11-05 15:21:37 +03:00
cc3d85eb97
codesearch.debian.net shows no uses (except for the definition in systemd and elogind). $ cat > test.c int main() { sd_bus_try_close(NULL); return 0; } $ gcc -Isrc/systemd -Wall -o testbus test.c -lsystemd test.c: In function ‘main’: test.c:4:3: warning: ‘sd_bus_try_close’ is deprecated [-Wdeprecated-declarations] 4 | sd_bus_try_close(NULL); | ^~~~~~~~~~~~~~~~ In file included from test.c:1: src/systemd/sd-bus.h:180:5: note: declared here 180 | int sd_bus_try_close(sd_bus *bus) _sd_deprecated_; /* deprecated */ | ^~~~~~~~~~~~~~~~
34 lines
766 B
Bash
Executable File
34 lines
766 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
sd_good=0
|
|
sd_total=0
|
|
udev_good=0
|
|
udev_total=0
|
|
|
|
for symbol in `nm -g --defined-only "$@" | grep " T " | cut -d" " -f3 | grep -wv sd_bus_try_close | sort -u` ; do
|
|
if test -f ${MESON_BUILD_ROOT}/man/$symbol.3 ; then
|
|
echo "✓ Symbol $symbol() is documented."
|
|
good=1
|
|
else
|
|
printf " \x1b[1;31mSymbol $symbol() lacks documentation.\x1b[0m\n"
|
|
good=0
|
|
fi
|
|
|
|
case $symbol in
|
|
sd_*)
|
|
((sd_good+=good))
|
|
((sd_total+=1))
|
|
;;
|
|
udev_*)
|
|
((udev_good+=good))
|
|
((udev_total+=1))
|
|
;;
|
|
*)
|
|
echo 'unknown symbol prefix'
|
|
exit 1
|
|
esac
|
|
done
|
|
|
|
echo "libsystemd: $sd_good/$sd_total libudev: $udev_good/$udev_total"
|