diff options
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++] = '('; |