X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fdevice-nodes.c;h=8751797f547b23ec986a2ee89c50227b8f0c3b08;hb=2f07de3b6cacf44462635ab0fff56391b491e454;hp=986553e93f011b3e782c7ad08c3885d6e92c8a4f;hpb=8f6ce71fe79d897b67157d92869db87ee2042af6;p=elogind.git diff --git a/src/shared/device-nodes.c b/src/shared/device-nodes.c index 986553e93..8751797f5 100644 --- a/src/shared/device-nodes.c +++ b/src/shared/device-nodes.c @@ -3,7 +3,7 @@ /*** This file is part of systemd. - Copyright 2012 Lennart Poettering + Copyright 2008-2011 Kay Sievers systemd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -19,10 +19,7 @@ along with systemd; If not, see . ***/ -#include #include -#include -#include #include "device-nodes.h" #include "utf8.h" @@ -41,7 +38,7 @@ int encode_devnode_name(const char *str, char *str_enc, size_t len) { size_t i, j; if (str == NULL || str_enc == NULL) - return -1; + return -EINVAL; for (i = 0, j = 0; str[i] != '\0'; i++) { int seqlen; @@ -70,5 +67,5 @@ int encode_devnode_name(const char *str, char *str_enc, size_t len) { str_enc[j] = '\0'; return 0; err: - return -1; + return -EINVAL; }