commit: f6e1edeb1bb8c0126381744fbad10c2f4cbf3ca7
parent 361d28d269624ab1e14398a756db02930dafce6f
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 7 Nov 2024 05:05:48 +0100
lib/mode: _t is reserved by POSIX
Diffstat:
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/lib/mode.c b/lib/mode.c
@@ -34,7 +34,7 @@ enum operation_e
OP_SET,
};
-struct modes_t
+struct modes
{
int8_t set;
int8_t user;
@@ -42,15 +42,15 @@ struct modes_t
int8_t other;
};
-struct meta_t
+struct modes_meta
{
enum perm_who_e dest;
enum operation_e op;
- struct modes_t new_modes;
+ struct modes new_modes;
};
static void
-apply(struct meta_t *meta, int8_t mode)
+apply(struct modes_meta *meta, int8_t mode)
{
// get old, then reset to old. Yay to POSIX nonsense
mode_t mask = umask(0);
@@ -157,14 +157,14 @@ new_mode(const char *mode, mode_t old, const char **errstr)
}
// ((^|,)[ugoa]*([+-=]|[ugo]|[rwxXst]+)+)+
- struct meta_t meta = {.dest = WHO_RST,
- .op = OP_RST,
- .new_modes = {
- .set = (old & 07000) >> 9,
- .user = (old & 00700) >> 6,
- .group = (old & 00070) >> 3,
- .other = (old & 00007) >> 0,
- }};
+ struct modes_meta meta = {.dest = WHO_RST,
+ .op = OP_RST,
+ .new_modes = {
+ .set = (old & 07000) >> 9,
+ .user = (old & 00700) >> 6,
+ .group = (old & 00070) >> 3,
+ .other = (old & 00007) >> 0,
+ }};
for(size_t i = 0; i < mode_len; i++)
{