~vcs-imports/busybox/trunk

« back to all changes in this revision

Viewing changes to libbb/parse_mode.c

  • Committer: Denys Vlasenko
  • Author(s): Christian Franke
  • Date: 2023-11-13 10:32:35 UTC
  • Revision ID: git-v1:a63b60bdd6fa26b867c80d44074118babbae7ffd
Cygwin: regenerate defconfig

Signed-off-by: Christian Franke <christian.franke@t-online.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
int FAST_FUNC bb_parse_mode(const char *s, unsigned current_mode)
18
18
{
19
 
        static const mode_t who_mask[] = {
 
19
/* should be mode_t really, but in all Unixes these constants fit into uint16 */
 
20
        static const uint16_t who_mask[] ALIGN2 = {
20
21
                S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO, /* a */
21
22
                S_ISUID | S_IRWXU,           /* u */
22
23
                S_ISGID | S_IRWXG,           /* g */
23
24
                S_IRWXO                      /* o */
24
25
        };
25
 
        static const mode_t perm_mask[] = {
 
26
        static const uint16_t perm_mask[] ALIGN2 = {
26
27
                S_IRUSR | S_IRGRP | S_IROTH, /* r */
27
28
                S_IWUSR | S_IWGRP | S_IWOTH, /* w */
28
29
                S_IXUSR | S_IXGRP | S_IXOTH, /* x */