]> granicus.if.org Git - strace/commitdiff
loop: decode LOOP_SET_BLOCK_SIZE
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 19 Sep 2017 11:32:05 +0000 (11:32 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 19 Sep 2017 11:32:05 +0000 (11:32 +0000)
* loop.c (loop_ioctl) <LOOP_SET_BLOCK_SIZE>: Handle LOOP_SET_BLOCK_SIZE.
* tests/ioctl_loop.c (main): Check it.

loop.c
tests/ioctl_loop.c

diff --git a/loop.c b/loop.c
index 4811dc00b3f0626336524268529ec1b8f8a624f3..33bd038576505a4249181824e95c49bfd6b70f00 100644 (file)
--- a/loop.c
+++ b/loop.c
@@ -189,6 +189,7 @@ MPERS_PRINTER_DECL(int, loop_ioctl,
                break;
 
        case LOOP_SET_DIRECT_IO:
+       case LOOP_SET_BLOCK_SIZE:
                tprintf(", %" PRI_klu, arg);
                break;
 
index 032b3909f9e50c5fec7d8719c10ecdfcb921f42d..56ebd9e47d02dac85757082fd790e666119dd45e 100644 (file)
@@ -303,6 +303,11 @@ main(void)
        printf("ioctl(-1, LOOP_SET_DIRECT_IO, %lu) = -1 EBADF (%m)\n",
               (unsigned long) magic);
 
+       /* LOOP_SET_BLOCK_SIZE */
+       ioctl(-1, LOOP_SET_BLOCK_SIZE, magic);
+       printf("ioctl(-1, LOOP_SET_BLOCK_SIZE, %lu) = -1 EBADF (%m)\n",
+              (unsigned long) magic);
+
        /* LOOP_CTL_ADD */
        ioctl(-1, LOOP_CTL_ADD, magic);
        printf("ioctl(-1, LOOP_CTL_ADD, %d) = -1 EBADF (%m)\n",