diff options
author | Mattias Andrée <maandree@kth.se> | 2023-12-05 00:03:04 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-12-05 00:03:04 +0100 |
commit | 58dd684c4e86944301959a140dbed9746df35779 (patch) | |
tree | a2702ea4f66b2a58711ee22eb7449c74b1ecf0d1 /linux/symbols.c | |
parent | First commit (diff) | |
download | libsyscalls-58dd684c4e86944301959a140dbed9746df35779.tar.gz libsyscalls-58dd684c4e86944301959a140dbed9746df35779.tar.bz2 libsyscalls-58dd684c4e86944301959a140dbed9746df35779.tar.xz |
Second commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | linux/symbols.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/linux/symbols.c b/linux/symbols.c index d91880f..cbc61f5 100644 --- a/linux/symbols.c +++ b/linux/symbols.c @@ -47,13 +47,13 @@ extract_linux_symbol_mode(struct libsyscalls_symbol_printer_data *data, unsigned if (value & 07) goto digits1; if (0) { digits4: - data->buf[i++] = '0' | (value & 07000); + data->buf[i++] = '0' | ((value / 01000) & 7); digits3: - data->buf[i++] = '0' | (value & 0700); + data->buf[i++] = '0' | ((value / 0100) & 7); digits2: - data->buf[i++] = '0' | (value & 070); + data->buf[i++] = '0' | ((value / 010) & 7); digits1: - data->buf[i++] = '0' | (value & 07); + data->buf[i++] = '0' | ((value / 01) & 7); } data->buf[i++] = ' '; data->buf[i++] = '('; @@ -95,11 +95,11 @@ extract_linux_symbol_umask(struct libsyscalls_symbol_printer_data *data, unsigne if (value & 07) goto digits1; if (0) { digits3: - data->buf[i++] = '0' | (value & 0700); + data->buf[i++] = '0' | ((value / 0700) & 7); digits2: - data->buf[i++] = '0' | (value & 070); + data->buf[i++] = '0' | ((value / 070) & 7); digits1: - data->buf[i++] = '0' | (value & 07); + data->buf[i++] = '0' | ((value / 07) & 7); } data->buf[i++] = ' '; data->buf[i++] = '('; |