[PATCH i-g-t 3/5] lib/igt_fs: Rename igt_io to igt_fs to add additional helpers
Kamil Konieczny
kamil.konieczny at linux.intel.com
Wed May 7 15:58:18 UTC 2025
Hi Riana,
On 2025-04-22 at 15:25:59 +0530, Riana Tauro wrote:
> Rename igt_io to igt_fs to add additional helper functions
> to create and remove directories
>
> Cc: Louis Chauvet <louis.chauvet at bootlin.com>
> Cc: José Expósito <jose.exposito89 at gmail.com>
> Signed-off-by: Riana Tauro <riana.tauro at intel.com>
> ---
> lib/{igt_io.c => igt_fs.c} | 12 ++++++------
> lib/{igt_io.h => igt_fs.h} | 6 +++---
> lib/igt_sysfs.c | 2 +-
> lib/meson.build | 2 +-
> tests/msm/msm_mapping.c | 2 +-
> tests/msm/msm_recovery.c | 2 +-
> 6 files changed, 13 insertions(+), 13 deletions(-)
> rename lib/{igt_io.c => igt_fs.c} (93%)
> rename lib/{igt_io.h => igt_fs.h} (94%)
>
> diff --git a/lib/igt_io.c b/lib/igt_fs.c
> similarity index 93%
> rename from lib/igt_io.c
> rename to lib/igt_fs.c
> index b5143184f..f6a2530cd 100644
> --- a/lib/igt_io.c
> +++ b/lib/igt_fs.c
> @@ -26,15 +26,15 @@
> #include <stdlib.h>
> #include <unistd.h>
>
> -#include "igt_io.h"
> +#include "igt_fs.h"
>
> /**
> - * SECTION:igt_io
> - * @short_description: Helpers for file I/O
> - * @title: io
> - * @include: igt_io.h
> + * SECTION:igt_fs
> + * @short_description: Helpers for file
> + * @title: fs
> + * @include: igt_fs.h
> *
> - * This library provides helpers for file I/O
> + * This library provides helpers for file systems
> */
>
> /**
> diff --git a/lib/igt_io.h b/lib/igt_fs.h
> similarity index 94%
> rename from lib/igt_io.h
> rename to lib/igt_fs.h
> index eb9ffee1b..84c3fed62 100644
> --- a/lib/igt_io.h
> +++ b/lib/igt_fs.h
> @@ -22,12 +22,12 @@
> *
> */
>
> -#ifndef __IGT_IO_H__
> -#define __IGT_IO_H__
> +#ifndef __IGT_FS_H__
> +#define __IGT_FS_H__
>
> #include <stdio.h>
>
> ssize_t igt_readn(int fd, char *buf, size_t len);
> ssize_t igt_writen(int fd, const char *buf, size_t len);
>
> -#endif /* __IGT_IO_H__ */
> +#endif /* __IGT_FS_H__ */
> diff --git a/lib/igt_sysfs.c b/lib/igt_sysfs.c
> index a76af54eb..acb2f7927 100644
> --- a/lib/igt_sysfs.c
> +++ b/lib/igt_sysfs.c
> @@ -46,7 +46,7 @@
> #include "igt_core.h"
> #include "igt_sysfs.h"
> #include "igt_device.h"
> -#include "igt_io.h"
> +#include "igt_fs.h"
> #include "intel_chipset.h"
> #include "xe/xe_query.h"
>
> diff --git a/lib/meson.build b/lib/meson.build
> index 59072d8ce..34f7d7baa 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -20,6 +20,7 @@ lib_sources = [
> 'igt_color_encoding.c',
> 'igt_configfs.c',
> 'igt_facts.c',
> + 'igt_fs.c',
> 'igt_crc.c',
> 'igt_debugfs.c',
> 'igt_device.c',
> @@ -30,7 +31,6 @@ lib_sources = [
> 'igt_gt.c',
> 'igt_halffloat.c',
> 'igt_hwmon.c',
> - 'igt_io.c',
> 'igt_matrix.c',
> 'igt_os.c',
> 'igt_params.c',
> diff --git a/tests/msm/msm_mapping.c b/tests/msm/msm_mapping.c
> index e24618607..02ad2f08a 100644
> --- a/tests/msm/msm_mapping.c
> +++ b/tests/msm/msm_mapping.c
> @@ -29,7 +29,7 @@
>
> #include "igt.h"
> #include "igt_msm.h"
> -#include "igt_io.h"
> +#include "igt_fs.h"
>
> /*
> * Tests to ensure various kernel controlled buffers are mapped with the
> diff --git a/tests/msm/msm_recovery.c b/tests/msm/msm_recovery.c
> index 608836866..53c49ecd4 100644
> --- a/tests/msm/msm_recovery.c
> +++ b/tests/msm/msm_recovery.c
> @@ -26,7 +26,7 @@
>
> #include "igt.h"
> #include "igt_msm.h"
> -#include "igt_io.h"
> +#include "igt_fs.h"
Should be before igt_msm.h
Regards,
Kamil
>
> static struct msm_device *dev;
> static struct msm_bo *scratch_bo;
> --
> 2.47.1
>
More information about the igt-dev
mailing list