1f08c3bdfSopenharmony_ci// SPDX-License-Identifier: GPL-2.0-or-later 2f08c3bdfSopenharmony_ci/* 3f08c3bdfSopenharmony_ci * Copyright (c) 2021 FUJITSU LIMITED. All rights reserved. 4f08c3bdfSopenharmony_ci * Author: Yang Xu <xuyang2018.jy@fujitsu.com> 5f08c3bdfSopenharmony_ci */ 6f08c3bdfSopenharmony_ci 7f08c3bdfSopenharmony_ci#ifndef LTP_QUOTACTL_SYSCALL_VAR_H 8f08c3bdfSopenharmony_ci#define LTP_QUOTACTL_SYSCALL_VAR_H 9f08c3bdfSopenharmony_ci 10f08c3bdfSopenharmony_ci#include "lapi/quotactl.h" 11f08c3bdfSopenharmony_ci 12f08c3bdfSopenharmony_ci#define QUOTACTL_SYSCALL_VARIANTS 2 13f08c3bdfSopenharmony_ci#define MNTPOINT "mntpoint" 14f08c3bdfSopenharmony_ci 15f08c3bdfSopenharmony_cistatic int fd = -1; 16f08c3bdfSopenharmony_ci 17f08c3bdfSopenharmony_cistatic int do_quotactl(int fd, int cmd, const char *special, int id, caddr_t addr) 18f08c3bdfSopenharmony_ci{ 19f08c3bdfSopenharmony_ci if (tst_variant == 0) 20f08c3bdfSopenharmony_ci return quotactl(cmd, special, id, addr); 21f08c3bdfSopenharmony_ci return quotactl_fd(fd, cmd, id, addr); 22f08c3bdfSopenharmony_ci} 23f08c3bdfSopenharmony_ci 24f08c3bdfSopenharmony_cistatic void quotactl_info(void) 25f08c3bdfSopenharmony_ci{ 26f08c3bdfSopenharmony_ci if (tst_variant == 0) 27f08c3bdfSopenharmony_ci tst_res(TINFO, "Test quotactl()"); 28f08c3bdfSopenharmony_ci else 29f08c3bdfSopenharmony_ci tst_res(TINFO, "Test quotactl_fd()"); 30f08c3bdfSopenharmony_ci} 31f08c3bdfSopenharmony_ci 32f08c3bdfSopenharmony_ci#endif /* LTP_QUOTACTL_SYSCALL_VAR_H */ 33