addattr: minor cleanup.

This commit is contained in:
Axel Dörfler
2015-03-13 12:38:04 +01:00
parent e40dece194
commit 06732c7c71
3 changed files with 25 additions and 26 deletions
+10 -12
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2006, Axel Dörfler, [email protected].
* Copyright 2004-2015, Axel Dörfler, [email protected].
* Copyright 2002, Sebastian Nozzi.
*
* Distributed under the terms of the MIT license.
@@ -33,13 +33,12 @@ writeAttrValue(int fd, const char *name, type_code type, Type value)
}
/** Writes an attribute to a node, taking the type into account and
* converting the value accordingly
*
* On success it will return the amount of bytes written
* On failure it returns an error code (negative number)
*/
/*! Writes an attribute to a node, taking the type into account and
converting the value accordingly
On success it will return the amount of bytes written
On failure it returns an error code (negative number)
*/
static ssize_t
writeAttr(int fd, type_code type, const char* name, const char* value, size_t length)
{
@@ -129,12 +128,11 @@ writeAttr(int fd, type_code type, const char *name, const char *value, size_t le
}
/** Adds an attribute to a file for the given type, name and value
* Converts the value accordingly in case of numeric or boolean types
*
* On success, it returns B_OK, or else an appropriate error code.
*/
/*! Adds an attribute to a file for the given type, name and value
Converts the value accordingly in case of numeric or boolean types
On success, it returns B_OK, or else an appropriate error code.
*/
status_t
addAttr(const char* file, type_code type, const char* name,
const char* value, size_t length, bool resolveLinks)
+2 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2006, Axel Dörfler, [email protected].
* Copyright 2004-2015, Axel Dörfler, [email protected].
* Copyright 2002, Sebastian Nozzi.
*
* Distributed under the terms of the MIT license.
@@ -14,4 +14,5 @@
status_t addAttr(const char* file, type_code attrType, const char* attrName,
const char* attrValue, size_t length, bool resolveLinks);
#endif /* _ADD_ATTR_H */
+1 -1
View File
@@ -1,6 +1,6 @@
/*
* Copyright 2010, Jérôme Duval.
* Copyright 2004-2007, Axel Dörfler, [email protected].
* Copyright 2004-2015, Axel Dörfler, [email protected].
* Copyright 2002, Sebastian Nozzi.
*
* Distributed under the terms of the MIT license.