aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-11-16 00:31:19 +0100
committerMattias Andrée <maandree@operamail.com>2015-11-16 00:31:19 +0100
commit5f686fa4e2a6eb2d35036586d0a324a800b60014 (patch)
treebfab1034f54e0d78d808a85b4ebe1c3b74148978
parentm doc (diff)
downloadslibc-5f686fa4e2a6eb2d35036586d0a324a800b60014.tar.gz
slibc-5f686fa4e2a6eb2d35036586d0a324a800b60014.tar.bz2
slibc-5f686fa4e2a6eb2d35036586d0a324a800b60014.tar.xz
m fix humanmode
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--include/slibc-human.h8
-rw-r--r--src/slibc-human/humanmode.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/include/slibc-human.h b/include/slibc-human.h
index ab89036..dbb0a98 100644
--- a/include/slibc-human.h
+++ b/include/slibc-human.h
@@ -42,19 +42,19 @@ enum humanmode_mode
* Return in the format where 0750
* resolves to 'rwxr-x---'.
*
- * If used in combination with `MACHINEMODE_MASK`,
+ * If used in combination with `HUMANMODE_MASK`,
* 0750 resolves to 'u=rwx,g=r-x,o=---'.
*/
- MACHINEMODE_STAT = 1,
+ HUMANMODE_STAT = 1,
/**
* Return in the format where 0750
* resolves to 'u=rwx,g=rx,o='.
*
- * If used in combination with `MACHINEMODE_STAT`,
+ * If used in combination with `HUMANMODE_STAT`,
* 0750 resolves to 'u=rwx,g=r-x,o=---'.
*/
- MACHINEMODE_MASK = 2,
+ HUMANMODE_MASK = 2,
};
diff --git a/src/slibc-human/humanmode.c b/src/slibc-human/humanmode.c
index 1b5360b..83aba68 100644
--- a/src/slibc-human/humanmode.c
+++ b/src/slibc-human/humanmode.c
@@ -38,17 +38,17 @@
*/
char* humanmode(char* restrict buffer, mode_t perm, enum humanmode_mode mode)
{
- mode_t perm_ = perm | (mode != MACHINEMODE_MASK ? 07777 : 0);
- int name = mode & MACHINEMODE_MASK;
+ mode_t perm_ = perm | (mode != HUMANMODE_MASK ? 07777 : 0);
+ int name = mode & HUMANMODE_MASK;
char* w;
if (mode & ~3)
return errno = EINVAL, NULL;
if (!mode)
- mode = MACHINEMODE_STAT;
+ mode = HUMANMODE_STAT;
if (buffer == NULL)
- buffer = malloc((mode == MACHINEMODE_STAT ? 10 : 18) * sizeof(char));
+ buffer = malloc((mode == HUMANMODE_STAT ? 10 : 18) * sizeof(char));
if (buffer == NULL)
return NULL;
w = buffer;