chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sd-rtnl: add sd_rtnl_message_route_get_family
[elogind.git]
/
src
/
getty-generator
/
getty-generator.c
diff --git
a/src/getty-generator/getty-generator.c
b/src/getty-generator/getty-generator.c
index 7d4b546f72751af2508832c445f091387ddedf8b..931651e16187a22b0ce228aa7b8160b60f91a231 100644
(file)
--- a/
src/getty-generator/getty-generator.c
+++ b/
src/getty-generator/getty-generator.c
@@
-42,7
+42,7
@@
static int add_symlink(const char *fservice, const char *tservice) {
assert(tservice);
from = strappenda(SYSTEM_DATA_UNIT_PATH "/", fservice);
assert(tservice);
from = strappenda(SYSTEM_DATA_UNIT_PATH "/", fservice);
- to = strappenda
3
(arg_dest, "/getty.target.wants/", tservice);
+ to = strappenda(arg_dest, "/getty.target.wants/", tservice);
mkdir_parents_label(to, 0755);
mkdir_parents_label(to, 0755);
@@
-52,7
+52,7
@@
static int add_symlink(const char *fservice, const char *tservice) {
/* In case console=hvc0 is passed this will very likely result in EEXIST */
return 0;
else {
/* In case console=hvc0 is passed this will very likely result in EEXIST */
return 0;
else {
- log_error
(
"Failed to create symlink %s: %m", to);
+ log_error
_errno(errno,
"Failed to create symlink %s: %m", to);
return -errno;
}
}
return -errno;
}
}
@@
-154,14
+154,14
@@
int main(int argc, char *argv[]) {
r = getenv_for_pid(1, "container_ttys", &container_ttys);
if (r > 0) {
r = getenv_for_pid(1, "container_ttys", &container_ttys);
if (r > 0) {
- c
har *w
, *state;
+ c
onst char *word
, *state;
size_t l;
size_t l;
- FOREACH_WORD(w, l, container_ttys, state) {
+ FOREACH_WORD(w
ord
, l, container_ttys, state) {
const char *t;
char tty[l + 1];
const char *t;
char tty[l + 1];
- memcpy(tty, w, l);
+ memcpy(tty, w
ord
, l);
tty[l] = 0;
/* First strip off /dev/ if it is specified */
tty[l] = 0;
/* First strip off /dev/ if it is specified */
@@
-184,15
+184,15
@@
int main(int argc, char *argv[]) {
}
if (read_one_line_file("/sys/class/tty/console/active", &active) >= 0) {
}
if (read_one_line_file("/sys/class/tty/console/active", &active) >= 0) {
- c
har *w
, *state;
+ c
onst char *word
, *state;
size_t l;
/* Automatically add in a serial getty on all active
* kernel consoles */
size_t l;
/* Automatically add in a serial getty on all active
* kernel consoles */
- FOREACH_WORD(w, l, active, state) {
+ FOREACH_WORD(w
ord
, l, active, state) {
_cleanup_free_ char *tty = NULL;
_cleanup_free_ char *tty = NULL;
- tty = strndup(w, l);
+ tty = strndup(w
ord
, l);
if (!tty) {
log_oom();
return EXIT_FAILURE;
if (!tty) {
log_oom();
return EXIT_FAILURE;