From 1577ad487681cf3a0dd996a42e9acd4d1abc7df9 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Tue, 14 Oct 2003 16:20:40 +0000 Subject: [PATCH] Merged with SYSCALL_SWITCH branch (sswitch_merge tag) git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@151 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- util-vserver/lib/getversion-internal.hc | 4 ++- util-vserver/lib/int2str.c | 55 --------------------------------- util-vserver/lib/internal.h | 28 ----------------- util-vserver/lib/syscall.c | 2 ++ 4 files changed, 5 insertions(+), 84 deletions(-) delete mode 100644 util-vserver/lib/int2str.c delete mode 100644 util-vserver/lib/internal.h diff --git a/util-vserver/lib/getversion-internal.hc b/util-vserver/lib/getversion-internal.hc index a4a14d0..22a3168 100644 --- a/util-vserver/lib/getversion-internal.hc +++ b/util-vserver/lib/getversion-internal.hc @@ -25,9 +25,11 @@ #include "compat.h" #include "vserver-internal.h" + +#define _LINUX_TYPES_H 1 #include "linuxvirtual.h" -static inline ALWAYSINLINE int +static inline ALWAYSINLINE UNUSED int vc_get_version_internal(int cat) { return sys_virtual_context(VC_CMD(VERSION, 0, 0), cat, 0); diff --git a/util-vserver/lib/int2str.c b/util-vserver/lib/int2str.c deleted file mode 100644 index 114b5c3..0000000 --- a/util-vserver/lib/int2str.c +++ /dev/null @@ -1,55 +0,0 @@ -// $Id$ --*- c++ -*-- - -// Copyright (C) 2003 Enrico Scholz -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include "internal.h" - -#include -#include -#include - -size_t -utilvserver_uint2str(char *buf, size_t len, unsigned int val, unsigned char base) -{ - char *ptr = buf+len-1; - register size_t res; - if (base>=36 || len==0) return 0; - - *ptr = '\0'; - while (ptr>buf) { - unsigned char digit = val%base; - - --ptr; - *ptr = (digit<10 ? '0'+digit : - digit<36 ? 'a'+digit-10 : - (assert(false),'?')); - - val /= base; - if (val==0) break; - } - - assert(ptr>=buf && ptr<=buf+len-1); - - res = buf+len-ptr; - memmove(buf, ptr, res); - - return res-1; -} diff --git a/util-vserver/lib/internal.h b/util-vserver/lib/internal.h deleted file mode 100644 index f7c8e76..0000000 --- a/util-vserver/lib/internal.h +++ /dev/null @@ -1,28 +0,0 @@ -// $Id$ --*- c++ -*-- - -// Copyright (C) 2003 Enrico Scholz -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - -#ifndef H_UTIL_VSERVER_LIB_INTERNAL_H -#define H_UTIL_VSERVER_LIB_INTERNAL_H - -#include - -size_t -utilvserver_uint2str(char *buf, size_t len, unsigned int val, unsigned char base); - - -#endif // H_UTIL_VSERVER_LIB_INTERNAL_H diff --git a/util-vserver/lib/syscall.c b/util-vserver/lib/syscall.c index 3741d73..772da7b 100644 --- a/util-vserver/lib/syscall.c +++ b/util-vserver/lib/syscall.c @@ -24,6 +24,8 @@ #include "compat.h" #include "vserver.h" #include "vserver-internal.h" + +#define _LINUX_TYPES_H 1 #include "linuxvirtual.h" #ifdef VC_ENABLE_API_COMPAT -- 1.8.1.5