chiark / gitweb /
scope: make attachment of initial PIDs a bit more robust
[elogind.git] / src / shared / device-nodes.c
index 986553e93f011b3e782c7ad08c3885d6e92c8a4f..73e9edd29dc91f7a5b8822abe40961afacd9c26c 100644 (file)
@@ -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
@@ -41,7 +41,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 +70,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;
 }