From a4e8885458c4921ad0f6a16ead10dbb557af35f6 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Fri, 11 Sep 2020 12:32:49 +0200 Subject: Renamed loop to xloop in all LTP kernel tests --- kernel/tests/include/lapi/loop.h | 55 --------------------------------------- kernel/tests/include/lapi/xloop.h | 55 +++++++++++++++++++++++++++++++++++++++ kernel/tests/include/tst_device.h | 20 +++++++------- 3 files changed, 65 insertions(+), 65 deletions(-) delete mode 100644 kernel/tests/include/lapi/loop.h create mode 100644 kernel/tests/include/lapi/xloop.h (limited to 'kernel/tests/include') diff --git a/kernel/tests/include/lapi/loop.h b/kernel/tests/include/lapi/loop.h deleted file mode 100644 index 87a9023..0000000 --- a/kernel/tests/include/lapi/loop.h +++ /dev/null @@ -1,55 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * Copyright (c) 2020 FUJITSU LIMITED. All rights reserved. - * Author: Yang Xu - */ -#ifndef LAPI_LOOP_H -#define LAPI_LOOP_H - -#include "config.h" -#include -#include - -#ifndef LO_FLAGS_PARTSCAN -# define LO_FLAGS_PARTSCAN 8 -#endif - -#ifndef LO_FLAGS_DIRECT_IO -# define LO_FLAGS_DIRECT_IO 16 -#endif - -#ifndef LOOP_SET_CAPACITY -# define LOOP_SET_CAPACITY 0x4C07 -#endif - -#ifndef LOOP_SET_DIRECT_IO -# define LOOP_SET_DIRECT_IO 0x4C08 -#endif - -#ifndef LOOP_SET_BLOCK_SIZE -# define LOOP_SET_BLOCK_SIZE 0x4C09 -#endif - -#ifndef LOOP_CONFIGURE -# define LOOP_CONFIGURE 0x4C0A -#endif - -#ifndef HAVE_STRUCT_LOOP_CONFIG -/* - * struct loop_config - Complete configuration for a loop device. - * @fd: fd of the file to be used as a backing file for the loop device. - * @block_size: block size to use; ignored if 0. - * @info: struct loop_info64 to configure the loop device with. - * - * This structure is used with the LOOP_CONFIGURE ioctl, and can be used to - * atomically setup and configure all loop device parameters at once. - */ -struct loop_config { - __u32 fd; - __u32 block_size; - struct loop_info64 info; - __u64 __reserved[8]; -}; -#endif - -#endif diff --git a/kernel/tests/include/lapi/xloop.h b/kernel/tests/include/lapi/xloop.h new file mode 100644 index 0000000..8e57b31 --- /dev/null +++ b/kernel/tests/include/lapi/xloop.h @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Copyright (c) 2020 FUJITSU LIMITED. All rights reserved. + * Author: Yang Xu + */ +#ifndef LAPI_LOOP_H +#define LAPI_LOOP_H + +#include "config.h" +#include +#include + +#ifndef LO_FLAGS_PARTSCAN +# define LO_FLAGS_PARTSCAN 8 +#endif + +#ifndef LO_FLAGS_DIRECT_IO +# define LO_FLAGS_DIRECT_IO 16 +#endif + +#ifndef LOOP_SET_CAPACITY +# define LOOP_SET_CAPACITY 0x4C07 +#endif + +#ifndef LOOP_SET_DIRECT_IO +# define LOOP_SET_DIRECT_IO 0x4C08 +#endif + +#ifndef LOOP_SET_BLOCK_SIZE +# define LOOP_SET_BLOCK_SIZE 0x4C09 +#endif + +#ifndef LOOP_CONFIGURE +# define LOOP_CONFIGURE 0x4C0A +#endif + +#ifndef HAVE_STRUCT_LOOP_CONFIG +/* + * struct loop_config - Complete configuration for a loop device. + * @fd: fd of the file to be used as a backing file for the loop device. + * @block_size: block size to use; ignored if 0. + * @info: struct loop_info64 to configure the loop device with. + * + * This structure is used with the LOOP_CONFIGURE ioctl, and can be used to + * atomically setup and configure all loop device parameters at once. + */ +struct xloop_config { + __u32 fd; + __u32 block_size; + struct xloop_info64 info; + __u64 __reserved[8]; +}; +#endif + +#endif diff --git a/kernel/tests/include/tst_device.h b/kernel/tests/include/tst_device.h index 1d1246e..00687a2 100644 --- a/kernel/tests/include/tst_device.h +++ b/kernel/tests/include/tst_device.h @@ -42,34 +42,34 @@ int tst_is_mounted_at_tmpdir(const char *path); int tst_clear_device(const char *dev); /* - * Finds a free loop device for use and returns the free loopdev minor(-1 for no - * free loopdev). If path is non-NULL, it will be filled with free loopdev path. + * Finds a free xloop device for use and returns the free xloopdev minor(-1 for no + * free xloopdev). If path is non-NULL, it will be filled with free xloopdev path. * */ -int tst_find_free_loopdev(const char *path, size_t path_len); +int tst_find_free_xloopdev(const char *path, size_t path_len); /* - * Attaches a file to a loop device. + * Attaches a file to a xloop device. * - * @dev_path Path to the loop device e.g. /dev/loop0 + * @dev_path Path to the xloop device e.g. /dev/xloop0 * @file_path Path to a file e.g. disk.img * @return Zero on success, non-zero otherwise. */ int tst_attach_device(const char *dev_path, const char *file_path); /* - * Detaches a file from a loop device fd. + * Detaches a file from a xloop device fd. * - * @dev_path Path to the loop device e.g. /dev/loop0 - * @dev_fd a open fd for the loop device + * @dev_path Path to the xloop device e.g. /dev/xloop0 + * @dev_fd a open fd for the xloop device * @return Zero on succes, non-zero otherwise. */ int tst_detach_device_by_fd(const char *dev_path, int dev_fd); /* - * Detaches a file from a loop device. + * Detaches a file from a xloop device. * - * @dev_path Path to the loop device e.g. /dev/loop0 + * @dev_path Path to the xloop device e.g. /dev/xloop0 * @return Zero on succes, non-zero otherwise. * * Internally this function opens the device and calls -- cgit v1.2.3-55-g7522