aboutgitcodelistschat:MatrixIRC
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-06-27 19:23:51 +0200
committerStefano Brivio <sbrivio@redhat.com>2023-06-27 19:23:51 +0200
commit64d64ab33a7cb073492013258ed3e465d3358cbd (patch)
tree074572eb1bd4235daffc59a5ab3b38978520ab5e
parent6c8302e779fc70367fe396843d8491d2aec09eb3 (diff)
downloadseitan-64d64ab33a7cb073492013258ed3e465d3358cbd.tar
seitan-64d64ab33a7cb073492013258ed3e465d3358cbd.tar.gz
seitan-64d64ab33a7cb073492013258ed3e465d3358cbd.tar.bz2
seitan-64d64ab33a7cb073492013258ed3e465d3358cbd.tar.lz
seitan-64d64ab33a7cb073492013258ed3e465d3358cbd.tar.xz
seitan-64d64ab33a7cb073492013258ed3e465d3358cbd.tar.zst
seitan-64d64ab33a7cb073492013258ed3e465d3358cbd.zip
cooker/match: Fix mask calculation for GNU_DEV_MINOR
Starting from Linux 2.6 series, we have 20 bits of minor (not 32) and the gap between low and high bits is 12 bits, meaning the high ones are shifted by 20 (not 12). Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--cooker/match.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cooker/match.c b/cooker/match.c
index 776823d..c1f5fa8 100644
--- a/cooker/match.c
+++ b/cooker/match.c
@@ -106,9 +106,9 @@ ______________________ _____________
case GNU_DEV_MINOR:
/*
xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx
- ____________________________ ________
+ _____________ ________
*/
- v.v_num = 0xff | ((long long)0xffffff << 12);
+ v.v_num = 0xff | ((long long)0xfff << 20);
mask_offset = emit_data(g, U64, 0, &v);
offset = emit_bitwise(g, U64, BITWISE_AND, NULL_OFFSET,
offset, mask_offset);