Systemd/src/login
Zbigniew Jędrzejewski-Szmek 2b0445262a tree-wide: add SD_ID128_MAKE_STR, remove LOG_MESSAGE_ID
Embedding sd_id128_t's in constant strings was rather cumbersome. We had
SD_ID128_CONST_STR which returned a const char[], but it had two problems:
- it wasn't possible to statically concatanate this array with a normal string
- gcc wasn't really able to optimize this, and generated code to perform the
  "conversion" at runtime.
Because of this, even our own code in coredumpctl wasn't using
SD_ID128_CONST_STR.

Add a new macro to generate a constant string: SD_ID128_MAKE_STR.
It is not as elegant as SD_ID128_CONST_STR, because it requires a repetition
of the numbers, but in practice it is more convenient to use, and allows gcc
to generate smarter code:

$ size .libs/systemd{,-logind,-journald}{.old,}
   text	   data	    bss	    dec	    hex	filename
1265204	 149564	   4808	1419576	 15a938	.libs/systemd.old
1260268	 149564	   4808	1414640	 1595f0	.libs/systemd
 246805	  13852	    209	 260866	  3fb02	.libs/systemd-logind.old
 240973	  13852	    209	 255034	  3e43a	.libs/systemd-logind
 146839	   4984	     34	 151857	  25131	.libs/systemd-journald.old
 146391	   4984	     34	 151409	  24f71	.libs/systemd-journald

It is also much easier to check if a certain binary uses a certain MESSAGE_ID:

$ strings .libs/systemd.old|grep MESSAGE_ID
MESSAGE_ID=%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x
MESSAGE_ID=%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x
MESSAGE_ID=%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x
MESSAGE_ID=%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x

$ strings .libs/systemd|grep MESSAGE_ID
MESSAGE_ID=c7a787079b354eaaa9e77b371893cd27
MESSAGE_ID=b07a249cd024414a82dd00cd181378ff
MESSAGE_ID=641257651c1b4ec9a8624d7a40a9e1e7
MESSAGE_ID=de5b426a63be47a7b6ac3eaac82e2f6f
MESSAGE_ID=d34d037fff1847e6ae669a370e694725
MESSAGE_ID=7d4958e842da4a758f6c1cdc7b36dcc5
MESSAGE_ID=1dee0369c7fc4736b7099b38ecb46ee7
MESSAGE_ID=39f53479d3a045ac8e11786248231fbf
MESSAGE_ID=be02cf6855d2428ba40df7e9d022f03d
MESSAGE_ID=7b05ebc668384222baa8881179cfda54
MESSAGE_ID=9d1aaa27d60140bd96365438aad20286
2017-02-15 00:45:12 -05:00
..
.gitignore build-sys: add --without-kill-user-processes configure option 2016-04-21 00:21:32 -04:00
70-power-switch.rules login: support more than just power-gpio-key 2015-09-22 16:18:17 +02:00
70-uaccess.rules Revert "rules: allow users to access frame buffer devices" (#3333) 2016-05-24 11:32:30 +02:00
71-seat.rules.in treewide: fix typos 2015-07-06 12:51:16 +02:00
73-seat-late.rules.in relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
inhibit.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
loginctl.c tree-wide: make bus_map_all_properties return a proper sd_bus_error 2017-02-09 16:13:07 +01:00
logind-acl.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
logind-acl.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
logind-action.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
logind-action.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
logind-button.c tree-wide: add SD_ID128_MAKE_STR, remove LOG_MESSAGE_ID 2017-02-15 00:45:12 -05:00
logind-button.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
logind-core.c treewide: fix typos 2016-07-04 17:10:23 +02:00
logind-dbus.c tree-wide: add SD_ID128_MAKE_STR, remove LOG_MESSAGE_ID 2017-02-15 00:45:12 -05:00
logind-device.c tree-wide: use mfree more 2016-10-16 23:35:39 -04:00
logind-device.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
logind-gperf.gperf logind: change TasksMax= value for user logins to 33% 2016-07-22 15:33:13 +02:00
logind-inhibit.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
logind-inhibit.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
logind-seat-dbus.c logind: don't include session lists in PropertyChanged messages 2016-05-05 22:50:09 +02:00
logind-seat.c tree-wide: add SD_ID128_MAKE_STR, remove LOG_MESSAGE_ID 2017-02-15 00:45:12 -05:00
logind-seat.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
logind-session-dbus.c logind: introduce LockedHint and SetLockedHint (#3238) 2016-05-11 19:34:13 +02:00
logind-session-device.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
logind-session-device.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
logind-session.c tree-wide: add SD_ID128_MAKE_STR, remove LOG_MESSAGE_ID 2017-02-15 00:45:12 -05:00
logind-session.h logind: introduce LockedHint and SetLockedHint (#3238) 2016-05-11 19:34:13 +02:00
logind-user-dbus.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
logind-user.c tree-wide: stop using canonicalize_file_name(), use chase_symlinks() instead 2016-12-01 00:25:51 +01:00
logind-user.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
logind-utmp.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
logind.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
logind.conf.in logind: change TasksMax= value for user logins to 33% 2016-07-22 15:33:13 +02:00
logind.h build-sys: add check for gperf lookup function signature (#5055) 2017-01-10 08:39:05 +01:00
Makefile logind: move logind into its own subdirectory 2011-12-31 03:16:08 +01:00
org.freedesktop.login1.conf logind: introduce LockedHint and SetLockedHint (#3238) 2016-05-11 19:34:13 +02:00
org.freedesktop.login1.policy.in login: Fix policy for org.freedesktop.login1.set-self-linger (#3365) (#3373) 2016-05-28 11:03:03 +02:00
org.freedesktop.login1.service relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
pam_systemd.c Rename formats-util.h to format-util.h 2016-11-07 10:15:08 -05:00
pam_systemd.sym pam_systemd: replace regex with sym file 2014-06-21 15:45:49 +02:00
sysfs-show.c tree-wide: rename draw_special_char to special_glyph 2016-05-09 15:17:57 -04:00
sysfs-show.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
systemd-user.m4 pam: include pam_keyinit.so in our PAM fragments 2016-12-13 20:59:36 +01:00
test-inhibit.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-login-shared.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-login-tables.c tree-wide: sort includes 2015-11-16 22:09:36 +01:00