From 2b38639ab9422847fbad027069532a241b2fe2e1 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Wed, 6 May 2020 11:33:21 +0200 Subject: [PATCH] loop.4: 'lo_flags' is nowadays "r/w" Since kernel commit 96c5865559cee0f9cbc5173f3c949f6ce3525581, the 'lo_flags' field is modifiable via the LOOP_SET_STATUS and LOOP_SET_STATUS64 ioctl() operations. See https://bugzilla.kernel.org/show_bug.cgi?id=203417 Reported-by: Vlad Signed-off-by: Michael Kerrisk --- man4/loop.4 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/man4/loop.4 b/man4/loop.4 index 74858da7a..d95c38e77 100644 --- a/man4/loop.4 +++ b/man4/loop.4 @@ -89,7 +89,8 @@ struct loop_info { int lo_offset; int lo_encrypt_type; int lo_encrypt_key_size; /* ioctl w/o */ - int lo_flags; /* ioctl r/o */ + int lo_flags; /* ioctl r/w (r/o before + Linux 2.6.25) */ char lo_name[LO_NAME_SIZE]; unsigned char lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */ @@ -197,7 +198,8 @@ struct loop_info64 { uint32_t lo_number; /* ioctl r/o */ uint32_t lo_encrypt_type; uint32_t lo_encrypt_key_size; /* ioctl w/o */ - uint32_t lo_flags; /* ioctl r/o */ + uint32_t lo_flags; i /* ioctl r/w (r/o before + Linux 2.6.25) */ uint8_t lo_file_name[LO_NAME_SIZE]; uint8_t lo_crypt_name[LO_NAME_SIZE]; uint8_t lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */