From 9759adc4ffd2bc56cd09ca9c4c696502c327dce1 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 9 Oct 2003 20:58:11 +0000 Subject: Move sysquotas autoconf tests to a seperate file. Patch by Stefan Metzmacher (This used to be commit 9f6cd8177db9a88f681f28a8dca044595ddaae88) --- source3/lib/sysquotas.c | 100 +----------------------------------------------- 1 file changed, 1 insertion(+), 99 deletions(-) (limited to 'source3/lib/sysquotas.c') diff --git a/source3/lib/sysquotas.c b/source3/lib/sysquotas.c index 617f624dae..3223ecb580 100644 --- a/source3/lib/sysquotas.c +++ b/source3/lib/sysquotas.c @@ -19,8 +19,6 @@ */ -#ifndef AUTOCONF_TEST - #include "includes.h" #ifdef HAVE_SYS_QUOTAS @@ -742,7 +740,7 @@ static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t if (lines) { char *line = lines[0]; - DEBUG (3, ("Read output from get_quota, \"r%s\"\n", line)); + DEBUG (3, ("Read output from get_quota, \"%s\"\n", line)); /* we need to deal with long long unsigned here, if supported */ @@ -1011,99 +1009,3 @@ int sys_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DI } #endif /* HAVE_SYS_QUOTAS */ -#else /* ! AUTOCONF_TEST */ -/* this is the autoconf driver to test witch quota system we should use */ - -#if defined(HAVE_QUOTACTL_4A) -/* long quotactl(int cmd, char *special, qid_t id, caddr_t addr) */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif - -#ifdef HAVE_ASM_TYPES_H -#include -#endif - -#if defined(HAVE_LINUX_QUOTA_H) -# include -# if defined(HAVE_STRUCT_IF_DQBLK) -# define SYS_DQBLK if_dqblk -# elif defined(HAVE_STRUCT_MEM_DQBLK) -# define SYS_DQBLK mem_dqblk -# endif -#elif defined(HAVE_SYS_QUOTA_H) -# include -#endif - -#ifndef SYS_DQBLK -#define SYS_DQBLK dqblk -#endif - - int autoconf_quota(void) -{ - int ret = -1; - struct SYS_DQBLK D; - - ret = quotactl(Q_GETQUOTA,"/dev/hda1",0,(void *)&D); - - return ret; -} - -#elif defined(HAVE_QUOTACTL_4B) -/* int quotactl(const char *path, int cmd, int id, char *addr); */ - -#ifdef HAVE_SYS_QUOTA_H -#include -#else /* *BSD */ -#include -#include -#include -#endif - - int autoconf_quota(void) -{ - int ret = -1; - struct dqblk D; - - ret = quotactl("/",Q_GETQUOTA,0,(char *) &D); - - return ret; -} - -#elif defined(HAVE_QUOTACTL_3) -/* int quotactl (char *spec, int request, char *arg); */ - -#ifdef HAVE_SYS_TYPES_H -#include -#endif -#ifdef HAVE_SYS_QUOTA_H -#include -#endif - - int autoconf_quota(void) -{ - int ret = -1; - struct q_request request; - - ret = quotactl("/", Q_GETQUOTA, &request); - - return ret; -} - -#elif defined(HAVE_QUOTACTL_2) - -#error HAVE_QUOTACTL_2 not implemented - -#else - -#error Unknow QUOTACTL prototype - -#endif - - int main(void) -{ - autoconf_quota(); - return 0; -} -#endif /* AUTOCONF_TEST */ -- cgit