summaryrefslogtreecommitdiffstats
path: root/linux/symbols.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-12-05 00:03:04 +0100
committerMattias Andrée <maandree@kth.se>2023-12-05 00:03:04 +0100
commit58dd684c4e86944301959a140dbed9746df35779 (patch)
treea2702ea4f66b2a58711ee22eb7449c74b1ecf0d1 /linux/symbols.c
parentFirst commit (diff)
downloadlibsyscalls-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.c14
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++] = '(';