Index: kernel/generic/src/lib/str.c
===================================================================
--- kernel/generic/src/lib/str.c	(revision 8f4f444d453918c0a30d77ed2e590850ef528f3c)
+++ kernel/generic/src/lib/str.c	(revision b553acc54cb92b44efceab64a5bfd014959d54d2)
@@ -456,6 +456,10 @@
  *
  * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths.
+ * The strings are considered equal iff their length is equal
+ * and both strings consist of the same sequence of characters.
+ *
+ * A string is smaller than another string iff it is shorter or
+ * has a character with lower value at the first position where
+ * the strings differ.
  *
  * @param s1 First string to compare.
@@ -494,6 +498,12 @@
  *
  * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths and the length limit.
+ * The strings are considered equal iff
+ * min(str_length(s1), max_len) == min(str_length(s2), max_len)
+ * and both strings consist of the same sequence of characters,
+ * up to max_len characters.
+ *
+ * A string is smaller than another string iff it is shorter or
+ * has a character with lower value at the first position where
+ * the strings differ, considering only first max_len characters.
  *
  * @param s1      First string to compare.
