xref: /kernel/linux/linux-6.6/tools/build/feature/test-file-handle.c
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/tools/build/feature/
162306a36Sopenharmony_ci#define _GNU_SOURCE
262306a36Sopenharmony_ci#include <sys/types.h>
362306a36Sopenharmony_ci#include <sys/stat.h>
462306a36Sopenharmony_ci#include <fcntl.h>
562306a36Sopenharmony_ci#include <inttypes.h>
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciint main(void)
862306a36Sopenharmony_ci{
962306a36Sopenharmony_ci	struct {
1062306a36Sopenharmony_ci		struct file_handle fh;
1162306a36Sopenharmony_ci		uint64_t cgroup_id;
1262306a36Sopenharmony_ci	} handle;
1362306a36Sopenharmony_ci	int mount_id;
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci	name_to_handle_at(AT_FDCWD, "/", &handle.fh, &mount_id, 0);
1662306a36Sopenharmony_ci	return 0;
1762306a36Sopenharmony_ci}
18

Indexes created Thu Nov 07 10:32:03 CST 2024